linux-samsung-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] i2c: s3c24xx: allow device core to setup default pin configuration
@ 2013-03-04 13:42 Thomas Abraham
  2013-03-04 14:03 ` Heiko Stübner
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Thomas Abraham @ 2013-03-04 13:42 UTC (permalink / raw)
  To: linux-i2c-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
  Cc: linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
	linus.walleij-QSEj5FYQhm4dnm+yROfE0A,
	kgene.kim-Sze3O3UU22JBDgjK7y7TUQ,
	ben-linux-elnMNo+KYs3YtjvyW6yDsg, heiko-4mtYJXux2i+zQB+pC5nmwQ,
	t.figa-Sze3O3UU22JBDgjK7y7TUQ, wsa-z923LK4zBo2bacvFa/9K2g

With device core now able to setup the default pin configuration,
the call to devm_pinctrl_get_select_default can be removed. And
the pin configuration code based on the deprecated Samsung specific
gpio bindings is also removed.

Signed-off-by: Thomas Abraham <thomas.abraham-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
---

Hi Heiko, Tomasz,

We have to make a choice on the path forward for pinctrl support
on Samsung platforms. We have three cases to deal with.

A. Samsung platforms without DT support.
B. Samsung platforms with DT support using old Samsung specific
   gpio bindings for pin-configuration (s3c24xx and s3x64xx).
C. Samsung platforms with DT support using using pinctrl based
   pin-configurations (Exynos4 and Exynos5).

For [A], we just let the platform specific callbacks handle the
pin setup. For [B] and [C], based on Linus Walleij's pin grab
by device core patch and subsequent discussions with him on the
mailing list, would it be acceptable that we discontinue support
for [B] in Samsung SoC device drivers. This will impact your
current DT work on s3c24xx and s3c64xx platforms. Pinctrl is
inevitable and we have to migrate to it. Instead of workarounds
to maintain support for [B], it might be better that we migrate
s3c24xx and s3c64xx platforms to pinctrl.

Please do let us know your opinion on this.

Thanks,
Thomas.

 drivers/i2c/busses/i2c-s3c2410.c |   67 +-------------------------------------
 1 files changed, 1 insertions(+), 66 deletions(-)

diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c
index f6b880b..703272c 100644
--- a/drivers/i2c/busses/i2c-s3c2410.c
+++ b/drivers/i2c/busses/i2c-s3c2410.c
@@ -37,8 +37,6 @@
 #include <linux/slab.h>
 #include <linux/io.h>
 #include <linux/of_i2c.h>
-#include <linux/of_gpio.h>
-#include <linux/pinctrl/consumer.h>
 
 #include <asm/irq.h>
 
@@ -84,8 +82,6 @@ struct s3c24xx_i2c {
 	struct i2c_adapter	adap;
 
 	struct s3c2410_platform_i2c	*pdata;
-	int			gpios[2];
-	struct pinctrl          *pctrl;
 #ifdef CONFIG_CPU_FREQ
 	struct notifier_block	freq_transition;
 #endif
@@ -856,57 +852,6 @@ static inline void s3c24xx_i2c_deregister_cpufreq(struct s3c24xx_i2c *i2c)
 }
 #endif
 
-#ifdef CONFIG_OF
-static int s3c24xx_i2c_parse_dt_gpio(struct s3c24xx_i2c *i2c)
-{
-	int idx, gpio, ret;
-
-	if (i2c->quirks & QUIRK_NO_GPIO)
-		return 0;
-
-	for (idx = 0; idx < 2; idx++) {
-		gpio = of_get_gpio(i2c->dev->of_node, idx);
-		if (!gpio_is_valid(gpio)) {
-			dev_err(i2c->dev, "invalid gpio[%d]: %d\n", idx, gpio);
-			goto free_gpio;
-		}
-		i2c->gpios[idx] = gpio;
-
-		ret = gpio_request(gpio, "i2c-bus");
-		if (ret) {
-			dev_err(i2c->dev, "gpio [%d] request failed\n", gpio);
-			goto free_gpio;
-		}
-	}
-	return 0;
-
-free_gpio:
-	while (--idx >= 0)
-		gpio_free(i2c->gpios[idx]);
-	return -EINVAL;
-}
-
-static void s3c24xx_i2c_dt_gpio_free(struct s3c24xx_i2c *i2c)
-{
-	unsigned int idx;
-
-	if (i2c->quirks & QUIRK_NO_GPIO)
-		return;
-
-	for (idx = 0; idx < 2; idx++)
-		gpio_free(i2c->gpios[idx]);
-}
-#else
-static int s3c24xx_i2c_parse_dt_gpio(struct s3c24xx_i2c *i2c)
-{
-	return 0;
-}
-
-static void s3c24xx_i2c_dt_gpio_free(struct s3c24xx_i2c *i2c)
-{
-}
-#endif
-
 /* s3c24xx_i2c_init
  *
  * initialise the controller, set the IO lines and frequency
@@ -1054,15 +999,9 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev)
 	i2c->adap.algo_data = i2c;
 	i2c->adap.dev.parent = &pdev->dev;
 
-	i2c->pctrl = devm_pinctrl_get_select_default(i2c->dev);
-
 	/* inititalise the i2c gpio lines */
-
-	if (i2c->pdata->cfg_gpio) {
+	if (i2c->pdata->cfg_gpio)
 		i2c->pdata->cfg_gpio(to_platform_device(i2c->dev));
-	} else if (IS_ERR(i2c->pctrl) && s3c24xx_i2c_parse_dt_gpio(i2c)) {
-		return -EINVAL;
-	}
 
 	/* initialise the i2c controller */
 
@@ -1140,10 +1079,6 @@ static int s3c24xx_i2c_remove(struct platform_device *pdev)
 	i2c_del_adapter(&i2c->adap);
 
 	clk_disable_unprepare(i2c->clk);
-
-	if (pdev->dev.of_node && IS_ERR(i2c->pctrl))
-		s3c24xx_i2c_dt_gpio_free(i2c);
-
 	return 0;
 }
 
-- 
1.6.6.rc2

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] i2c: s3c24xx: allow device core to setup default pin configuration
  2013-03-04 13:42 [PATCH] i2c: s3c24xx: allow device core to setup default pin configuration Thomas Abraham
@ 2013-03-04 14:03 ` Heiko Stübner
  2013-03-04 14:12   ` Thomas Abraham
  2013-03-07  6:16 ` Linus Walleij
  2013-03-21 10:00 ` Wolfram Sang
  2 siblings, 1 reply; 6+ messages in thread
From: Heiko Stübner @ 2013-03-04 14:03 UTC (permalink / raw)
  To: Thomas Abraham
  Cc: linux-i2c, linux-arm-kernel, linux-samsung-soc, linus.walleij,
	kgene.kim, ben-linux, t.figa, wsa

Hi Thomas,

Am Montag, 4. März 2013, 14:42:53 schrieb Thomas Abraham:
> With device core now able to setup the default pin configuration,
> the call to devm_pinctrl_get_select_default can be removed. And
> the pin configuration code based on the deprecated Samsung specific
> gpio bindings is also removed.
> 
> Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
> ---
> 
> Hi Heiko, Tomasz,
> 
> We have to make a choice on the path forward for pinctrl support
> on Samsung platforms. We have three cases to deal with.
> 
> A. Samsung platforms without DT support.
> B. Samsung platforms with DT support using old Samsung specific
>    gpio bindings for pin-configuration (s3c24xx and s3x64xx).
> C. Samsung platforms with DT support using using pinctrl based
>    pin-configurations (Exynos4 and Exynos5).
> 
> For [A], we just let the platform specific callbacks handle the
> pin setup. For [B] and [C], based on Linus Walleij's pin grab
> by device core patch and subsequent discussions with him on the
> mailing list, would it be acceptable that we discontinue support
> for [B] in Samsung SoC device drivers. This will impact your
> current DT work on s3c24xx and s3c64xx platforms. Pinctrl is
> inevitable and we have to migrate to it. Instead of workarounds
> to maintain support for [B], it might be better that we migrate
> s3c24xx and s3c64xx platforms to pinctrl.
> 
> Please do let us know your opinion on this.

As discusses in the other thread, I'm in favor of going forward this way and 
not to invest unnecessary energy in keeping the non-pinctrl stuff alive.

Pinctrl for at least the s3c2416 [0] is already on my playground-wishlist, but 
I'm still in the process of getting to know it.

So for this patch:
Acked-by: Heiko Stuebner <heiko@sntech.de>


Heiko


[0] in contrast to what the gpio-samsung driver implies, the s3c24xx pin banks 
are not uniform between SoCs, making this more difficult still :-)


>  drivers/i2c/busses/i2c-s3c2410.c |   67
> +------------------------------------- 1 files changed, 1 insertions(+),
> 66 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-s3c2410.c
> b/drivers/i2c/busses/i2c-s3c2410.c index f6b880b..703272c 100644
> --- a/drivers/i2c/busses/i2c-s3c2410.c
> +++ b/drivers/i2c/busses/i2c-s3c2410.c
> @@ -37,8 +37,6 @@
>  #include <linux/slab.h>
>  #include <linux/io.h>
>  #include <linux/of_i2c.h>
> -#include <linux/of_gpio.h>
> -#include <linux/pinctrl/consumer.h>
> 
>  #include <asm/irq.h>
> 
> @@ -84,8 +82,6 @@ struct s3c24xx_i2c {
>  	struct i2c_adapter	adap;
> 
>  	struct s3c2410_platform_i2c	*pdata;
> -	int			gpios[2];
> -	struct pinctrl          *pctrl;
>  #ifdef CONFIG_CPU_FREQ
>  	struct notifier_block	freq_transition;
>  #endif
> @@ -856,57 +852,6 @@ static inline void
> s3c24xx_i2c_deregister_cpufreq(struct s3c24xx_i2c *i2c) }
>  #endif
> 
> -#ifdef CONFIG_OF
> -static int s3c24xx_i2c_parse_dt_gpio(struct s3c24xx_i2c *i2c)
> -{
> -	int idx, gpio, ret;
> -
> -	if (i2c->quirks & QUIRK_NO_GPIO)
> -		return 0;
> -
> -	for (idx = 0; idx < 2; idx++) {
> -		gpio = of_get_gpio(i2c->dev->of_node, idx);
> -		if (!gpio_is_valid(gpio)) {
> -			dev_err(i2c->dev, "invalid gpio[%d]: %d\n", idx, gpio);
> -			goto free_gpio;
> -		}
> -		i2c->gpios[idx] = gpio;
> -
> -		ret = gpio_request(gpio, "i2c-bus");
> -		if (ret) {
> -			dev_err(i2c->dev, "gpio [%d] request failed\n", gpio);
> -			goto free_gpio;
> -		}
> -	}
> -	return 0;
> -
> -free_gpio:
> -	while (--idx >= 0)
> -		gpio_free(i2c->gpios[idx]);
> -	return -EINVAL;
> -}
> -
> -static void s3c24xx_i2c_dt_gpio_free(struct s3c24xx_i2c *i2c)
> -{
> -	unsigned int idx;
> -
> -	if (i2c->quirks & QUIRK_NO_GPIO)
> -		return;
> -
> -	for (idx = 0; idx < 2; idx++)
> -		gpio_free(i2c->gpios[idx]);
> -}
> -#else
> -static int s3c24xx_i2c_parse_dt_gpio(struct s3c24xx_i2c *i2c)
> -{
> -	return 0;
> -}
> -
> -static void s3c24xx_i2c_dt_gpio_free(struct s3c24xx_i2c *i2c)
> -{
> -}
> -#endif
> -
>  /* s3c24xx_i2c_init
>   *
>   * initialise the controller, set the IO lines and frequency
> @@ -1054,15 +999,9 @@ static int s3c24xx_i2c_probe(struct platform_device
> *pdev) i2c->adap.algo_data = i2c;
>  	i2c->adap.dev.parent = &pdev->dev;
> 
> -	i2c->pctrl = devm_pinctrl_get_select_default(i2c->dev);
> -
>  	/* inititalise the i2c gpio lines */
> -
> -	if (i2c->pdata->cfg_gpio) {
> +	if (i2c->pdata->cfg_gpio)
>  		i2c->pdata->cfg_gpio(to_platform_device(i2c->dev));
> -	} else if (IS_ERR(i2c->pctrl) && s3c24xx_i2c_parse_dt_gpio(i2c)) {
> -		return -EINVAL;
> -	}
> 
>  	/* initialise the i2c controller */
> 
> @@ -1140,10 +1079,6 @@ static int s3c24xx_i2c_remove(struct platform_device
> *pdev) i2c_del_adapter(&i2c->adap);
> 
>  	clk_disable_unprepare(i2c->clk);
> -
> -	if (pdev->dev.of_node && IS_ERR(i2c->pctrl))
> -		s3c24xx_i2c_dt_gpio_free(i2c);
> -
>  	return 0;
>  }

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] i2c: s3c24xx: allow device core to setup default pin configuration
  2013-03-04 14:03 ` Heiko Stübner
@ 2013-03-04 14:12   ` Thomas Abraham
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Abraham @ 2013-03-04 14:12 UTC (permalink / raw)
  To: Heiko Stübner
  Cc: linux-i2c, linux-arm-kernel, linux-samsung-soc, linus.walleij,
	kgene.kim, ben-linux, t.figa, wsa

On 4 March 2013 19:33, Heiko Stübner <heiko@sntech.de> wrote:
> Hi Thomas,
>
> Am Montag, 4. März 2013, 14:42:53 schrieb Thomas Abraham:
>> With device core now able to setup the default pin configuration,
>> the call to devm_pinctrl_get_select_default can be removed. And
>> the pin configuration code based on the deprecated Samsung specific
>> gpio bindings is also removed.
>>
>> Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
>> ---
>>
>> Hi Heiko, Tomasz,
>>
>> We have to make a choice on the path forward for pinctrl support
>> on Samsung platforms. We have three cases to deal with.
>>
>> A. Samsung platforms without DT support.
>> B. Samsung platforms with DT support using old Samsung specific
>>    gpio bindings for pin-configuration (s3c24xx and s3x64xx).
>> C. Samsung platforms with DT support using using pinctrl based
>>    pin-configurations (Exynos4 and Exynos5).
>>
>> For [A], we just let the platform specific callbacks handle the
>> pin setup. For [B] and [C], based on Linus Walleij's pin grab
>> by device core patch and subsequent discussions with him on the
>> mailing list, would it be acceptable that we discontinue support
>> for [B] in Samsung SoC device drivers. This will impact your
>> current DT work on s3c24xx and s3c64xx platforms. Pinctrl is
>> inevitable and we have to migrate to it. Instead of workarounds
>> to maintain support for [B], it might be better that we migrate
>> s3c24xx and s3c64xx platforms to pinctrl.
>>
>> Please do let us know your opinion on this.
>
> As discusses in the other thread, I'm in favor of going forward this way and
> not to invest unnecessary energy in keeping the non-pinctrl stuff alive.
>
> Pinctrl for at least the s3c2416 [0] is already on my playground-wishlist, but
> I'm still in the process of getting to know it.
>
> So for this patch:
> Acked-by: Heiko Stuebner <heiko@sntech.de>
>
>
> Heiko
>
>
> [0] in contrast to what the gpio-samsung driver implies, the s3c24xx pin banks
> are not uniform between SoCs, making this more difficult still :-)

Hi Heiko,

Thanks for the Ack. If the common samsung pinctrl support
(pinctrl-samsung.c) is not well suited for s3c24xx platforms, we could
write a separate pinctrl driver for s3c24xx platforms. But I guess we
might be able to support s3c24xx which some changes to existing code.
If there is anything that I can help with here, please do let me know.

Thanks,
Thomas.

>
>
>>  drivers/i2c/busses/i2c-s3c2410.c |   67
>> +------------------------------------- 1 files changed, 1 insertions(+),
>> 66 deletions(-)
>>
>> diff --git a/drivers/i2c/busses/i2c-s3c2410.c
>> b/drivers/i2c/busses/i2c-s3c2410.c index f6b880b..703272c 100644
>> --- a/drivers/i2c/busses/i2c-s3c2410.c
>> +++ b/drivers/i2c/busses/i2c-s3c2410.c
>> @@ -37,8 +37,6 @@
>>  #include <linux/slab.h>
>>  #include <linux/io.h>
>>  #include <linux/of_i2c.h>
>> -#include <linux/of_gpio.h>
>> -#include <linux/pinctrl/consumer.h>
>>
>>  #include <asm/irq.h>
>>
>> @@ -84,8 +82,6 @@ struct s3c24xx_i2c {
>>       struct i2c_adapter      adap;
>>
>>       struct s3c2410_platform_i2c     *pdata;
>> -     int                     gpios[2];
>> -     struct pinctrl          *pctrl;
>>  #ifdef CONFIG_CPU_FREQ
>>       struct notifier_block   freq_transition;
>>  #endif
>> @@ -856,57 +852,6 @@ static inline void
>> s3c24xx_i2c_deregister_cpufreq(struct s3c24xx_i2c *i2c) }
>>  #endif
>>
>> -#ifdef CONFIG_OF
>> -static int s3c24xx_i2c_parse_dt_gpio(struct s3c24xx_i2c *i2c)
>> -{
>> -     int idx, gpio, ret;
>> -
>> -     if (i2c->quirks & QUIRK_NO_GPIO)
>> -             return 0;
>> -
>> -     for (idx = 0; idx < 2; idx++) {
>> -             gpio = of_get_gpio(i2c->dev->of_node, idx);
>> -             if (!gpio_is_valid(gpio)) {
>> -                     dev_err(i2c->dev, "invalid gpio[%d]: %d\n", idx, gpio);
>> -                     goto free_gpio;
>> -             }
>> -             i2c->gpios[idx] = gpio;
>> -
>> -             ret = gpio_request(gpio, "i2c-bus");
>> -             if (ret) {
>> -                     dev_err(i2c->dev, "gpio [%d] request failed\n", gpio);
>> -                     goto free_gpio;
>> -             }
>> -     }
>> -     return 0;
>> -
>> -free_gpio:
>> -     while (--idx >= 0)
>> -             gpio_free(i2c->gpios[idx]);
>> -     return -EINVAL;
>> -}
>> -
>> -static void s3c24xx_i2c_dt_gpio_free(struct s3c24xx_i2c *i2c)
>> -{
>> -     unsigned int idx;
>> -
>> -     if (i2c->quirks & QUIRK_NO_GPIO)
>> -             return;
>> -
>> -     for (idx = 0; idx < 2; idx++)
>> -             gpio_free(i2c->gpios[idx]);
>> -}
>> -#else
>> -static int s3c24xx_i2c_parse_dt_gpio(struct s3c24xx_i2c *i2c)
>> -{
>> -     return 0;
>> -}
>> -
>> -static void s3c24xx_i2c_dt_gpio_free(struct s3c24xx_i2c *i2c)
>> -{
>> -}
>> -#endif
>> -
>>  /* s3c24xx_i2c_init
>>   *
>>   * initialise the controller, set the IO lines and frequency
>> @@ -1054,15 +999,9 @@ static int s3c24xx_i2c_probe(struct platform_device
>> *pdev) i2c->adap.algo_data = i2c;
>>       i2c->adap.dev.parent = &pdev->dev;
>>
>> -     i2c->pctrl = devm_pinctrl_get_select_default(i2c->dev);
>> -
>>       /* inititalise the i2c gpio lines */
>> -
>> -     if (i2c->pdata->cfg_gpio) {
>> +     if (i2c->pdata->cfg_gpio)
>>               i2c->pdata->cfg_gpio(to_platform_device(i2c->dev));
>> -     } else if (IS_ERR(i2c->pctrl) && s3c24xx_i2c_parse_dt_gpio(i2c)) {
>> -             return -EINVAL;
>> -     }
>>
>>       /* initialise the i2c controller */
>>
>> @@ -1140,10 +1079,6 @@ static int s3c24xx_i2c_remove(struct platform_device
>> *pdev) i2c_del_adapter(&i2c->adap);
>>
>>       clk_disable_unprepare(i2c->clk);
>> -
>> -     if (pdev->dev.of_node && IS_ERR(i2c->pctrl))
>> -             s3c24xx_i2c_dt_gpio_free(i2c);
>> -
>>       return 0;
>>  }
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] i2c: s3c24xx: allow device core to setup default pin configuration
  2013-03-04 13:42 [PATCH] i2c: s3c24xx: allow device core to setup default pin configuration Thomas Abraham
  2013-03-04 14:03 ` Heiko Stübner
@ 2013-03-07  6:16 ` Linus Walleij
  2013-03-21 10:00 ` Wolfram Sang
  2 siblings, 0 replies; 6+ messages in thread
From: Linus Walleij @ 2013-03-07  6:16 UTC (permalink / raw)
  To: Thomas Abraham
  Cc: linux-i2c, linux-arm-kernel, linux-samsung-soc, kgene.kim,
	ben-linux, heiko, t.figa, wsa

On Mon, Mar 4, 2013 at 2:42 PM, Thomas Abraham
<thomas.abraham@linaro.org> wrote:

> With device core now able to setup the default pin configuration,
> the call to devm_pinctrl_get_select_default can be removed. And
> the pin configuration code based on the deprecated Samsung specific
> gpio bindings is also removed.
>
> Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] i2c: s3c24xx: allow device core to setup default pin configuration
  2013-03-04 13:42 [PATCH] i2c: s3c24xx: allow device core to setup default pin configuration Thomas Abraham
  2013-03-04 14:03 ` Heiko Stübner
  2013-03-07  6:16 ` Linus Walleij
@ 2013-03-21 10:00 ` Wolfram Sang
       [not found]   ` <20130321100032.GC19297-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
  2 siblings, 1 reply; 6+ messages in thread
From: Wolfram Sang @ 2013-03-21 10:00 UTC (permalink / raw)
  To: Thomas Abraham
  Cc: linux-i2c, linux-arm-kernel, linux-samsung-soc, linus.walleij,
	kgene.kim, ben-linux, heiko, t.figa

On Mon, Mar 04, 2013 at 07:12:53PM +0530, Thomas Abraham wrote:
> With device core now able to setup the default pin configuration,
> the call to devm_pinctrl_get_select_default can be removed. And
> the pin configuration code based on the deprecated Samsung specific
> gpio bindings is also removed.
> 
> Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
> ---
> 
> Hi Heiko, Tomasz,
> 
> We have to make a choice on the path forward for pinctrl support
> on Samsung platforms. We have three cases to deal with.
> 
> A. Samsung platforms without DT support.
> B. Samsung platforms with DT support using old Samsung specific
>    gpio bindings for pin-configuration (s3c24xx and s3x64xx).
> C. Samsung platforms with DT support using using pinctrl based
>    pin-configurations (Exynos4 and Exynos5).
> 
> For [A], we just let the platform specific callbacks handle the
> pin setup. For [B] and [C], based on Linus Walleij's pin grab
> by device core patch and subsequent discussions with him on the
> mailing list, would it be acceptable that we discontinue support
> for [B] in Samsung SoC device drivers. This will impact your
> current DT work on s3c24xx and s3c64xx platforms. Pinctrl is
> inevitable and we have to migrate to it. Instead of workarounds
> to maintain support for [B], it might be better that we migrate
> s3c24xx and s3c64xx platforms to pinctrl.
> 
> Please do let us know your opinion on this.

Dropping [B] sounds good, but I think it makes sense to wait with this
patch until pinctrl support for s3c24xx is in place?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] i2c: s3c24xx: allow device core to setup default pin configuration
       [not found]   ` <20130321100032.GC19297-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
@ 2013-03-21 10:50     ` Heiko Stübner
  0 siblings, 0 replies; 6+ messages in thread
From: Heiko Stübner @ 2013-03-21 10:50 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: Thomas Abraham, linux-i2c-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
	linus.walleij-QSEj5FYQhm4dnm+yROfE0A,
	kgene.kim-Sze3O3UU22JBDgjK7y7TUQ,
	ben-linux-elnMNo+KYs3YtjvyW6yDsg, t.figa-Sze3O3UU22JBDgjK7y7TUQ

Am Donnerstag, 21. März 2013, 11:00:32 schrieb Wolfram Sang:
> On Mon, Mar 04, 2013 at 07:12:53PM +0530, Thomas Abraham wrote:
> > With device core now able to setup the default pin configuration,
> > the call to devm_pinctrl_get_select_default can be removed. And
> > the pin configuration code based on the deprecated Samsung specific
> > gpio bindings is also removed.
> > 
> > Signed-off-by: Thomas Abraham <thomas.abraham-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> > ---
> > 
> > Hi Heiko, Tomasz,
> > 
> > We have to make a choice on the path forward for pinctrl support
> > on Samsung platforms. We have three cases to deal with.
> > 
> > A. Samsung platforms without DT support.
> > B. Samsung platforms with DT support using old Samsung specific
> > 
> >    gpio bindings for pin-configuration (s3c24xx and s3x64xx).
> > 
> > C. Samsung platforms with DT support using using pinctrl based
> > 
> >    pin-configurations (Exynos4 and Exynos5).
> > 
> > For [A], we just let the platform specific callbacks handle the
> > pin setup. For [B] and [C], based on Linus Walleij's pin grab
> > by device core patch and subsequent discussions with him on the
> > mailing list, would it be acceptable that we discontinue support
> > for [B] in Samsung SoC device drivers. This will impact your
> > current DT work on s3c24xx and s3c64xx platforms. Pinctrl is
> > inevitable and we have to migrate to it. Instead of workarounds
> > to maintain support for [B], it might be better that we migrate
> > s3c24xx and s3c64xx platforms to pinctrl.
> > 
> > Please do let us know your opinion on this.
> 
> Dropping [B] sounds good, but I think it makes sense to wait with this
> patch until pinctrl support for s3c24xx is in place?

s3c24xx does not currently have dt support in mainline at all and the non-dt 
init is not touched at all. Also it seems the legacy gpio based dt init does 
not work at all currently, because the pinctrl function are no-ops and 
therefore the legacy gpio init is never reached on such systems.

So I would vote for dropping [B]. I'm already working a bit on a pinctrl 
driver for s3c24xx, so when I reintroduce s3c24xx dt support again, it should 
already have pinctrl support then.


Heiko

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-03-21 10:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-04 13:42 [PATCH] i2c: s3c24xx: allow device core to setup default pin configuration Thomas Abraham
2013-03-04 14:03 ` Heiko Stübner
2013-03-04 14:12   ` Thomas Abraham
2013-03-07  6:16 ` Linus Walleij
2013-03-21 10:00 ` Wolfram Sang
     [not found]   ` <20130321100032.GC19297-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
2013-03-21 10:50     ` Heiko Stübner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).