diff options
author | Sven Schnelle <svens@stackframe.org> | 2011-04-27 19:47:42 +0000 |
---|---|---|
committer | Sven Schnelle <svens@stackframe.org> | 2011-04-27 19:47:42 +0000 |
commit | bf9e9309c01602d378f6238a51e86c78c25e2301 (patch) | |
tree | 41dc134b9f966ee39608aa79597954346d10810f | |
parent | cf7dffeabc82c50f807a62ba8ef6ed45ff53cbc8 (diff) |
Lenovo PMH7: add pmh7_ultrabay_power_enable()
Can be used to enable/disable Ultrabay power on Thinkpads
who control that with the PMH7. (i.e. T60)
Signed-off-by: Sven Schnelle <svens@stackframe.org>
Acked-by: Peter Stuge <peter@stuge.se>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6546 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
-rw-r--r-- | src/ec/lenovo/pmh7/pmh7.c | 9 | ||||
-rw-r--r-- | src/ec/lenovo/pmh7/pmh7.h | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/ec/lenovo/pmh7/pmh7.c b/src/ec/lenovo/pmh7/pmh7.c index d536d74c75..0ac8fa18de 100644 --- a/src/ec/lenovo/pmh7/pmh7.c +++ b/src/ec/lenovo/pmh7/pmh7.c @@ -49,6 +49,15 @@ void pmh7_touchpad_enable(int onoff) else pmh7_register_set_bit(0x51, 2); } + +void pmh7_ultrabay_power_enable(int onoff) +{ + if (onoff) + pmh7_register_clear_bit(0x62, 0); + else + pmh7_register_set_bit(0x62, 0); +} + void pmh7_register_set_bit(int reg, int bit) { char val; diff --git a/src/ec/lenovo/pmh7/pmh7.h b/src/ec/lenovo/pmh7/pmh7.h index 701013b396..35438028a6 100644 --- a/src/ec/lenovo/pmh7/pmh7.h +++ b/src/ec/lenovo/pmh7/pmh7.h @@ -34,4 +34,5 @@ void pmh7_register_write(int reg, int val); void pmh7_backlight_enable(int onoff); void pmh7_dock_event_enable(int onoff); void pmh7_touchpad_enable(int onoff); +void pmh7_ultrabay_power_enable(int onoff); #endif |