[coreboot] [commit] r6509 - trunk/src/ec/lenovo/pmh7

repository service svn at coreboot.org
Sun Apr 17 14:54:33 CEST 2011


Author: svens
Date: Sun Apr 17 14:54:32 2011
New Revision: 6509
URL: https://tracker.coreboot.org/trac/coreboot/changeset/6509

Log:
PMH7: Add dock event control

Signed-off-by: Sven Schnelle <svens at stackframe.org>
Acked-by: Sven Schnelle <svens at stackframe.org>

Modified:
   trunk/src/ec/lenovo/pmh7/chip.h
   trunk/src/ec/lenovo/pmh7/pmh7.c
   trunk/src/ec/lenovo/pmh7/pmh7.h

Modified: trunk/src/ec/lenovo/pmh7/chip.h
==============================================================================
--- trunk/src/ec/lenovo/pmh7/chip.h	Sat Apr 16 02:13:17 2011	(r6508)
+++ trunk/src/ec/lenovo/pmh7/chip.h	Sun Apr 17 14:54:32 2011	(r6509)
@@ -5,5 +5,6 @@
 
 struct ec_lenovo_pmh7_config {
 	int backlight_enable:1;
+	int dock_event_enable:1;
 };
 #endif

Modified: trunk/src/ec/lenovo/pmh7/pmh7.c
==============================================================================
--- trunk/src/ec/lenovo/pmh7/pmh7.c	Sat Apr 16 02:13:17 2011	(r6508)
+++ trunk/src/ec/lenovo/pmh7/pmh7.c	Sun Apr 17 14:54:32 2011	(r6509)
@@ -33,6 +33,14 @@
 		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 @@
 	resource->gran = 5;
 
 	pmh7_backlight_enable(conf->backlight_enable);
+	pmh7_dock_event_enable(conf->dock_event_enable);
 }
 
 struct chip_operations ec_lenovo_pmh7_ops = {

Modified: trunk/src/ec/lenovo/pmh7/pmh7.h
==============================================================================
--- trunk/src/ec/lenovo/pmh7/pmh7.h	Sat Apr 16 02:13:17 2011	(r6508)
+++ trunk/src/ec/lenovo/pmh7/pmh7.h	Sun Apr 17 14:54:32 2011	(r6509)
@@ -32,4 +32,5 @@
 void pmh7_register_write(int reg, int val);
 
 void pmh7_backlight_enable(int onoff);
+void pmh7_dock_event_enable(int onoff);
 #endif




More information about the coreboot mailing list