gpio: msm: Make msmgpio a platform device
The gpio driver was not a true platform driver and hence wasn't
supported by device tree. This patch fixes that for non-DT targets
by making sure the device gets added early on during board init.
For DT-targets, adding the gpio-controller property for the device
makes sure the msmgpio device gets probed.
This change is done for all TLMM_v2 targets (msm8660 and future)
TLMM_V1 targets remain unaffected.
Change-Id: I8a55ab1e2af0366b3e6893b334ba2396d2a83190
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
diff --git a/arch/arm/mach-msm/devices-9615.c b/arch/arm/mach-msm/devices-9615.c
index 9f03878..fff8e0d 100644
--- a/arch/arm/mach-msm/devices-9615.c
+++ b/arch/arm/mach-msm/devices-9615.c
@@ -1372,6 +1372,10 @@
},
};
+struct platform_device msm_gpio_device = {
+ .name = "msmgpio",
+ .id = -1,
+};
void __init msm9615_device_init(void)
{
@@ -1382,7 +1386,6 @@
msm_rpmrs_levels[0].latency_us;
msm_android_usb_hsic_pdata.swfi_latency =
msm_rpmrs_levels[0].latency_us;
-
}
#define MSM_SHARED_RAM_PHYS 0x40000000