r1589 - trunk/src/target/kernel/patches

laforge at sita.openmoko.org laforge at sita.openmoko.org
Sun Apr 1 10:30:07 CEST 2007


Author: laforge
Date: 2007-04-01 10:30:06 +0200 (Sun, 01 Apr 2007)
New Revision: 1589

Modified:
   trunk/src/target/kernel/patches/gta01-pcf50606.patch
Log:
* switch off power supplies that are not needed during SUSPEND


Modified: trunk/src/target/kernel/patches/gta01-pcf50606.patch
===================================================================
--- trunk/src/target/kernel/patches/gta01-pcf50606.patch	2007-03-31 18:46:54 UTC (rev 1588)
+++ trunk/src/target/kernel/patches/gta01-pcf50606.patch	2007-04-01 08:30:06 UTC (rev 1589)
@@ -3,8 +3,8 @@
 Index: linux-2.6.20.4/drivers/i2c/chips/pcf50606.c
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.20.4/drivers/i2c/chips/pcf50606.c	2007-03-30 22:38:29.000000000 +0200
-@@ -0,0 +1,1856 @@
++++ linux-2.6.20.4/drivers/i2c/chips/pcf50606.c	2007-04-01 10:26:25.000000000 +0200
+@@ -0,0 +1,1860 @@
 +/* Philips PCF50606 Power Management Unit (PMU) driver
 + *
 + * (C) 2006 by OpenMoko, Inc.
@@ -1732,6 +1732,7 @@
 +{
 +	struct i2c_client *client = to_i2c_client(dev);
 +	struct pcf50606_data *pcf = i2c_get_clientdata(client);
++	int i;
 +
 +	/* The general idea is to power down all unused power supplies,
 +	 * and then mask all PCF50606 interrup sources but EXTONR, ONKEYF
@@ -1753,9 +1754,12 @@
 +	pcf->standby_regs.adcc2 = __reg_read(pcf, PCF50606_REG_ADCC2);
 +	pcf->standby_regs.pwmc1 = __reg_read(pcf, PCF50606_REG_PWMC1);
 +
++	/* switch off power supplies that are not needed during suspend */
++	for (i = 0; i < __NUM_PCF50606_REGULATORS; i++) {
++		if (!(pcf->pdata->rails[i].flags & PMU_VRAIL_F_SUSPEND_ON))
++			pcf50606_onoff_set(pcf, i, 0);
++	}
 +
-+	/* FIXME: switch off unneeded power supplies */
-+
 +	pcf->standby_regs.int1m = __reg_read(pcf, PCF50606_REG_INT1M);
 +	pcf->standby_regs.int2m = __reg_read(pcf, PCF50606_REG_INT2M);
 +	pcf->standby_regs.int3m = __reg_read(pcf, PCF50606_REG_INT3M);
@@ -2203,8 +2207,8 @@
 Index: linux-2.6.20.4/include/linux/pcf50606.h
 ===================================================================
 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.20.4/include/linux/pcf50606.h	2007-03-30 22:26:05.000000000 +0200
-@@ -0,0 +1,87 @@
++++ linux-2.6.20.4/include/linux/pcf50606.h	2007-03-31 22:22:35.000000000 +0200
+@@ -0,0 +1,90 @@
 +#ifndef _LINUX_PCF50606_H
 +#define _LINUX_PCF50606_H
 +
@@ -2251,8 +2255,11 @@
 +extern void
 +pcf50606_charge_fast(struct pcf50606_data *pcf, int on);
 +
++#define PMU_VRAIL_F_SUSPEND_ON	0x00000001	/* Remains on during suspend */
++#define PMU_VRAIL_F_UNUSED	0x00000002	/* This rail is not used */
 +struct pmu_voltage_rail {
 +	char *name;
++	unsigned int flags;
 +	struct {
 +		unsigned int init;
 +		unsigned int max;





More information about the commitlog mailing list