Skip to content

Commit

Permalink
Fix button backlight (also fixes random reboots)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fagulhas authored and Daz Jones committed Oct 5, 2013
1 parent 833ac5d commit 6155c61
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions drivers/leds/leds-msm-pmic.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,20 @@ static void msm_keypad_bl_led_set(struct led_classdev *led_cdev,
int ret = 0;
/* 7x27a platform use mpp7 as keypad backlight */
#ifdef CONFIG_ARCH_MSM7X27A
/* use pwm to control the brightness of keypad backlight*/
/* make sure the led is drived by pwm when */
/* the system sleep indicator switch is on */
pmapp_button_backlight_init();
if(machine_is_msm7x27a_U8815())
{
ret = pmic_secure_mpp_config_i_sink(PM_MPP_7, PM_MPP__I_SINK__LEVEL_5mA, \
(!!value) ? PM_MPP__I_SINK__SWITCH_ENA : PM_MPP__I_SINK__SWITCH_DIS);
}
else
{
/* use pwm to control the brightness of keypad backlight*/
/* make sure the led is drived by pwm when */
/* the system sleep indicator switch is on */
pmapp_button_backlight_init();

ret = pmapp_button_backlight_set_brightness(value);
ret = pmapp_button_backlight_set_brightness(value);
}
#else
if(machine_is_msm7x30_u8800() || machine_is_msm7x30_u8800_51() || machine_is_msm8255_u8800_pro() )
{
Expand Down

0 comments on commit 6155c61

Please sign in to comment.