@@ -755,7 +755,7 @@ int pinctrl_get_group_selector(struct pinctrl_dev *pctldev,
return -EINVAL;
}
-bool pinctrl_gpio_can_use_line(unsigned gpio)
+bool pinctrl_gpio_can_use_line_new(struct gpio_chip *gc, unsigned int offset)
{
struct pinctrl_dev *pctldev;
struct pinctrl_gpio_range *range;
@@ -767,13 +767,13 @@ bool pinctrl_gpio_can_use_line(unsigned gpio)
* we're probably dealing with GPIO driver
* without a backing pin controller - bail out.
*/
- if (pinctrl_get_device_gpio_range(gpio, &pctldev, &range))
+ if (pinctrl_get_device_gpio_range(gc->base + offset, &pctldev, &range))
return true;
mutex_lock(&pctldev->mutex);
/* Convert to the pin controllers number space */
- pin = gpio_to_pin(range, gpio);
+ pin = gpio_to_pin(range, gc->base + offset);
result = pinmux_can_be_used_for_gpio(pctldev, pin);
@@ -781,12 +781,6 @@ bool pinctrl_gpio_can_use_line(unsigned gpio)
return result;
}
-EXPORT_SYMBOL_GPL(pinctrl_gpio_can_use_line);
-
-bool pinctrl_gpio_can_use_line_new(struct gpio_chip *gc, unsigned int offset)
-{
- return pinctrl_gpio_can_use_line(gc->base + offset);
-}
EXPORT_SYMBOL_GPL(pinctrl_gpio_can_use_line_new);
/* This function is deprecated and will be removed. Don't use. */
@@ -26,7 +26,6 @@ struct pinctrl_state;
#ifdef CONFIG_PINCTRL
/* External interface to pin control */
-bool pinctrl_gpio_can_use_line(unsigned gpio);
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);
@@ -73,11 +72,6 @@ static inline int pinctrl_pm_select_idle_state(struct device *dev)
#else /* !CONFIG_PINCTRL */
-static inline bool pinctrl_gpio_can_use_line(unsigned gpio)
-{
- return true;
-}
-
static inline bool
pinctrl_gpio_can_use_line_new(struct gpio_chip *gc, unsigned int offset)
{