mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-10-31 18:09:19 +00:00
bee06f8516
Add PMIC8058 based keyboard backlight and low current leds driver. keyboard backlight led supports upto 16 levels of backlight intensity, which is mapped to 0..255 levels of brightness of led subsystem. Three low current(40mA) led drivers of PMIC are also supported in this driver. CRs-Fixed: 211772 Change-Id: Ia65b083f6070666aaad95851c9b843332ce35c82 Signed-off-by: Trilok Soni <tsoni@qualcomm.com>
40 lines
1.1 KiB
C
40 lines
1.1 KiB
C
/* Copyright (c) 2010, The Linux Foundation. All rights reserved.
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 and
|
|
* only version 2 as published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
*/
|
|
#ifndef __LEDS_PMIC8058_H__
|
|
#define __LEDS_PMIC8058_H__
|
|
|
|
enum pmic8058_leds {
|
|
PMIC8058_ID_LED_KB_LIGHT = 1,
|
|
PMIC8058_ID_LED_0,
|
|
PMIC8058_ID_LED_1,
|
|
PMIC8058_ID_LED_2,
|
|
PMIC8058_ID_FLASH_LED_0,
|
|
PMIC8058_ID_FLASH_LED_1,
|
|
};
|
|
|
|
struct pmic8058_led {
|
|
const char *name;
|
|
const char *default_trigger;
|
|
unsigned max_brightness;
|
|
int id;
|
|
};
|
|
|
|
struct pmic8058_leds_platform_data {
|
|
int num_leds;
|
|
struct pmic8058_led *leds;
|
|
};
|
|
|
|
int pm8058_set_flash_led_current(enum pmic8058_leds id, unsigned mA);
|
|
int pm8058_set_led_current(enum pmic8058_leds id, unsigned mA);
|
|
|
|
#endif /* __LEDS_PMIC8058_H__ */
|