The PCF50606 driver has been changed to be a regular I2C device instead of
a platform devicel  This patch changes the board-level registration of the
device to follow the model for I2C devices, using I2C_BOARD_INFO.

Signed-off-by: Jonas Bonn <[EMAIL PROTECTED]>
---
 arch/arm/mach-s3c2410/mach-gta01.c |   26 ++++++--------------------
 1 files changed, 6 insertions(+), 20 deletions(-)

diff --git a/arch/arm/mach-s3c2410/mach-gta01.c 
b/arch/arm/mach-s3c2410/mach-gta01.c
index e0df70e..0f7693d 100644
--- a/arch/arm/mach-s3c2410/mach-gta01.c
+++ b/arch/arm/mach-s3c2410/mach-gta01.c
@@ -264,23 +264,6 @@ static void mangle_pmu_pdata_by_system_rev(void)
        }
 }
 
-static struct resource gta01_pmu_resources[] = {
-       [0] = {
-               .flags  = IORESOURCE_IRQ,
-               .start  = GTA01_IRQ_PCF50606,
-               .end    = GTA01_IRQ_PCF50606,
-       },
-};
-
-struct platform_device gta01_pmu_dev = {
-       .name           = "pcf50606",
-       .num_resources  = ARRAY_SIZE(gta01_pmu_resources),
-       .resource       = gta01_pmu_resources,
-       .dev            = {
-               .platform_data = &gta01_pcf_pdata,
-       },
-};
-
 /* LCD driver info */
 
 /* Configuration for 480x640 toppoly TD028TTEC1.
@@ -367,6 +350,10 @@ static struct i2c_board_info gta01_i2c_devs[] __initdata = 
{
                I2C_BOARD_INFO("wm8753", 0x1a)
        }, {
                I2C_BOARD_INFO("neo1973_lm4857", 0x7c) 
+       }, {
+               I2C_BOARD_INFO("pcf50606", 0x08),
+               .irq = GTA01_IRQ_PCF50606,
+               .platform_data = &gta01_pcf_pdata
        }
 };
 
@@ -731,14 +718,13 @@ static void __init gta01_machine_init(void)
                        gta01_led_resources[0].end = GTA01Bv2_GPIO_VIBRATOR_ON;
                break;
        case GTA01Bv4_SYSTEM_REV:
-               gta01_pmu_resources[0].start =
-                       gta01_pmu_resources[0].end = GTA01Bv4_IRQ_PCF50606;
+               /* Fix up pcf50606 IRQ based on board info */
+               gta01_i2c_devs[2].irq = GTA01_IRQ_PCF50606;
                gta01_led_resources[0].start =
                        gta01_led_resources[0].end = GTA01Bv4_GPIO_VIBRATOR_ON;
                break;
        }
        mangle_pmu_pdata_by_system_rev();
-       platform_device_register(&gta01_pmu_dev);
        platform_device_register(&gta01_led_dev);
 
        platform_add_devices(gta01_devices, ARRAY_SIZE(gta01_devices));
-- 
1.5.4.3


Reply via email to