mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-07 16:11:43 +00:00
zoombini: Enable LM3630A driver for keyboard backlight
BUG=b:69379749 BRANCH=None TEST=kblight 100; kblight 50; kblight 0 Change-Id: I096ed43859e11a7984d9672bfab406f0cb91015f Signed-off-by: Benjamin Gordon <bmgordon@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/881945 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
This commit is contained in:
committed by
chrome-bot
parent
d258f8a788
commit
73162e60af
@@ -14,6 +14,7 @@
|
||||
#include "console.h"
|
||||
#include "compile_time_macros.h"
|
||||
#include "driver/als_opt3001.h"
|
||||
#include "driver/led/lm3630a.h"
|
||||
#include "driver/pmic_tps650x30.h"
|
||||
#include "driver/ppc/sn5s330.h"
|
||||
#include "driver/tcpm/ps8xxx.h"
|
||||
@@ -482,6 +483,22 @@ static void board_pmic_init(void)
|
||||
}
|
||||
DECLARE_HOOK(HOOK_INIT, board_pmic_init, HOOK_PRIO_INIT_I2C+1);
|
||||
|
||||
#ifdef BOARD_ZOOMBINI
|
||||
static void board_kblight_init(void)
|
||||
{
|
||||
gpio_set_level(GPIO_KB_BL_EN, 1);
|
||||
lm3630a_poweron();
|
||||
}
|
||||
DECLARE_HOOK(HOOK_CHIPSET_RESUME, board_kblight_init, HOOK_PRIO_DEFAULT);
|
||||
|
||||
static void board_kblight_stop(void)
|
||||
{
|
||||
lm3630a_poweroff();
|
||||
gpio_set_level(GPIO_KB_BL_EN, 0);
|
||||
}
|
||||
DECLARE_HOOK(HOOK_CHIPSET_SUSPEND, board_kblight_stop, HOOK_PRIO_DEFAULT);
|
||||
#endif /* defined(BOARD_ZOOMBINI) */
|
||||
|
||||
void board_reset_pd_mcu(void)
|
||||
{
|
||||
/* GPIO_USB_PD_RST_L resets all the TCPCs. */
|
||||
|
||||
@@ -33,6 +33,11 @@
|
||||
#define CONFIG_LPC
|
||||
#define CONFIG_PWM
|
||||
|
||||
/* KB backlight driver */
|
||||
#ifdef BOARD_ZOOMBINI
|
||||
#define CONFIG_LED_DRIVER_LM3630A
|
||||
#endif /* defined(BOARD_ZOOMBINI) */
|
||||
|
||||
/* TODO(aaboagye): Verify the right address. */
|
||||
#define CONFIG_ALS_OPT3001
|
||||
#define OPT3001_I2C_ADDR OPT3001_I2C_ADDR1
|
||||
|
||||
Reference in New Issue
Block a user