ec/lenovo/h8: Make trackpoint enable a CMOS option.

To be consistent with touchpad counterpart.

Change-Id: I72d09b41b964f80a81fbf409ef69dd368834a3e2
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-on: http://review.coreboot.org/4654
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
This commit is contained in:
Vladimir Serbinenko 2014-01-11 04:22:35 +01:00
parent 1eda31c0a7
commit eada34faaa
7 changed files with 18 additions and 0 deletions

View File

@ -55,6 +55,14 @@ void pmh7_touchpad_enable(int onoff)
pmh7_register_set_bit(0x51, 2); pmh7_register_set_bit(0x51, 2);
} }
void pmh7_trackpoint_enable(int onoff)
{
if (onoff)
pmh7_register_clear_bit(0x51, 0);
else
pmh7_register_set_bit(0x51, 0);
}
void pmh7_ultrabay_power_enable(int onoff) void pmh7_ultrabay_power_enable(int onoff)
{ {
if (onoff) if (onoff)
@ -116,6 +124,10 @@ static void enable_dev(device_t dev)
if (get_option(&val, "touchpad") != CB_SUCCESS) if (get_option(&val, "touchpad") != CB_SUCCESS)
val = 1; val = 1;
pmh7_touchpad_enable(val); pmh7_touchpad_enable(val);
if (get_option(&val, "trackpoint") != CB_SUCCESS)
val = 1;
pmh7_trackpoint_enable(val);
} }
struct chip_operations ec_lenovo_pmh7_ops = { struct chip_operations ec_lenovo_pmh7_ops = {

View File

@ -35,4 +35,5 @@ void pmh7_backlight_enable(int onoff);
void pmh7_dock_event_enable(int onoff); void pmh7_dock_event_enable(int onoff);
void pmh7_touchpad_enable(int onoff); void pmh7_touchpad_enable(int onoff);
void pmh7_ultrabay_power_enable(int onoff); void pmh7_ultrabay_power_enable(int onoff);
void pmh7_trackpoint_enable(int onoff);
#endif #endif

View File

@ -113,6 +113,7 @@ entries
1063 1 e 1 wlan 1063 1 e 1 wlan
1064 8 h 0 volume 1064 8 h 0 volume
1072 1 e 9 first_battery 1072 1 e 9 first_battery
1073 1 e 1 trackpoint
1074 1 e 1 fn_ctrl_swap 1074 1 e 1 fn_ctrl_swap
1075 1 e 1 sticky_fn 1075 1 e 1 sticky_fn
1076 1 e 1 power_management_beeps 1076 1 e 1 power_management_beeps

View File

@ -10,6 +10,7 @@ bluetooth=Enable
wwan=Enable wwan=Enable
wlan=Enable wlan=Enable
touchpad=Enable touchpad=Enable
trackpoint=Enable
fn_ctrl_swap=Disable fn_ctrl_swap=Disable
sticky_fn=Disable sticky_fn=Disable
power_management_beeps=Enable power_management_beeps=Enable

View File

@ -91,6 +91,7 @@ entries
413 1 e 1 wwan 413 1 e 1 wwan
414 1 e 1 touchpad 414 1 e 1 touchpad
415 1 e 1 wlan 415 1 e 1 wlan
416 1 e 1 trackpoint
417 1 e 1 fn_ctrl_swap 417 1 e 1 fn_ctrl_swap
418 1 e 1 sticky_fn 418 1 e 1 sticky_fn
419 1 e 1 power_management_beeps 419 1 e 1 power_management_beeps

View File

@ -13,6 +13,7 @@ tft_brightness=0xff
first_battery=Primary first_battery=Primary
bluetooth=Enable bluetooth=Enable
wlan=Enable wlan=Enable
trackpoint=Enable
fn_ctrl_swap=Disable fn_ctrl_swap=Disable
sticky_fn=Disable sticky_fn=Disable
power_management_beeps=Enable power_management_beeps=Enable

View File

@ -113,6 +113,7 @@ entries
1081 1 e 1 bluetooth 1081 1 e 1 bluetooth
1082 1 e 1 wwan 1082 1 e 1 wwan
1083 1 e 1 wlan 1083 1 e 1 wlan
1084 1 e 1 trackpoint
1085 1 e 1 fn_ctrl_swap 1085 1 e 1 fn_ctrl_swap
1086 1 e 1 sticky_fn 1086 1 e 1 sticky_fn
1087 1 e 1 power_management_beeps 1087 1 e 1 power_management_beeps