From 7ea7afd9ec06ef52df4408e2ddcc48b709d9419f Mon Sep 17 00:00:00 2001 From: Andy Green Date: Tue, 27 Jan 2009 14:39:36 +0000 Subject: tracking-config-2.6.29-rc2-fix-gta03-balaji-tree.patch Signed-off-by: Andy Green --- arch/arm/mach-s3c6410/include/mach/om-gta03.h | 2 +- arch/arm/mach-s3c6410/mach-om-gta03.c | 9 +++++++-- arch/arm/mach-s3c6410/om-gta03-features.c | 6 +++--- 3 files changed, 11 insertions(+), 6 deletions(-) (limited to 'arch/arm/mach-s3c6410') 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 #include -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 #include #include -#include +#include #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; -- cgit v1.2.3