aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorAndy Green <andy@openmoko.com>2009-01-27 14:39:36 +0000
committerAndy Green <agreen@octopus.localdomain>2009-01-27 14:39:36 +0000
commit7ea7afd9ec06ef52df4408e2ddcc48b709d9419f (patch)
tree3b4cb1a770f3d79fd6e696ea33e6c129963b0fa0 /arch
parentccdd8afc225e01c23fcbcf4402b0d3e3ba7c6d20 (diff)
tracking-config-2.6.29-rc2-fix-gta03-balaji-tree.patch
Signed-off-by: Andy Green <andy@openmoko.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-s3c6410/include/mach/om-gta03.h2
-rw-r--r--arch/arm/mach-s3c6410/mach-om-gta03.c9
-rw-r--r--arch/arm/mach-s3c6410/om-gta03-features.c6
3 files changed, 11 insertions, 6 deletions
diff --git a/arch/arm/mach-s3c6410/include/mach/om-gta03.h b/arch/arm/mach-s3c6410/include/mach/om-gta03.h
index ebb6b6b93b0..009574458e1 100644
--- a/arch/arm/mach-s3c6410/include/mach/om-gta03.h
+++ b/arch/arm/mach-s3c6410/include/mach/om-gta03.h
@@ -18,7 +18,7 @@
#include <mach/irqs.h>
#include <linux/mfd/pcf50633/core.h>
-extern struct pcf50633_platform_data om_gta03_pcf_pdata;
+extern struct pcf50633 *om_gta03_pcf;
/* ATAG_REVISION from bootloader */
#define GTA03v1_SYSTEM_REV 0x00000001
diff --git a/arch/arm/mach-s3c6410/mach-om-gta03.c b/arch/arm/mach-s3c6410/mach-om-gta03.c
index b5c861e7fa6..01a01b44baa 100644
--- a/arch/arm/mach-s3c6410/mach-om-gta03.c
+++ b/arch/arm/mach-s3c6410/mach-om-gta03.c
@@ -69,7 +69,7 @@
#include <linux/mfd/pcf50633/mbc.h>
#include <linux/mfd/pcf50633/adc.h>
#include <linux/mfd/pcf50633/gpio.h>
-#include <linux/mfd/pcf50633/led.h>
+#include <linux/mfd/pcf50633/pmic.h>
#define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK
#define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB
@@ -395,6 +395,9 @@ static void om_gta03_pmu_event_callback(struct pcf50633 *pcf, int irq)
static void om_gta03_pcf50633_attach_child_devices(struct pcf50633 *pcf);
static void om_gta03_pmu_regulator_registered(struct pcf50633 *pcf, int id);
+/* Global reference */
+struct pcf50633 *om_gta03_pcf;
+
struct pcf50633_platform_data om_gta03_pcf_pdata = {
.resumers = {
@@ -578,7 +581,7 @@ static void om_gta03_pmu_regulator_registered(struct pcf50633 *pcf, int id)
{
struct platform_device *regulator, *pdev;
- regulator = pcf->pmic.pdev[id];
+ regulator = pcf->regulator_pdev[id];
switch(id) {
case PCF50633_REGULATOR_LDO4:
@@ -614,6 +617,8 @@ static void om_gta03_pcf50633_attach_child_devices(struct pcf50633 *pcf)
{
int n;
+ om_gta03_pcf = pcf;
+
for (n = 0; n < ARRAY_SIZE(om_gta03_devices_pmu_children); n++)
om_gta03_devices_pmu_children[n]->dev.parent = pcf->dev;
diff --git a/arch/arm/mach-s3c6410/om-gta03-features.c b/arch/arm/mach-s3c6410/om-gta03-features.c
index 3f53b4c5e75..d3e2140ecba 100644
--- a/arch/arm/mach-s3c6410/om-gta03-features.c
+++ b/arch/arm/mach-s3c6410/om-gta03-features.c
@@ -111,7 +111,7 @@ static void om_gta03_features_pwron_set_on(enum feature feature)
gpio_direction_output(GTA03_GPIO_N_MODEM_RESET, 1);
break;
case OM_GTA03_USBHOST:
- pcf50633_gpio_set(om_gta03_pcf_pdata.pcf, PCF50633_GPO, 1);
+ pcf50633_gpio_set(om_gta03_pcf, PCF50633_GPO, 1);
break;
case OM_GTA03_VIB:
gpio_direction_output(GTA03_GPIO_VIBRATOR_ON, 1);
@@ -158,7 +158,7 @@ static void om_gta03_features_pwron_set_off(enum feature feature)
s3c_gpio_cfgpin(GTA03_GPIO_MODEN_ON, S3C_GPIO_SFN(1));
break;
case OM_GTA03_USBHOST:
- pcf50633_gpio_set(om_gta03_pcf_pdata.pcf, PCF50633_GPO, 0);
+ pcf50633_gpio_set(om_gta03_pcf, PCF50633_GPO, 0);
break;
case OM_GTA03_VIB:
gpio_direction_output(GTA03_GPIO_VIBRATOR_ON, 0);
@@ -199,7 +199,7 @@ static ssize_t om_gta03_feature_read(struct device *dev,
on = regulator_is_enabled(gps_regulator);
break;
case OM_GTA03_USBHOST:
- on = pcf50633_gpio_get(om_gta03_pcf_pdata.pcf, PCF50633_GPO);
+ on = pcf50633_gpio_get(om_gta03_pcf, PCF50633_GPO);
break;
default:
on = feature_info[feature].on;