aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2012-11-20 08:42:47 -0500
committerLinus Walleij <linus.walleij@linaro.org>2012-11-21 02:55:22 -0500
commit8604ac34eb19f7b02f8cf22c787fe30d96ad2651 (patch)
tree5706891598ca7c1ebd80741463d1b971c5139d09
parent387923c585ac68ff51e6bf673807438b5e5fdaf3 (diff)
pinctrl/u300/coh901: stop spawning pinctrl from GPIO
Let's stop spawning the pinctrl driver from the GPIO driver, we have these two mechanisms broken apart now, and they can each probe in isolation. If the GPIO driver cannot find its pin controller (pinctrl-u300), the pin controller core will tell it to defer probing. Reviewed-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r--arch/arm/mach-u300/core.c2
-rw-r--r--drivers/pinctrl/pinctrl-coh901.c6
-rw-r--r--include/linux/platform_data/pinctrl-coh901.h2
3 files changed, 1 insertions, 9 deletions
diff --git a/arch/arm/mach-u300/core.c b/arch/arm/mach-u300/core.c
index ce2de0d6f2e..ece8a2dfb81 100644
--- a/arch/arm/mach-u300/core.c
+++ b/arch/arm/mach-u300/core.c
@@ -1445,7 +1445,6 @@ static struct platform_device pinctrl_device = {
1445static struct u300_gpio_platform u300_gpio_plat = { 1445static struct u300_gpio_platform u300_gpio_plat = {
1446 .ports = 7, 1446 .ports = 7,
1447 .gpio_base = 0, 1447 .gpio_base = 0,
1448 .pinctrl_device = &pinctrl_device,
1449}; 1448};
1450 1449
1451static struct platform_device gpio_device = { 1450static struct platform_device gpio_device = {
@@ -1589,6 +1588,7 @@ static struct platform_device *platform_devs[] __initdata = {
1589 &i2c1_device, 1588 &i2c1_device,
1590 &keypad_device, 1589 &keypad_device,
1591 &rtc_device, 1590 &rtc_device,
1591 &pinctrl_device,
1592 &gpio_device, 1592 &gpio_device,
1593 &nand_device, 1593 &nand_device,
1594 &wdog_device, 1594 &wdog_device,
diff --git a/drivers/pinctrl/pinctrl-coh901.c b/drivers/pinctrl/pinctrl-coh901.c
index 04574308ea8..fbb37154471 100644
--- a/drivers/pinctrl/pinctrl-coh901.c
+++ b/drivers/pinctrl/pinctrl-coh901.c
@@ -816,11 +816,6 @@ static int __init u300_gpio_probe(struct platform_device *pdev)
816 goto err_no_chip; 816 goto err_no_chip;
817 } 817 }
818 818
819 /* Spawn pin controller device as child of the GPIO */
820 err = platform_device_register(plat->pinctrl_device);
821 if (err)
822 goto err_no_pinctrl;
823
824 /* 819 /*
825 * Add pinctrl pin ranges, the pin controller must be registered 820 * Add pinctrl pin ranges, the pin controller must be registered
826 * at this point 821 * at this point
@@ -839,7 +834,6 @@ static int __init u300_gpio_probe(struct platform_device *pdev)
839 return 0; 834 return 0;
840 835
841err_no_range: 836err_no_range:
842err_no_pinctrl:
843 err = gpiochip_remove(&gpio->chip); 837 err = gpiochip_remove(&gpio->chip);
844err_no_chip: 838err_no_chip:
845err_no_domain: 839err_no_domain:
diff --git a/include/linux/platform_data/pinctrl-coh901.h b/include/linux/platform_data/pinctrl-coh901.h
index 27a23b318ce..dfbc65d1048 100644
--- a/include/linux/platform_data/pinctrl-coh901.h
+++ b/include/linux/platform_data/pinctrl-coh901.h
@@ -13,12 +13,10 @@
13 * struct u300_gpio_platform - U300 GPIO platform data 13 * struct u300_gpio_platform - U300 GPIO platform data
14 * @ports: number of GPIO block ports 14 * @ports: number of GPIO block ports
15 * @gpio_base: first GPIO number for this block (use a free range) 15 * @gpio_base: first GPIO number for this block (use a free range)
16 * @pinctrl_device: pin control device to spawn as child
17 */ 16 */
18struct u300_gpio_platform { 17struct u300_gpio_platform {
19 u8 ports; 18 u8 ports;
20 int gpio_base; 19 int gpio_base;
21 struct platform_device *pinctrl_device;
22}; 20};
23 21
24#endif /* __MACH_U300_GPIO_U300_H */ 22#endif /* __MACH_U300_GPIO_U300_H */