LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] pinctrl: pinctrl-zynq: Add warning for not to use 'io-standard'
@ 2021-08-18  5:53 Sai Krishna Potthuri
  2021-08-18  6:00 ` Michal Simek
  0 siblings, 1 reply; 3+ messages in thread
From: Sai Krishna Potthuri @ 2021-08-18  5:53 UTC (permalink / raw)
  To: Linus Walleij, Michal Simek
  Cc: linux-arm-kernel, linux-kernel, linux-gpio, git, saikrishna12468,
	Sai Krishna Potthuri

This patch add warning message saying 'io-standard' property is deprecated
and instead use 'power-source' property for configuring power supplies.
This gives an indication for Zynq pinctrl users to migrate to use
'power-source' property.

Signed-off-by: Sai Krishna Potthuri <lakshmi.sai.krishna.potthuri@xilinx.com>
---
 drivers/pinctrl/pinctrl-zynq.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/pinctrl/pinctrl-zynq.c b/drivers/pinctrl/pinctrl-zynq.c
index a96af8a..5b269b6 100644
--- a/drivers/pinctrl/pinctrl-zynq.c
+++ b/drivers/pinctrl/pinctrl-zynq.c
@@ -1028,6 +1028,8 @@ static int zynq_pinconf_cfg_get(struct pinctrl_dev *pctldev,
 		break;
 	}
 	case PIN_CONFIG_IOSTANDARD:
+		dev_warn(pctldev->dev, "io-standard is deprecated, please use power-source");
+		fallthrough;
 	case PIN_CONFIG_POWER_SOURCE:
 		arg = zynq_pinconf_iostd_get(reg);
 		break;
@@ -1079,6 +1081,8 @@ static int zynq_pinconf_cfg_set(struct pinctrl_dev *pctldev,
 
 			break;
 		case PIN_CONFIG_IOSTANDARD:
+			dev_warn(pctldev->dev, "io-standard is deprecated, please use power-source");
+			fallthrough;
 		case PIN_CONFIG_POWER_SOURCE:
 			if (arg <= zynq_iostd_min || arg >= zynq_iostd_max) {
 				dev_warn(pctldev->dev,
-- 
2.1.1


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

* Re: [PATCH] pinctrl: pinctrl-zynq: Add warning for not to use 'io-standard'
  2021-08-18  5:53 [PATCH] pinctrl: pinctrl-zynq: Add warning for not to use 'io-standard' Sai Krishna Potthuri
@ 2021-08-18  6:00 ` Michal Simek
  2021-08-18 23:37   ` Linus Walleij
  0 siblings, 1 reply; 3+ messages in thread
From: Michal Simek @ 2021-08-18  6:00 UTC (permalink / raw)
  To: Sai Krishna Potthuri, Linus Walleij, Michal Simek
  Cc: linux-arm-kernel, linux-kernel, linux-gpio, git, saikrishna12468



On 8/18/21 7:53 AM, Sai Krishna Potthuri wrote:
> This patch add warning message saying 'io-standard' property is deprecated
> and instead use 'power-source' property for configuring power supplies.
> This gives an indication for Zynq pinctrl users to migrate to use
> 'power-source' property.
> 
> Signed-off-by: Sai Krishna Potthuri <lakshmi.sai.krishna.potthuri@xilinx.com>
> ---
>  drivers/pinctrl/pinctrl-zynq.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/pinctrl/pinctrl-zynq.c b/drivers/pinctrl/pinctrl-zynq.c
> index a96af8a..5b269b6 100644
> --- a/drivers/pinctrl/pinctrl-zynq.c
> +++ b/drivers/pinctrl/pinctrl-zynq.c
> @@ -1028,6 +1028,8 @@ static int zynq_pinconf_cfg_get(struct pinctrl_dev *pctldev,
>  		break;
>  	}
>  	case PIN_CONFIG_IOSTANDARD:
> +		dev_warn(pctldev->dev, "io-standard is deprecated, please use power-source");
> +		fallthrough;
>  	case PIN_CONFIG_POWER_SOURCE:
>  		arg = zynq_pinconf_iostd_get(reg);
>  		break;
> @@ -1079,6 +1081,8 @@ static int zynq_pinconf_cfg_set(struct pinctrl_dev *pctldev,
>  
>  			break;
>  		case PIN_CONFIG_IOSTANDARD:
> +			dev_warn(pctldev->dev, "io-standard is deprecated, please use power-source");
> +			fallthrough;
>  		case PIN_CONFIG_POWER_SOURCE:
>  			if (arg <= zynq_iostd_min || arg >= zynq_iostd_max) {
>  				dev_warn(pctldev->dev,
> 


Acked-by: Michal Simek <michal.simek@xilinx.com>

Linus: would be good to know how long we should keep the support for
this deprecated dt property.

Thanks,
Michal

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

* Re: [PATCH] pinctrl: pinctrl-zynq: Add warning for not to use 'io-standard'
  2021-08-18  6:00 ` Michal Simek
@ 2021-08-18 23:37   ` Linus Walleij
  0 siblings, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2021-08-18 23:37 UTC (permalink / raw)
  To: Michal Simek
  Cc: Sai Krishna Potthuri, Linux ARM, linux-kernel,
	open list:GPIO SUBSYSTEM, git, saikrishna12468

On Wed, Aug 18, 2021 at 8:00 AM Michal Simek <michal.simek@xilinx.com> wrote:

> Linus: would be good to know how long we should keep the support for
> this deprecated dt property.

We use the "noone hears the tree fall in an empty forest"-metric.
If no user suffers, we can drop it. Determining that requires some
kind of reasoning about when that happens, and then the maintainer
of the driver decides.

Yours,
Linus Walleij

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

end of thread, other threads:[~2021-08-18 23:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-18  5:53 [PATCH] pinctrl: pinctrl-zynq: Add warning for not to use 'io-standard' Sai Krishna Potthuri
2021-08-18  6:00 ` Michal Simek
2021-08-18 23:37   ` Linus Walleij

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).