r3731 - trunk/src/target/kernel/patches

laforge at sita.openmoko.org laforge at sita.openmoko.org
Tue Dec 25 15:37:39 CET 2007


Author: laforge
Date: 2007-12-25 15:37:35 +0100 (Tue, 25 Dec 2007)
New Revision: 3731

Modified:
   trunk/src/target/kernel/patches/pcf50633.patch
Log:
fix pcf50633_gpio_{get,set}: use correct register (Sean Chiang)


Modified: trunk/src/target/kernel/patches/pcf50633.patch
===================================================================
--- trunk/src/target/kernel/patches/pcf50633.patch	2007-12-25 00:23:33 UTC (rev 3730)
+++ trunk/src/target/kernel/patches/pcf50633.patch	2007-12-25 14:37:35 UTC (rev 3731)
@@ -489,7 +489,7 @@
 +void pcf50633_gpio_set(struct pcf50633_data *pcf, enum pcf50633_gpio gpio,
 +			int on)
 +{
-+	u_int8_t reg = PCF50633_GPIO1-1 + gpio;
++	u_int8_t reg = gpio - PCF50633_GPIO1 + PCF50633_REG_GPIO1CFG;
 +
 +	if (on)
 +		reg_set_bit_mask(pcf, reg, 0x0f, 0x07);
@@ -500,7 +500,7 @@
 +
 +int pcf50633_gpio_get(struct pcf50633_data *pcf, enum pcf50633_gpio gpio)
 +{
-+	u_int8_t reg = PCF50633_GPIO1-1 + gpio;
++	u_int8_t reg = gpio - PCF50633_GPIO1 + PCF50633_REG_GPIO1CFG;
 +	u_int8_t val = reg_read(pcf, reg) & 0x0f;
 +
 +	if (val == PCF50633_GPOCFG_GPOSEL_1 ||





More information about the commitlog mailing list