pinctrl: Add third argument label for pinctrl_gpio_request() function

This change allows to use pinctrl_gpio_request() function as a direct
pointer for dm_gpio_ops's .request callback.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
This commit is contained in:
Pali Rohár 2022-07-25 13:56:11 +02:00 committed by Stefan Roese
parent 319b62880c
commit a1de1035b2
3 changed files with 5 additions and 3 deletions

View file

@ -133,7 +133,7 @@ static int rcar_gpio_get_function(struct udevice *dev, unsigned offset)
static int rcar_gpio_request(struct udevice *dev, unsigned offset,
const char *label)
{
return pinctrl_gpio_request(dev, offset);
return pinctrl_gpio_request(dev, offset, label);
}
static int rcar_gpio_free(struct udevice *dev, unsigned offset)

View file

@ -222,9 +222,10 @@ pinctrl_gpio_get_pinctrl_and_offset(struct udevice *dev, unsigned offset,
*
* @dev: GPIO peripheral device
* @offset: the GPIO pin offset from the GPIO controller
* @label: the GPIO pin label
* @return: 0 on success, or negative error code on failure
*/
int pinctrl_gpio_request(struct udevice *dev, unsigned offset)
int pinctrl_gpio_request(struct udevice *dev, unsigned offset, const char *label)
{
const struct pinctrl_ops *ops;
struct udevice *pctldev;

View file

@ -611,10 +611,11 @@ int pinctrl_get_pin_name(struct udevice *dev, int selector, char *buf,
* pinctrl_gpio_request() - Request a single pin to be used as GPIO
* @dev: GPIO peripheral device
* @offset: GPIO pin offset from the GPIO controller
* @label: GPIO label
*
* Return: 0 on success, or negative error code on failure
*/
int pinctrl_gpio_request(struct udevice *dev, unsigned offset);
int pinctrl_gpio_request(struct udevice *dev, unsigned offset, const char *label);
/**
* pinctrl_gpio_free() - Free a single pin used as GPIO