From 6d7168a4b1cfcc96b873334560431364af0a54e8 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Wed, 19 Nov 2008 17:11:09 +0000 Subject: fix-vib-parentage-to-fiq.patch Vibrator relies on FIQ, represent that in device tree Signed-off-by: Andy Green --- arch/arm/mach-s3c2440/mach-gta02.c | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/arch/arm/mach-s3c2440/mach-gta02.c b/arch/arm/mach-s3c2440/mach-gta02.c index 51317b4a92c..fe99bca51a5 100644 --- a/arch/arm/mach-s3c2440/mach-gta02.c +++ b/arch/arm/mach-s3c2440/mach-gta02.c @@ -833,7 +833,22 @@ struct platform_device gta02_hdq_device = { }; #endif -/* FIQ */ +/* vibrator (child of FIQ) */ + +static struct resource gta02_vibrator_resources[] = { + [0] = { + .start = GTA02_GPIO_VIBRATOR_ON, + .end = GTA02_GPIO_VIBRATOR_ON, + }, +}; + +static struct platform_device gta02_vibrator_dev = { + .name = "neo1973-vibrator", + .num_resources = ARRAY_SIZE(gta02_vibrator_resources), + .resource = gta02_vibrator_resources, +}; + +/* FIQ, used PWM regs, so not child of PWM */ static void gta02_fiq_attach_child_devices(struct device *parent_device) { @@ -843,6 +858,8 @@ static void gta02_fiq_attach_child_devices(struct device *parent_device) case GTA02v6_SYSTEM_REV: gta02_hdq_device.dev.parent = parent_device; platform_device_register(>a02_hdq_device); + gta02_vibrator_dev.dev.parent = parent_device; + platform_device_register(>a02_vibrator_dev); break; default: break; @@ -1125,19 +1142,6 @@ static struct glamo_spigpio_info glamo_spigpio_cfg = { .board_info = gta02_spi_board_info, }; -static struct resource gta02_vibrator_resources[] = { - [0] = { - .start = GTA02_GPIO_VIBRATOR_ON, - .end = GTA02_GPIO_VIBRATOR_ON, - }, -}; - -static struct platform_device gta02_vibrator_dev = { - .name = "neo1973-vibrator", - .num_resources = ARRAY_SIZE(gta02_vibrator_resources), - .resource = gta02_vibrator_resources, -}; - /* SPI: Accelerometers attached to SPI of s3c244x */ /* -- cgit v1.2.3