summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSven Schnelle <svens@stackframe.org>2011-04-17 12:54:32 +0000
committerSven Schnelle <svens@stackframe.org>2011-04-17 12:54:32 +0000
commit1b9d2ee6ca80a0ac9a946d3fad4efb884998622c (patch)
tree00dda9442af21c999b53f834eaa5491d3b4fd0f2 /src
parent4e67731011fa36a6f211ae150a38461664e6ccc0 (diff)
PMH7: Add dock event control
Signed-off-by: Sven Schnelle <svens@stackframe.org> Acked-by: Sven Schnelle <svens@stackframe.org> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6509 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src')
-rw-r--r--src/ec/lenovo/pmh7/chip.h1
-rw-r--r--src/ec/lenovo/pmh7/pmh7.c9
-rw-r--r--src/ec/lenovo/pmh7/pmh7.h1
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