aboutsummaryrefslogtreecommitdiff
path: root/drivers/misc
diff options
context:
space:
mode:
authorAndy Green <andy@openmoko.com>2008-11-21 16:40:58 +0000
committerAndy Green <andy@openmoko.com>2008-11-21 16:40:58 +0000
commit4a922dc8ab2915b61ff6adfe8e0a01069893b52b (patch)
tree6909728173fc18e8a88eaa9aa46eaebffbcabd93 /drivers/misc
parenta7e6827348e9e85466c9ab6488769bf862e9fd0b (diff)
MERGE-via-balaji-tracking-balaji-updates
Signed-off-by: Andy Green <andy@openmoko.com>
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/neo1973_pm_host.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/misc/neo1973_pm_host.c b/drivers/misc/neo1973_pm_host.c
index caa302eeb91..bc2a82c3b6d 100644
--- a/drivers/misc/neo1973_pm_host.c
+++ b/drivers/misc/neo1973_pm_host.c
@@ -21,21 +21,29 @@
#ifdef CONFIG_MACH_NEO1973_GTA02
#include <mach/gta02.h>
-#include <linux/mfd/pcf50633/core.h>
+#include <linux/mfd/pcf50633/gpio.h>
static ssize_t pm_host_read(struct device *dev, struct device_attribute *attr,
char *buf)
{
return sprintf(buf, "%d\n",
- pcf50633_gpio_get(gta02_pcf_pdata.pcf, PCF50633_GPO));
+ pcf50633_gpio_get(gta02_pcf_pdata.pcf, PCF50633_GPO)
+ == PCF50633_GPOCFG_GPOSEL_1);
}
static ssize_t pm_host_write(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{
unsigned long on = simple_strtoul(buf, NULL, 10);
+ u8 val;
- pcf50633_gpio_set(gta02_pcf_pdata.pcf, PCF50633_GPO, on);
+ if (on)
+ val = PCF50633_GPOCFG_GPOSEL_1;
+ else
+ val = PCF50633_GPOCFG_GPOSEL_0;
+
+
+ pcf50633_gpio_set(gta02_pcf_pdata.pcf, PCF50633_GPO, val);
return count;
}