diff options
author | Vic Yang <victoryang@chromium.org> | 2012-02-27 14:08:02 -0800 |
---|---|---|
committer | Vic Yang <victoryang@chromium.org> | 2012-02-27 15:11:42 -0800 |
commit | 44140b3c57b0df88b60c618c10a829cebec45712 (patch) | |
tree | 688aac6e034e231800b8efae4d9416faa58c531b /chip/lm4/pwm.c | |
parent | f40df60a9a963d43f1a3a0309f2c2f98f28dd1aa (diff) | |
download | chrome-ec-44140b3c57b0df88b60c618c10a829cebec45712.tar.gz |
EC_LPC_COMMAND_PWM_GET_FAN_RPM return target RPM
Actual RPM is now read from LPC mapped space. Modify this command to
return target RPM so we can verify EC receives target RPM.
Signed-off-by: Vic Yang <victoryang@chromium.org>
BUG=chrome-os-partner:8238
TEST=Get the same value after setting target RPM.
Change-Id: I9bcc9edd327cec1311b51fd0fcbc4a43b353daff
Diffstat (limited to 'chip/lm4/pwm.c')
-rw-r--r-- | chip/lm4/pwm.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/chip/lm4/pwm.c b/chip/lm4/pwm.c index f15b24ae02..07eb7371ec 100644 --- a/chip/lm4/pwm.c +++ b/chip/lm4/pwm.c @@ -63,6 +63,12 @@ int pwm_get_fan_rpm(void) } +int pwm_get_fan_target_rpm(void) +{ + return (LM4_FAN_FANCMD(FAN_CH_CPU) & MAX_RPM) * CPU_FAN_SCALE; +} + + int pwm_set_fan_target_rpm(int rpm) { /* Apply fan scaling */ |