diff mbox series

[2/2] pinctrl: at91-pio4: Add persist state case in config

Message ID 20221007151647.98222-3-Ryan.Wanner@microchip.com
State Accepted
Commit eaa4c8f953ba1d2eafb1c961aa9321beb71f21c9
Headers show
Series pinctrl:at91-pio4:add support for pullup/down | expand

Commit Message

Ryan Wanner Oct. 7, 2022, 3:16 p.m. UTC
From: Ryan Wanner <Ryan.Wanner@microchip.com>

Adding persist state case to atmel_conf_pin_config_group_set() function.
After adding configuration support for userspace gpiod api, there was an
extra flag PIN_CONFIG_PERSIST_STATE that was not passed in before.

Based on other drivers like TI drivers, added a switch case and return
ENOTSUPP in that case.

Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com>
---
 drivers/pinctrl/pinctrl-at91-pio4.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Nicolas Ferre Oct. 10, 2022, 9:08 a.m. UTC | #1
On 07/10/2022 at 17:16, Ryan.Wanner@microchip.com wrote:
> From: Ryan Wanner <Ryan.Wanner@microchip.com>
> 
> Adding persist state case to atmel_conf_pin_config_group_set() function.
> After adding configuration support for userspace gpiod api, there was an
> extra flag PIN_CONFIG_PERSIST_STATE that was not passed in before.
> 
> Based on other drivers like TI drivers, added a switch case and return
> ENOTSUPP in that case.
> 
> Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com>

Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>

Thanks, best regards,
   Nicolas

> ---
>   drivers/pinctrl/pinctrl-at91-pio4.c | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/pinctrl/pinctrl-at91-pio4.c b/drivers/pinctrl/pinctrl-at91-pio4.c
> index 13b77f1eb6e2..40f1b9397767 100644
> --- a/drivers/pinctrl/pinctrl-at91-pio4.c
> +++ b/drivers/pinctrl/pinctrl-at91-pio4.c
> @@ -780,6 +780,8 @@ static int atmel_conf_pin_config_group_get(struct pinctrl_dev *pctldev,
>   			return -EINVAL;
>   		arg = (res & ATMEL_PIO_DRVSTR_MASK) >> ATMEL_PIO_DRVSTR_OFFSET;
>   		break;
> +	case PIN_CONFIG_PERSIST_STATE:
> +		return -ENOTSUPP;
>   	default:
>   		return -ENOTSUPP;
>   	}
> @@ -888,6 +890,8 @@ static int atmel_conf_pin_config_group_set(struct pinctrl_dev *pctldev,
>   				dev_warn(pctldev->dev, "drive strength not updated (incorrect value)\n");
>   			}
>   			break;
> +		case PIN_CONFIG_PERSIST_STATE:
> +			return -ENOTSUPP;
>   		default:
>   			dev_warn(pctldev->dev,
>   				 "unsupported configuration parameter: %u\n",
diff mbox series

Patch

diff --git a/drivers/pinctrl/pinctrl-at91-pio4.c b/drivers/pinctrl/pinctrl-at91-pio4.c
index 13b77f1eb6e2..40f1b9397767 100644
--- a/drivers/pinctrl/pinctrl-at91-pio4.c
+++ b/drivers/pinctrl/pinctrl-at91-pio4.c
@@ -780,6 +780,8 @@  static int atmel_conf_pin_config_group_get(struct pinctrl_dev *pctldev,
 			return -EINVAL;
 		arg = (res & ATMEL_PIO_DRVSTR_MASK) >> ATMEL_PIO_DRVSTR_OFFSET;
 		break;
+	case PIN_CONFIG_PERSIST_STATE:
+		return -ENOTSUPP;
 	default:
 		return -ENOTSUPP;
 	}
@@ -888,6 +890,8 @@  static int atmel_conf_pin_config_group_set(struct pinctrl_dev *pctldev,
 				dev_warn(pctldev->dev, "drive strength not updated (incorrect value)\n");
 			}
 			break;
+		case PIN_CONFIG_PERSIST_STATE:
+			return -ENOTSUPP;
 		default:
 			dev_warn(pctldev->dev,
 				 "unsupported configuration parameter: %u\n",