Author: svens Date: Wed Apr 27 21:47:42 2011 New Revision: 6546 URL: https://tracker.coreboot.org/trac/coreboot/changeset/6546
Log: 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
Modified: trunk/src/ec/lenovo/pmh7/pmh7.c trunk/src/ec/lenovo/pmh7/pmh7.h
Modified: trunk/src/ec/lenovo/pmh7/pmh7.c ============================================================================== --- trunk/src/ec/lenovo/pmh7/pmh7.c Wed Apr 27 21:47:28 2011 (r6545) +++ trunk/src/ec/lenovo/pmh7/pmh7.c Wed Apr 27 21:47:42 2011 (r6546) @@ -49,6 +49,15 @@ 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;
Modified: trunk/src/ec/lenovo/pmh7/pmh7.h ============================================================================== --- trunk/src/ec/lenovo/pmh7/pmh7.h Wed Apr 27 21:47:28 2011 (r6545) +++ trunk/src/ec/lenovo/pmh7/pmh7.h Wed Apr 27 21:47:42 2011 (r6546) @@ -34,4 +34,5 @@ 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