diff options
Diffstat (limited to 'src/ec')
-rw-r--r-- | src/ec/lenovo/pmh7/chip.h | 1 | ||||
-rw-r--r-- | src/ec/lenovo/pmh7/pmh7.c | 9 | ||||
-rw-r--r-- | src/ec/lenovo/pmh7/pmh7.h | 1 |
3 files changed, 11 insertions, 0 deletions
diff --git a/src/ec/lenovo/pmh7/chip.h b/src/ec/lenovo/pmh7/chip.h index e11b772697..9867ba657e 100644 --- a/src/ec/lenovo/pmh7/chip.h +++ b/src/ec/lenovo/pmh7/chip.h @@ -5,5 +5,6 @@ extern struct chip_operations ec_lenovo_pmh7_ops; struct ec_lenovo_pmh7_config { int backlight_enable:1; + int dock_event_enable:1; }; #endif diff --git a/src/ec/lenovo/pmh7/pmh7.c b/src/ec/lenovo/pmh7/pmh7.c index ba378666a2..042a4edbf7 100644 --- a/src/ec/lenovo/pmh7/pmh7.c +++ b/src/ec/lenovo/pmh7/pmh7.c @@ -33,6 +33,14 @@ void pmh7_backlight_enable(int onoff) pmh7_register_clear_bit(0x50, 5); } +void pmh7_dock_event_enable(int onoff) +{ + if (onoff) + pmh7_register_set_bit(0x60, 3); + else + pmh7_register_clear_bit(0x60, 3); + +} void pmh7_register_set_bit(int reg, int bit) { char val; @@ -78,6 +86,7 @@ static void enable_dev(device_t dev) resource->gran = 5; pmh7_backlight_enable(conf->backlight_enable); + pmh7_dock_event_enable(conf->dock_event_enable); } struct chip_operations ec_lenovo_pmh7_ops = { diff --git a/src/ec/lenovo/pmh7/pmh7.h b/src/ec/lenovo/pmh7/pmh7.h index a85d710689..588be70c4a 100644 --- a/src/ec/lenovo/pmh7/pmh7.h +++ b/src/ec/lenovo/pmh7/pmh7.h @@ -32,4 +32,5 @@ char pmh7_register_read(int reg); void pmh7_register_write(int reg, int val); void pmh7_backlight_enable(int onoff); +void pmh7_dock_event_enable(int onoff); #endif |