pinctrl: remove pinctrl_gpio_request()

There are no more users of pinctrl_gpio_request() so remove it.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
Bartosz Golaszewski 2023-10-10 15:04:24 +02:00
parent a063e57adf
commit 699f078463
2 changed files with 22 additions and 35 deletions

View File

@ -783,34 +783,6 @@ bool pinctrl_gpio_can_use_line_new(struct gpio_chip *gc, unsigned int offset)
}
EXPORT_SYMBOL_GPL(pinctrl_gpio_can_use_line_new);
/* This function is deprecated and will be removed. Don't use. */
int pinctrl_gpio_request(unsigned gpio)
{
struct pinctrl_dev *pctldev;
struct pinctrl_gpio_range *range;
int ret;
int pin;
ret = pinctrl_get_device_gpio_range(gpio, &pctldev, &range);
if (ret) {
if (pinctrl_ready_for_gpio_range(gpio))
ret = 0;
return ret;
}
mutex_lock(&pctldev->mutex);
/* Convert to the pin controllers number space */
pin = gpio_to_pin(range, gpio);
ret = pinmux_request_gpio(pctldev, range, pin, gpio);
mutex_unlock(&pctldev->mutex);
return ret;
}
EXPORT_SYMBOL_GPL(pinctrl_gpio_request);
/**
* pinctrl_gpio_request_new() - request a single pin to be used as GPIO
* @gc: GPIO chip structure from the GPIO subsystem
@ -822,7 +794,28 @@ EXPORT_SYMBOL_GPL(pinctrl_gpio_request);
*/
int pinctrl_gpio_request_new(struct gpio_chip *gc, unsigned int offset)
{
return pinctrl_gpio_request(gc->base + offset);
struct pinctrl_gpio_range *range;
struct pinctrl_dev *pctldev;
int ret, pin;
ret = pinctrl_get_device_gpio_range(gc->base + offset, &pctldev,
&range);
if (ret) {
if (pinctrl_ready_for_gpio_range(gc->base + offset))
ret = 0;
return ret;
}
mutex_lock(&pctldev->mutex);
/* Convert to the pin controllers number space */
pin = gpio_to_pin(range, gc->base + offset);
ret = pinmux_request_gpio(pctldev, range, pin, gc->base + offset);
mutex_unlock(&pctldev->mutex);
return ret;
}
EXPORT_SYMBOL_GPL(pinctrl_gpio_request_new);

View File

@ -27,7 +27,6 @@ struct pinctrl_state;
/* External interface to pin control */
bool pinctrl_gpio_can_use_line_new(struct gpio_chip *gc, unsigned int offset);
int pinctrl_gpio_request(unsigned gpio);
int pinctrl_gpio_request_new(struct gpio_chip *gc, unsigned int offset);
void pinctrl_gpio_free(unsigned gpio);
void pinctrl_gpio_free_new(struct gpio_chip *gc, unsigned int offset);
@ -78,11 +77,6 @@ pinctrl_gpio_can_use_line_new(struct gpio_chip *gc, unsigned int offset)
return true;
}
static inline int pinctrl_gpio_request(unsigned gpio)
{
return 0;
}
static inline int
pinctrl_gpio_request_new(struct gpio_chip *gc, unsigned int offset)
{