Skip to content

Commit

Permalink
pinctrl: at91-pio4: Add persist state case in config
Browse files Browse the repository at this point in the history
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>
Tested-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Link: https://lore.kernel.org/r/20221007151647.98222-3-Ryan.Wanner@microchip.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Ryan Wanner authored and Linus Walleij committed Oct 17, 2022
1 parent fcd7631 commit eaa4c8f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/pinctrl/pinctrl-at91-pio4.c
Original file line number Diff line number Diff line change
Expand Up @@ -775,6 +775,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;
}
Expand Down Expand Up @@ -883,6 +885,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",
Expand Down

0 comments on commit eaa4c8f

Please sign in to comment.