blob: 4096355cbbb28d03a9c91096003f1d0ea8d750d8 [file] [log] [blame]
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001/* Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 */
12
13#ifndef __LEDS_PM8XXX_H__
14#define __LEDS_PM8XXX_H__
15
16
17#define PM8XXX_LEDS_DEV_NAME "pm8xxx-led"
18
Jay Chokshide4cefb2011-08-04 18:10:44 -070019#define PM8XXX_LED_ID_SHIFT 0
20#define PM8XXX_LED_MODE_SHIFT 4
21#define PM8XXX_LED_MAX_CURRENT_SHIFT 8
22#define PM8XXX_LED_ID_MASK 0xF
23#define PM8XXX_LED_MODE_MASK 0xF0
24#define PM8XXX_LED_MAX_CURRENT_MASK 0xFFFF00
25
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070026/**
27 * enum pm8xxx_leds - PMIC8XXX supported led ids
28 * @PM8XXX_ID_LED_KB_LIGHT - keyboard backlight led
29 * @PM8XXX_ID_LED_0 - First low current led
30 * @PM8XXX_ID_LED_1 - Second low current led
31 * @PM8XXX_ID_LED_2 - Third low current led
32 * @PM8XXX_ID_FLASH_LED_0 - First flash led
33 * @PM8XXX_ID_FLASH_LED_0 - Second flash led
34 */
35enum pm8xxx_leds {
36 PM8XXX_ID_LED_KB_LIGHT = 1,
37 PM8XXX_ID_LED_0,
38 PM8XXX_ID_LED_1,
39 PM8XXX_ID_LED_2,
40 PM8XXX_ID_FLASH_LED_0,
41 PM8XXX_ID_FLASH_LED_1,
42};
43
Jay Chokshi12e49bf2011-07-22 16:24:39 -070044/**
45 * pm8xxx_led_modes - Operating modes of LEDs
46 */
47enum pm8xxx_led_modes {
48 PM8XXX_LED_MODE_MANUAL,
49 PM8XXX_LED_MODE_PWM1,
50 PM8XXX_LED_MODE_PWM2,
51 PM8XXX_LED_MODE_PWM3,
52 PM8XXX_LED_MODE_DTEST1,
53 PM8XXX_LED_MODE_DTEST2,
54 PM8XXX_LED_MODE_DTEST3,
55 PM8XXX_LED_MODE_DTEST4
56};
57
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070058#endif /* __LEDS_PM8XXX_H__ */