blob: 6e65958cdcaff93cc89b26c2644ee6efcc100c50 [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
19/**
20 * enum pm8xxx_leds - PMIC8XXX supported led ids
21 * @PM8XXX_ID_LED_KB_LIGHT - keyboard backlight led
22 * @PM8XXX_ID_LED_0 - First low current led
23 * @PM8XXX_ID_LED_1 - Second low current led
24 * @PM8XXX_ID_LED_2 - Third low current led
25 * @PM8XXX_ID_FLASH_LED_0 - First flash led
26 * @PM8XXX_ID_FLASH_LED_0 - Second flash led
27 */
28enum pm8xxx_leds {
29 PM8XXX_ID_LED_KB_LIGHT = 1,
30 PM8XXX_ID_LED_0,
31 PM8XXX_ID_LED_1,
32 PM8XXX_ID_LED_2,
33 PM8XXX_ID_FLASH_LED_0,
34 PM8XXX_ID_FLASH_LED_1,
35};
36
Jay Chokshi12e49bf2011-07-22 16:24:39 -070037/**
38 * pm8xxx_led_modes - Operating modes of LEDs
39 */
40enum pm8xxx_led_modes {
41 PM8XXX_LED_MODE_MANUAL,
42 PM8XXX_LED_MODE_PWM1,
43 PM8XXX_LED_MODE_PWM2,
44 PM8XXX_LED_MODE_PWM3,
45 PM8XXX_LED_MODE_DTEST1,
46 PM8XXX_LED_MODE_DTEST2,
47 PM8XXX_LED_MODE_DTEST3,
48 PM8XXX_LED_MODE_DTEST4
49};
50
51int pm8xxx_led_config(enum pm8xxx_leds led_id,
52 enum pm8xxx_led_modes led_mode, int max_current);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070053#endif /* __LEDS_PM8XXX_H__ */