summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--board/samus/panel.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/board/samus/panel.c b/board/samus/panel.c
index dacb0bcf3e..b0cb77a6d5 100644
--- a/board/samus/panel.c
+++ b/board/samus/panel.c
@@ -19,6 +19,15 @@
#define LP8555_REG_CONFIG 0x10
#define LP8555_REG_CONFIG_MODE_MASK 0x03
#define LP8555_REG_CONFIG_MODE_PWM 0x00
+#define LP8555_REG_CURRENT 0x11
+#define LP8555_REG_CURRENT_MAXCURR_5MA 0x00
+#define LP8555_REG_CURRENT_MAXCURR_10MA 0x01
+#define LP8555_REG_CURRENT_MAXCURR_15MA 0x02
+#define LP8555_REG_CURRENT_MAXCURR_20MA 0x03
+#define LP8555_REG_CURRENT_MAXCURR_23MA 0x04
+#define LP8555_REG_CURRENT_MAXCURR_25MA 0x05
+#define LP8555_REG_CURRENT_MAXCURR_30MA 0x06
+#define LP8555_REG_CURRENT_MAXCURR_50MA 0x07
/**
* Enable PWM mode in backlight controller and turn it on.
@@ -35,6 +44,10 @@ static void lp8555_enable_pwm_mode(void)
i2c_write8(I2C_PORT_BACKLIGHT, I2C_ADDR_BACKLIGHT,
LP8555_REG_CONFIG, reg);
+ /* Set max LED current to 23mA. */
+ i2c_write8(I2C_PORT_BACKLIGHT, I2C_ADDR_BACKLIGHT,
+ LP8555_REG_CURRENT, LP8555_REG_CURRENT_MAXCURR_23MA);
+
/* Power on. */
i2c_read8(I2C_PORT_BACKLIGHT, I2C_ADDR_BACKLIGHT,
LP8555_REG_COMMAND, &reg);