diff options
Diffstat (limited to 'common/pwm_kblight.c')
-rw-r--r-- | common/pwm_kblight.c | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/common/pwm_kblight.c b/common/pwm_kblight.c deleted file mode 100644 index 4967d36df5..0000000000 --- a/common/pwm_kblight.c +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright 2013 The Chromium OS Authors. All rights reserved. - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -/* PWM control module for keyboard backlight. */ - -#include "common.h" -#include "keyboard_backlight.h" -#include "pwm.h" -#include "system.h" -#include "util.h" - -const enum pwm_channel kblight_pwm_ch = PWM_CH_KBLIGHT; - -static int kblight_pwm_set(int percent) -{ - pwm_set_duty(kblight_pwm_ch, percent); - return EC_SUCCESS; -} - -static int kblight_pwm_get(void) -{ - return pwm_get_duty(kblight_pwm_ch); -} - -static int kblight_pwm_init(void) -{ - /* dnojiri: Why do we need save/restore setting over sysjump? */ - kblight_pwm_set(0); - pwm_enable(kblight_pwm_ch, 0); - return EC_SUCCESS; -} - -static int kblight_pwm_enable(int enable) -{ - pwm_enable(kblight_pwm_ch, enable); - return EC_SUCCESS; -} - -const struct kblight_drv kblight_pwm = { - .init = kblight_pwm_init, - .set = kblight_pwm_set, - .get = kblight_pwm_get, - .enable = kblight_pwm_enable, -}; |