Commit dc143480 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'gpio-pinctrl-updates-for-v6.7-rc1' of...

Merge tag 'gpio-pinctrl-updates-for-v6.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux

Pull gpio/pinctrl updates from Bartosz Golaszewski:
 "The bulk of it is a rework of the glue layer between pinctrl and GPIO.
  We changed the signature of GPIO helpers for pinctrl to taking the
  gpio_chip/offset pair as arguments instead of using the deprecated
  global GPIO numberspace.

  The last little bit is removing the gpiochip_find() function as it now
  has no more users in-tree.

  Summary:

   - rework the GPIO-to-pinctrl glue code to stop using the deprecated
     global GPIO numberspace

   - remove now unused wrappers around pinctrl GPIO helpers from drivers

   - remove gpiochip_find() as it has no more users"

* tag 'gpio-pinctrl-updates-for-v6.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: (70 commits)
  pinctrl: tegra: drop the wrapper around pinctrl_gpio_request()
  pinctrl: em: drop the wrapper around pinctrl_gpio_request()
  pinctrl: nuvoton: npcm8xx: drop wrappers around pinctrl_gpio_request/free()
  pinctrl: nuvoton: npcm7xx: drop wrappers around pinctrl_gpio_request/free()
  pinctrl: stm32: drop wrappers around pinctrl_gpio_free/input()
  pinctrl: starfive: jh7110: drop wrappers around pinctrl_gpio_request/free()
  pinctrl: starfive: jh7100: drop wrappers around pinctrl_gpio_request/free()
  pinctrl: ocelot: drop the wrapper around pinctrl_gpio_direction_input()
  pinctrl: cirrus: drop the wrapper around pinctrl_gpio_direction_input()
  pinctrl: mediatek: common: drop the wrappers around pinctrl_gpio_direction_input()
  pinctrl: mediatek: moore: drop the wrappers around pinctrl_gpio_direction_input()
  pinctrl: rk805: drop the wrapper around pinctrl_gpio_direction_input()
  pinctrl: axp209: drop the wrapper around pinctrl_gpio_direction_input()
  pinctrl: vt8500: drop the wrapper around pinctrl_gpio_direction_input()
  pinctrl: as3722: drop the wrapper around pinctrl_gpio_direction_input()
  pinctrl: ingenic: drop the wrapper around pinctrl_gpio_direction_input()
  pinctrl: st: drop the wrapper around pinctrl_gpio_direction_input()
  pinctrl: change the signature of pinctrl_ready_for_gpio_range()
  pinctrl: change the signature of gpio_to_pin()
  pinctrl: change the signature of pinctrl_match_gpio_range()
  ...
parents 13d88ac5 5be55473
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -750,12 +750,12 @@ static int aspeed_gpio_request(struct gpio_chip *chip, unsigned int offset)
	if (!have_gpio(gpiochip_get_data(chip), offset))
		return -ENODEV;

	return pinctrl_gpio_request(chip->base + offset);
	return pinctrl_gpio_request(chip, offset);
}

static void aspeed_gpio_free(struct gpio_chip *chip, unsigned int offset)
{
	pinctrl_gpio_free(chip->base + offset);
	pinctrl_gpio_free(chip, offset);
}

static int usecs_to_cycles(struct aspeed_gpio *gpio, unsigned long usecs,
@@ -973,7 +973,7 @@ static int aspeed_gpio_set_config(struct gpio_chip *chip, unsigned int offset,
	else if (param == PIN_CONFIG_BIAS_DISABLE ||
			param == PIN_CONFIG_BIAS_PULL_DOWN ||
			param == PIN_CONFIG_DRIVE_STRENGTH)
		return pinctrl_gpio_set_config(chip->base + offset, config);
		return pinctrl_gpio_set_config(chip, offset, config);
	else if (param == PIN_CONFIG_DRIVE_OPEN_DRAIN ||
			param == PIN_CONFIG_DRIVE_OPEN_SOURCE)
		/* Return -ENOTSUPP to trigger emulation, as per datasheet */
+2 −7
Original line number Diff line number Diff line
@@ -227,14 +227,9 @@ static int em_gio_to_irq(struct gpio_chip *chip, unsigned offset)
	return irq_create_mapping(gpio_to_priv(chip)->irq_domain, offset);
}

static int em_gio_request(struct gpio_chip *chip, unsigned offset)
{
	return pinctrl_gpio_request(chip->base + offset);
}

static void em_gio_free(struct gpio_chip *chip, unsigned offset)
{
	pinctrl_gpio_free(chip->base + offset);
	pinctrl_gpio_free(chip, offset);

	/* Set the GPIO as an input to ensure that the next GPIO request won't
	* drive the GPIO pin as an output.
@@ -311,7 +306,7 @@ static int em_gio_probe(struct platform_device *pdev)
	gpio_chip->direction_output = em_gio_direction_output;
	gpio_chip->set = em_gio_set;
	gpio_chip->to_irq = em_gio_to_irq;
	gpio_chip->request = em_gio_request;
	gpio_chip->request = pinctrl_gpio_request;
	gpio_chip->free = em_gio_free;
	gpio_chip->label = name;
	gpio_chip->parent = dev;
+2 −2
Original line number Diff line number Diff line
@@ -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(chip->base + pin);
	ret = pinctrl_gpio_direction_input(chip, pin);
	if (ret)
		return ret;

@@ -366,7 +366,7 @@ static int mvebu_gpio_direction_output(struct gpio_chip *chip, unsigned int pin,
	 * Check with the pinctrl driver whether this pin is usable as
	 * an output GPIO
	 */
	ret = pinctrl_gpio_direction_output(chip->base + pin);
	ret = pinctrl_gpio_direction_output(chip, pin);
	if (ret)
		return ret;

+2 −2
Original line number Diff line number Diff line
@@ -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(chip->base + offset);
		ret = pinctrl_gpio_direction_input(chip, offset);
		if (ret)
			return ret;
	}
@@ -289,7 +289,7 @@ static int pxa_gpio_direction_output(struct gpio_chip *chip,
	writel_relaxed(mask, base + (value ? GPSR_OFFSET : GPCR_OFFSET));

	if (pxa_gpio_has_pinctrl()) {
		ret = pinctrl_gpio_direction_output(chip->base + offset);
		ret = pinctrl_gpio_direction_output(chip, offset);
		if (ret)
			return ret;
	}
+2 −2
Original line number Diff line number Diff line
@@ -275,7 +275,7 @@ static int gpio_rcar_request(struct gpio_chip *chip, unsigned offset)
		return error;
	}

	error = pinctrl_gpio_request(chip->base + offset);
	error = pinctrl_gpio_request(chip, offset);
	if (error)
		pm_runtime_put(p->dev);

@@ -286,7 +286,7 @@ static void gpio_rcar_free(struct gpio_chip *chip, unsigned offset)
{
	struct gpio_rcar_priv *p = gpiochip_get_data(chip);

	pinctrl_gpio_free(chip->base + offset);
	pinctrl_gpio_free(chip, offset);

	/*
	 * Set the GPIO as an input to ensure that the next GPIO request won't
Loading