Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: ludovic.desroches@microchip.com (Ludovic Desroches)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] pinctrl: sunxi: Disable strict mode for old pinctrl drivers
Date: Thu, 7 Dec 2017 11:32:31 +0100	[thread overview]
Message-ID: <20171207103231.GL2451@rfolt0960.corp.atmel.com> (raw)
In-Reply-To: <b09cdfbf4c7546f299031c2923b9f8fcef881e3d.1507236823.git-series.maxime.ripard@free-electrons.com>

Hi,

On Thu, Oct 05, 2017 at 10:54:07PM +0200, Maxime Ripard wrote:
> Old pinctrl drivers will need to disable strict mode for various reasons,
> among which:
>   - Some DT will still have a pinctrl group for each GPIO used, which will
>     be rejected by pin_request. While we could remove those nodes, we still
>     have to deal with old DTs.
>   - Some GPIOs on these boards need to have their pin configuration changed
>     (for bias or current), and there's no clear migration path
> 
> Let's disable the strict mode on those SoCs so that there's no breakage.
> 

I revive this thread since I am facing the same issue. Did you find a way to
deal with it? I have not seen a new version of this set of patches, I may have
missed it.

Why you didn't choose to add an optionnal property to enforce the use of
the strict mode? I mean, with your solution, if there is a new DT with
an old pin controller, it won't benefit from the strict mode.

Ludovic

> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> ---
>  drivers/pinctrl/sunxi/pinctrl-sun4i-a10.c | 1 +
>  drivers/pinctrl/sunxi/pinctrl-sun5i.c     | 1 +
>  drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c | 1 +
>  drivers/pinctrl/sunxi/pinctrl-sun8i-a23.c | 1 +
>  drivers/pinctrl/sunxi/pinctrl-sun8i-a33.c | 1 +
>  drivers/pinctrl/sunxi/pinctrl-sun8i-h3.c  | 3 ++-
>  drivers/pinctrl/sunxi/pinctrl-sun9i-a80.c | 1 +
>  7 files changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/pinctrl/sunxi/pinctrl-sun4i-a10.c b/drivers/pinctrl/sunxi/pinctrl-sun4i-a10.c
> index f763d8d62d6e..295e48fc94bc 100644
> --- a/drivers/pinctrl/sunxi/pinctrl-sun4i-a10.c
> +++ b/drivers/pinctrl/sunxi/pinctrl-sun4i-a10.c
> @@ -1289,6 +1289,7 @@ static const struct sunxi_pinctrl_desc sun4i_a10_pinctrl_data = {
>  	.npins = ARRAY_SIZE(sun4i_a10_pins),
>  	.irq_banks = 1,
>  	.irq_read_needs_mux = true,
> +	.disable_strict_mode = true,
>  };
>  
>  static int sun4i_a10_pinctrl_probe(struct platform_device *pdev)
> diff --git a/drivers/pinctrl/sunxi/pinctrl-sun5i.c b/drivers/pinctrl/sunxi/pinctrl-sun5i.c
> index 47afd558b114..27ec99e81c4c 100644
> --- a/drivers/pinctrl/sunxi/pinctrl-sun5i.c
> +++ b/drivers/pinctrl/sunxi/pinctrl-sun5i.c
> @@ -713,6 +713,7 @@ static const struct sunxi_pinctrl_desc sun5i_pinctrl_data = {
>  	.pins = sun5i_pins,
>  	.npins = ARRAY_SIZE(sun5i_pins),
>  	.irq_banks = 1,
> +	.disable_strict_mode = true,
>  };
>  
>  static int sun5i_pinctrl_probe(struct platform_device *pdev)
> diff --git a/drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c b/drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c
> index 951a25c18815..82ffaf466892 100644
> --- a/drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c
> +++ b/drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c
> @@ -965,6 +965,7 @@ static const struct sunxi_pinctrl_desc sun6i_a31_pinctrl_data = {
>  	.pins = sun6i_a31_pins,
>  	.npins = ARRAY_SIZE(sun6i_a31_pins),
>  	.irq_banks = 4,
> +	.disable_strict_mode = true,
>  };
>  
>  static int sun6i_a31_pinctrl_probe(struct platform_device *pdev)
> diff --git a/drivers/pinctrl/sunxi/pinctrl-sun8i-a23.c b/drivers/pinctrl/sunxi/pinctrl-sun8i-a23.c
> index 721b6935baf3..402fd7d21e7b 100644
> --- a/drivers/pinctrl/sunxi/pinctrl-sun8i-a23.c
> +++ b/drivers/pinctrl/sunxi/pinctrl-sun8i-a23.c
> @@ -563,6 +563,7 @@ static const struct sunxi_pinctrl_desc sun8i_a23_pinctrl_data = {
>  	.pins = sun8i_a23_pins,
>  	.npins = ARRAY_SIZE(sun8i_a23_pins),
>  	.irq_banks = 3,
> +	.disable_strict_mode = true,
>  };
>  
>  static int sun8i_a23_pinctrl_probe(struct platform_device *pdev)
> diff --git a/drivers/pinctrl/sunxi/pinctrl-sun8i-a33.c b/drivers/pinctrl/sunxi/pinctrl-sun8i-a33.c
> index ef1e0bef4099..da387211a75e 100644
> --- a/drivers/pinctrl/sunxi/pinctrl-sun8i-a33.c
> +++ b/drivers/pinctrl/sunxi/pinctrl-sun8i-a33.c
> @@ -486,6 +486,7 @@ static const struct sunxi_pinctrl_desc sun8i_a33_pinctrl_data = {
>  	.npins = ARRAY_SIZE(sun8i_a33_pins),
>  	.irq_banks = 2,
>  	.irq_bank_base = 1,
> +	.disable_strict_mode = true,
>  };
>  
>  static int sun8i_a33_pinctrl_probe(struct platform_device *pdev)
> diff --git a/drivers/pinctrl/sunxi/pinctrl-sun8i-h3.c b/drivers/pinctrl/sunxi/pinctrl-sun8i-h3.c
> index 518a92df4418..d1719a738c20 100644
> --- a/drivers/pinctrl/sunxi/pinctrl-sun8i-h3.c
> +++ b/drivers/pinctrl/sunxi/pinctrl-sun8i-h3.c
> @@ -491,7 +491,8 @@ static const struct sunxi_pinctrl_desc sun8i_h3_pinctrl_data = {
>  	.pins = sun8i_h3_pins,
>  	.npins = ARRAY_SIZE(sun8i_h3_pins),
>  	.irq_banks = 2,
> -	.irq_read_needs_mux = true
> +	.irq_read_needs_mux = true,
> +	.disable_strict_mode = true,
>  };
>  
>  static int sun8i_h3_pinctrl_probe(struct platform_device *pdev)
> diff --git a/drivers/pinctrl/sunxi/pinctrl-sun9i-a80.c b/drivers/pinctrl/sunxi/pinctrl-sun9i-a80.c
> index bc14e954d7a2..472ef0d91b99 100644
> --- a/drivers/pinctrl/sunxi/pinctrl-sun9i-a80.c
> +++ b/drivers/pinctrl/sunxi/pinctrl-sun9i-a80.c
> @@ -721,6 +721,7 @@ static const struct sunxi_pinctrl_desc sun9i_a80_pinctrl_data = {
>  	.pins = sun9i_a80_pins,
>  	.npins = ARRAY_SIZE(sun9i_a80_pins),
>  	.irq_banks = 5,
> +	.disable_strict_mode = true,
>  };
>  
>  static int sun9i_a80_pinctrl_probe(struct platform_device *pdev)
> -- 
> git-series 0.9.1
> --
> To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2017-12-07 10:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-05 20:54 [PATCH 0/3] pinctrl: sunxi: Start to enforce the strict mode Maxime Ripard
2017-10-05 20:54 ` [PATCH 1/3] pinctrl: sunxi: Introduce the strict flag Maxime Ripard
2017-10-06  8:32   ` Chen-Yu Tsai
2017-10-05 20:54 ` [PATCH 2/3] pinctrl: sunxi: Disable strict mode for old pinctrl drivers Maxime Ripard
2017-10-06  8:34   ` Chen-Yu Tsai
2017-10-09  8:45     ` Maxime Ripard
2017-12-07 10:32   ` Ludovic Desroches [this message]
2017-10-05 20:54 ` [PATCH 3/3] pinctrl: sunxi: Enforce the strict mode by default Maxime Ripard
2017-10-06  8:34   ` Chen-Yu Tsai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171207103231.GL2451@rfolt0960.corp.atmel.com \
    --to=ludovic.desroches@microchip.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox