瀏覽代碼

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>
Linus Walleij 13 年之前
父節點
當前提交
8604ac34eb
共有 3 個文件被更改,包括 1 次插入9 次删除
  1. 1 1
      arch/arm/mach-u300/core.c
  2. 0 6
      drivers/pinctrl/pinctrl-coh901.c
  3. 0 2
      include/linux/platform_data/pinctrl-coh901.h

+ 1 - 1
arch/arm/mach-u300/core.c

@@ -1445,7 +1445,6 @@ static struct platform_device pinctrl_device = {
 static struct u300_gpio_platform u300_gpio_plat = {
 static struct u300_gpio_platform u300_gpio_plat = {
 	.ports = 7,
 	.ports = 7,
 	.gpio_base = 0,
 	.gpio_base = 0,
-	.pinctrl_device = &pinctrl_device,
 };
 };
 
 
 static struct platform_device gpio_device = {
 static struct platform_device gpio_device = {
@@ -1589,6 +1588,7 @@ static struct platform_device *platform_devs[] __initdata = {
 	&i2c1_device,
 	&i2c1_device,
 	&keypad_device,
 	&keypad_device,
 	&rtc_device,
 	&rtc_device,
+	&pinctrl_device,
 	&gpio_device,
 	&gpio_device,
 	&nand_device,
 	&nand_device,
 	&wdog_device,
 	&wdog_device,

+ 0 - 6
drivers/pinctrl/pinctrl-coh901.c

@@ -816,11 +816,6 @@ static int __init u300_gpio_probe(struct platform_device *pdev)
 		goto err_no_chip;
 		goto err_no_chip;
 	}
 	}
 
 
-	/* Spawn pin controller device as child of the GPIO */
-	err = platform_device_register(plat->pinctrl_device);
-	if (err)
-		goto err_no_pinctrl;
-
 	/*
 	/*
 	 * Add pinctrl pin ranges, the pin controller must be registered
 	 * Add pinctrl pin ranges, the pin controller must be registered
 	 * at this point
 	 * at this point
@@ -839,7 +834,6 @@ static int __init u300_gpio_probe(struct platform_device *pdev)
 	return 0;
 	return 0;
 
 
 err_no_range:
 err_no_range:
-err_no_pinctrl:
 	err = gpiochip_remove(&gpio->chip);
 	err = gpiochip_remove(&gpio->chip);
 err_no_chip:
 err_no_chip:
 err_no_domain:
 err_no_domain:

+ 0 - 2
include/linux/platform_data/pinctrl-coh901.h

@@ -13,12 +13,10 @@
  * struct u300_gpio_platform - U300 GPIO platform data
  * struct u300_gpio_platform - U300 GPIO platform data
  * @ports: number of GPIO block ports
  * @ports: number of GPIO block ports
  * @gpio_base: first GPIO number for this block (use a free range)
  * @gpio_base: first GPIO number for this block (use a free range)
- * @pinctrl_device: pin control device to spawn as child
  */
  */
 struct u300_gpio_platform {
 struct u300_gpio_platform {
 	u8 ports;
 	u8 ports;
 	int gpio_base;
 	int gpio_base;
-	struct platform_device *pinctrl_device;
 };
 };
 
 
 #endif /* __MACH_U300_GPIO_U300_H */
 #endif /* __MACH_U300_GPIO_U300_H */