diff options
author | Mike Lee <mike5@huaqin.corp-partner.google.com> | 2020-09-16 20:06:56 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-09-24 04:34:49 +0000 |
commit | f4fbd68a2664e8d830fb00222023b841f6debac0 (patch) | |
tree | 8e0a48fc20bf7c3c2ea84e8cff9e59670d69cdd5 /driver/ioexpander/it8801.h | |
parent | 48509706db2ab4e3987a600ea6676f581317e5fb (diff) | |
download | chrome-ec-f4fbd68a2664e8d830fb00222023b841f6debac0.tar.gz |
Fennel: Modify it8801 keyboard backlight driver and Enable keyboard backlight
1.Modify it8801 keyboard backlight driver code
2.Enable keyboard backlight setting with it8801 keyboard backlight driver
BUG=b:162902808
BRANCH=firmware-kukui-12573.B
TEST=Manual.
Build and flash BIOS&EC on fennel board.
Verify the keyboard backlight function.
Signed-off-by: Mike Lee <mike5@huaqin.corp-partner.google.com>
Change-Id: I73dd7ffc7b6ee80ed7ca39ac4d05afe65f666181
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2413675
Reviewed-by: Zhuohao Lee <zhuohao@chromium.org>
Diffstat (limited to 'driver/ioexpander/it8801.h')
-rw-r--r-- | driver/ioexpander/it8801.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/driver/ioexpander/it8801.h b/driver/ioexpander/it8801.h index 016412ca22..25a82fe617 100644 --- a/driver/ioexpander/it8801.h +++ b/driver/ioexpander/it8801.h @@ -95,15 +95,17 @@ struct it8801_pwm_t { }; extern const struct it8801_pwm_t it8801_pwm_channels[]; +extern const struct kblight_drv kblight_it8801; /* standard pwm interface as defined in pwm.h */ void it8801_pwm_enable(enum pwm_channel ch, int enabled); -int it88801_pwm_get_enabled(enum pwm_channel ch); +int it8801_pwm_get_enabled(enum pwm_channel ch); void it8801_pwm_set_raw_duty(enum pwm_channel ch, uint16_t duty); uint16_t it8801_pwm_get_raw_duty(enum pwm_channel ch); void it8801_pwm_set_duty(enum pwm_channel ch, int percent); int it8801_pwm_get_duty(enum pwm_channel ch); +#define IT8801_REG_PWMODDSR 0x5F #define IT8801_REG_PWMMCR(n) (0x60 + ((n) - 1) * 8) #define IT8801_REG_PWMDCR(n) (0x64 + ((n) - 1) * 8) #define IT8801_REG_PWMPRSL(n) (0x66 + ((n) - 1) * 8) |