From b4bddff086b6915bb955e63a55686dab7502f8c3 Mon Sep 17 00:00:00 2001 From: Duncan Laurie Date: Wed, 22 Feb 2017 16:04:23 -0800 Subject: [PATCH] eve: Set keyboard backlight PWM to 10kHz The TPS61161DRVR used for keyboard backlight expects an input frequency of 5 to 100 kHz but is currently only getting 100Hz. With this change the keyboard backlight duty cycle curve behaves as expected and you no longer need 50% duty cycle to get it to turn on. Also the keyboard backlight does not need to be enabled in DSLEEP since that is only possible in S3/S5, so remove the DSLEEP flag. BUG=chrome-os-partner:61464 BRANCH=none TEST=test brightness range in sysfs to ensure backlight is visible at low settings. Change-Id: I9737827ad4dbd39e342ad370aef46475c273a6bc Signed-off-by: Duncan Laurie Reviewed-on: https://chromium-review.googlesource.com/446617 Reviewed-by: Scott Collyer --- board/eve/board.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/eve/board.c b/board/eve/board.c index 5a11f21241..e185a125b8 100644 --- a/board/eve/board.c +++ b/board/eve/board.c @@ -169,7 +169,7 @@ struct keyboard_scan_config keyscan_config = { /* PWM channels. Must be in the exactly same order as in enum pwm_channel. */ const struct pwm_t pwm_channels[] = { - [PWM_CH_KBLIGHT] = { 5, PWM_CONFIG_DSLEEP, 100 }, + [PWM_CH_KBLIGHT] = { 5, 0, 10000 }, [PWM_CH_LED_L_RED] = { 2, PWM_CONFIG_DSLEEP, 100 }, [PWM_CH_LED_L_GREEN] = { 3, PWM_CONFIG_DSLEEP, 100 }, [PWM_CH_LED_L_BLUE] = { 4, PWM_CONFIG_DSLEEP, 100 },