summaryrefslogtreecommitdiff
path: root/driver
diff options
context:
space:
mode:
Diffstat (limited to 'driver')
-rw-r--r--driver/ioexpander/it8801.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/driver/ioexpander/it8801.c b/driver/ioexpander/it8801.c
index df6ea3e76e..d59bee8e3f 100644
--- a/driver/ioexpander/it8801.c
+++ b/driver/ioexpander/it8801.c
@@ -511,15 +511,15 @@ uint16_t it8801_pwm_get_raw_duty(enum pwm_channel ch)
void it8801_pwm_set_duty(enum pwm_channel ch, int percent)
{
- return it8801_pwm_set_raw_duty(ch, (100 - percent) * 255 / 100);
+ return it8801_pwm_set_raw_duty(ch, percent * 255 / 100);
}
int it8801_pwm_get_duty(enum pwm_channel ch)
{
- return 100 - it8801_pwm_get_raw_duty(ch) * 100 / 255;
+ return it8801_pwm_get_raw_duty(ch) * 100 / 255;
}
-#if defined(SECTION_IS_RW) && defined(CONFIG_KEYBOARD_BACKLIGHT)
+#ifdef CONFIG_KEYBOARD_BACKLIGHT
const enum pwm_channel it8801_kblight_pwm_ch = IT8801_PWM_CH_KBLIGHT;
static int it8801_kblight_enable(int enable)