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

From: Nicolas Ferre
Date: Mon Oct 10 2022 - 05:09:08 EST


On 07/10/2022 at 17:16, Ryan.Wanner@xxxxxxxxxxxxx wrote:
From: Ryan Wanner <Ryan.Wanner@xxxxxxxxxxxxx>

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@xxxxxxxxxxxxx>

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

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",


--
Nicolas Ferre