Skip to content

Commit

Permalink
treewide: rename pinctrl_gpio_direction_input_new()
Browse files Browse the repository at this point in the history
Now that pinctrl_gpio_direction_input() is no longer used, let's drop the
'_new' suffix from its improved variant.

Signed-off-by: Bartosz Golaszewski <[email protected]>
Acked-by: Linus Walleij <[email protected]>
  • Loading branch information
Bartosz Golaszewski committed Nov 4, 2023
1 parent 4fccb26 commit 315c46f
Show file tree
Hide file tree
Showing 26 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion drivers/gpio/gpio-mvebu.c
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ static int mvebu_gpio_direction_input(struct gpio_chip *chip, unsigned int pin)
* Check with the pinctrl driver whether this pin is usable as
* an input GPIO
*/
ret = pinctrl_gpio_direction_input_new(chip, pin);
ret = pinctrl_gpio_direction_input(chip, pin);
if (ret)
return ret;

Expand Down
2 changes: 1 addition & 1 deletion drivers/gpio/gpio-pxa.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ static int pxa_gpio_direction_input(struct gpio_chip *chip, unsigned offset)
int ret;

if (pxa_gpio_has_pinctrl()) {
ret = pinctrl_gpio_direction_input_new(chip, offset);
ret = pinctrl_gpio_direction_input(chip, offset);
if (ret)
return ret;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpio/gpio-rockchip.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ static int rockchip_gpio_set_direction(struct gpio_chip *chip,


if (input)
pinctrl_gpio_direction_input_new(chip, offset);
pinctrl_gpio_direction_input(chip, offset);
else
pinctrl_gpio_direction_output_new(chip, offset);

Expand Down
2 changes: 1 addition & 1 deletion drivers/gpio/gpio-tegra.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ static int tegra_gpio_direction_input(struct gpio_chip *chip,
tegra_gpio_mask_write(tgi, GPIO_MSK_OE(tgi, offset), offset, 0);
tegra_gpio_enable(tgi, offset);

ret = pinctrl_gpio_direction_input_new(chip, offset);
ret = pinctrl_gpio_direction_input(chip, offset);
if (ret < 0)
dev_err(tgi->dev,
"Failed to set pinctrl input direction of GPIO %d: %d",
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpio/gpio-vf610.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ static int vf610_gpio_direction_input(struct gpio_chip *chip, unsigned gpio)
vf610_gpio_writel(val, port->gpio_base + GPIO_PDDR);
}

return pinctrl_gpio_direction_input_new(chip, gpio);
return pinctrl_gpio_direction_input(chip, gpio);
}

static int vf610_gpio_direction_output(struct gpio_chip *chip, unsigned gpio,
Expand Down
2 changes: 1 addition & 1 deletion drivers/pinctrl/cirrus/pinctrl-cs42l43.c
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ static void cs42l43_gpio_set(struct gpio_chip *chip, unsigned int offset, int va

static int cs42l43_gpio_direction_in(struct gpio_chip *chip, unsigned int offset)
{
return pinctrl_gpio_direction_input_new(chip, offset);
return pinctrl_gpio_direction_input(chip, offset);
}

static int cs42l43_gpio_direction_out(struct gpio_chip *chip,
Expand Down
6 changes: 3 additions & 3 deletions drivers/pinctrl/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -874,19 +874,19 @@ static int pinctrl_gpio_direction(unsigned gpio, bool input)
}

/**
* pinctrl_gpio_direction_input_new() - request a GPIO pin to go into input mode
* pinctrl_gpio_direction_input() - request a GPIO pin to go into input mode
* @gc: GPIO chip structure from the GPIO subsystem
* @offset: hardware offset of the GPIO relative to the controller
*
* This function should *ONLY* be used from gpiolib-based GPIO drivers,
* as part of their gpio_direction_input() semantics, platforms and individual
* drivers shall *NOT* touch pin control GPIO calls.
*/
int pinctrl_gpio_direction_input_new(struct gpio_chip *gc, unsigned int offset)
int pinctrl_gpio_direction_input(struct gpio_chip *gc, unsigned int offset)
{
return pinctrl_gpio_direction(gc->base + offset, true);
}
EXPORT_SYMBOL_GPL(pinctrl_gpio_direction_input_new);
EXPORT_SYMBOL_GPL(pinctrl_gpio_direction_input);

/**
* pinctrl_gpio_direction_output_new() - request a GPIO pin to go into output
Expand Down
2 changes: 1 addition & 1 deletion drivers/pinctrl/intel/pinctrl-cherryview.c
Original file line number Diff line number Diff line change
Expand Up @@ -1148,7 +1148,7 @@ static int chv_gpio_get_direction(struct gpio_chip *chip, unsigned int offset)

static int chv_gpio_direction_input(struct gpio_chip *chip, unsigned int offset)
{
return pinctrl_gpio_direction_input_new(chip, offset);
return pinctrl_gpio_direction_input(chip, offset);
}

static int chv_gpio_direction_output(struct gpio_chip *chip, unsigned int offset,
Expand Down
2 changes: 1 addition & 1 deletion drivers/pinctrl/intel/pinctrl-intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -992,7 +992,7 @@ static int intel_gpio_get_direction(struct gpio_chip *chip, unsigned int offset)

static int intel_gpio_direction_input(struct gpio_chip *chip, unsigned int offset)
{
return pinctrl_gpio_direction_input_new(chip, offset);
return pinctrl_gpio_direction_input(chip, offset);
}

static int intel_gpio_direction_output(struct gpio_chip *chip, unsigned int offset,
Expand Down
2 changes: 1 addition & 1 deletion drivers/pinctrl/intel/pinctrl-lynxpoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ static void lp_gpio_set(struct gpio_chip *chip, unsigned int offset, int value)

static int lp_gpio_direction_input(struct gpio_chip *chip, unsigned int offset)
{
return pinctrl_gpio_direction_input_new(chip, offset);
return pinctrl_gpio_direction_input(chip, offset);
}

static int lp_gpio_direction_output(struct gpio_chip *chip, unsigned int offset,
Expand Down
2 changes: 1 addition & 1 deletion drivers/pinctrl/mediatek/pinctrl-moore.c
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ static void mtk_gpio_set(struct gpio_chip *chip, unsigned int gpio, int value)

static int mtk_gpio_direction_input(struct gpio_chip *chip, unsigned int gpio)
{
return pinctrl_gpio_direction_input_new(chip, gpio);
return pinctrl_gpio_direction_input(chip, gpio);
}

static int mtk_gpio_direction_output(struct gpio_chip *chip, unsigned int gpio,
Expand Down
2 changes: 1 addition & 1 deletion drivers/pinctrl/mediatek/pinctrl-mtk-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@ static const struct pinmux_ops mtk_pmx_ops = {
static int mtk_gpio_direction_input(struct gpio_chip *chip,
unsigned offset)
{
return pinctrl_gpio_direction_input_new(chip, offset);
return pinctrl_gpio_direction_input(chip, offset);
}

static int mtk_gpio_direction_output(struct gpio_chip *chip,
Expand Down
2 changes: 1 addition & 1 deletion drivers/pinctrl/mediatek/pinctrl-paris.c
Original file line number Diff line number Diff line change
Expand Up @@ -916,7 +916,7 @@ static int mtk_gpio_direction_input(struct gpio_chip *chip, unsigned int gpio)
if (gpio >= hw->soc->npins)
return -EINVAL;

return pinctrl_gpio_direction_input_new(chip, gpio);
return pinctrl_gpio_direction_input(chip, gpio);
}

static int mtk_gpio_direction_output(struct gpio_chip *chip, unsigned int gpio,
Expand Down
2 changes: 1 addition & 1 deletion drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ static int npcmgpio_direction_input(struct gpio_chip *chip, unsigned int offset)
struct npcm7xx_gpio *bank = gpiochip_get_data(chip);
int ret;

ret = pinctrl_gpio_direction_input_new(chip, offset);
ret = pinctrl_gpio_direction_input(chip, offset);
if (ret)
return ret;

Expand Down
2 changes: 1 addition & 1 deletion drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ static int npcmgpio_direction_input(struct gpio_chip *chip, unsigned int offset)
struct npcm8xx_gpio *bank = gpiochip_get_data(chip);
int ret;

ret = pinctrl_gpio_direction_input_new(chip, offset);
ret = pinctrl_gpio_direction_input(chip, offset);
if (ret)
return ret;

Expand Down
2 changes: 1 addition & 1 deletion drivers/pinctrl/pinctrl-as3722.c
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ static void as3722_gpio_set(struct gpio_chip *chip, unsigned offset,

static int as3722_gpio_direction_input(struct gpio_chip *chip, unsigned offset)
{
return pinctrl_gpio_direction_input_new(chip, offset);
return pinctrl_gpio_direction_input(chip, offset);
}

static int as3722_gpio_direction_output(struct gpio_chip *chip,
Expand Down
2 changes: 1 addition & 1 deletion drivers/pinctrl/pinctrl-axp209.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ static int axp20x_gpio_get_reg(unsigned int offset)

static int axp20x_gpio_input(struct gpio_chip *chip, unsigned int offset)
{
return pinctrl_gpio_direction_input_new(chip, offset);
return pinctrl_gpio_direction_input(chip, offset);
}

static int axp20x_gpio_get(struct gpio_chip *chip, unsigned int offset)
Expand Down
2 changes: 1 addition & 1 deletion drivers/pinctrl/pinctrl-cy8c95x0.c
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ static int cy8c95x0_read_regs_mask(struct cy8c95x0_pinctrl *chip, int reg,

static int cy8c95x0_gpio_direction_input(struct gpio_chip *gc, unsigned int off)
{
return pinctrl_gpio_direction_input_new(gc, off);
return pinctrl_gpio_direction_input(gc, off);
}

static int cy8c95x0_gpio_direction_output(struct gpio_chip *gc,
Expand Down
2 changes: 1 addition & 1 deletion drivers/pinctrl/pinctrl-ingenic.c
Original file line number Diff line number Diff line change
Expand Up @@ -3563,7 +3563,7 @@ static int ingenic_gpio_get(struct gpio_chip *gc, unsigned int offset)
static int ingenic_gpio_direction_input(struct gpio_chip *gc,
unsigned int offset)
{
return pinctrl_gpio_direction_input_new(gc, offset);
return pinctrl_gpio_direction_input(gc, offset);
}

static int ingenic_gpio_direction_output(struct gpio_chip *gc,
Expand Down
2 changes: 1 addition & 1 deletion drivers/pinctrl/pinctrl-ocelot.c
Original file line number Diff line number Diff line change
Expand Up @@ -1779,7 +1779,7 @@ static int ocelot_gpio_get_direction(struct gpio_chip *chip,
static int ocelot_gpio_direction_input(struct gpio_chip *chip,
unsigned int offset)
{
return pinctrl_gpio_direction_input_new(chip, offset);
return pinctrl_gpio_direction_input(chip, offset);
}

static int ocelot_gpio_direction_output(struct gpio_chip *chip,
Expand Down
2 changes: 1 addition & 1 deletion drivers/pinctrl/pinctrl-rk805.c
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ static void rk805_gpio_set(struct gpio_chip *chip,
static int rk805_gpio_direction_input(struct gpio_chip *chip,
unsigned int offset)
{
return pinctrl_gpio_direction_input_new(chip, offset);
return pinctrl_gpio_direction_input(chip, offset);
}

static int rk805_gpio_direction_output(struct gpio_chip *chip,
Expand Down
2 changes: 1 addition & 1 deletion drivers/pinctrl/pinctrl-st.c
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ static void st_gpio_set(struct gpio_chip *chip, unsigned offset, int value)

static int st_gpio_direction_input(struct gpio_chip *chip, unsigned offset)
{
pinctrl_gpio_direction_input_new(chip, offset);
pinctrl_gpio_direction_input(chip, offset);

return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/pinctrl/renesas/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ static void gpio_pin_set_value(struct sh_pfc_chip *chip, unsigned offset,

static int gpio_pin_direction_input(struct gpio_chip *gc, unsigned offset)
{
return pinctrl_gpio_direction_input_new(gc, offset);
return pinctrl_gpio_direction_input(gc, offset);
}

static int gpio_pin_direction_output(struct gpio_chip *gc, unsigned offset,
Expand Down
2 changes: 1 addition & 1 deletion drivers/pinctrl/stm32/pinctrl-stm32.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ static void stm32_gpio_set(struct gpio_chip *chip, unsigned offset, int value)

static int stm32_gpio_direction_input(struct gpio_chip *chip, unsigned offset)
{
return pinctrl_gpio_direction_input_new(chip, offset);
return pinctrl_gpio_direction_input(chip, offset);
}

static int stm32_gpio_direction_output(struct gpio_chip *chip,
Expand Down
2 changes: 1 addition & 1 deletion drivers/pinctrl/vt8500/pinctrl-wmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ static void wmt_gpio_set_value(struct gpio_chip *chip, unsigned offset,

static int wmt_gpio_direction_input(struct gpio_chip *chip, unsigned offset)
{
return pinctrl_gpio_direction_input_new(chip, offset);
return pinctrl_gpio_direction_input(chip, offset);
}

static int wmt_gpio_direction_output(struct gpio_chip *chip, unsigned offset,
Expand Down
6 changes: 3 additions & 3 deletions include/linux/pinctrl/consumer.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ struct pinctrl_state;
bool pinctrl_gpio_can_use_line(struct gpio_chip *gc, unsigned int offset);
int pinctrl_gpio_request(struct gpio_chip *gc, unsigned int offset);
void pinctrl_gpio_free(struct gpio_chip *gc, unsigned int offset);
int pinctrl_gpio_direction_input_new(struct gpio_chip *gc,
unsigned int offset);
int pinctrl_gpio_direction_input(struct gpio_chip *gc,
unsigned int offset);
int pinctrl_gpio_direction_output_new(struct gpio_chip *gc,
unsigned int offset);
int pinctrl_gpio_set_config_new(struct gpio_chip *gc, unsigned int offset,
Expand Down Expand Up @@ -85,7 +85,7 @@ pinctrl_gpio_free(struct gpio_chip *gc, unsigned int offset)
}

static inline int
pinctrl_gpio_direction_input_new(struct gpio_chip *gc, unsigned int offset)
pinctrl_gpio_direction_input(struct gpio_chip *gc, unsigned int offset)
{
return 0;
}
Expand Down

0 comments on commit 315c46f

Please sign in to comment.