Commit 82a040a8 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull pin control fixes from Linus Walleij:
 "Some pin control fixes for v6.6 which have been stacking up in my
  tree.

  Dmitry's fix to some locking in the core is the most substantial, that
  was a really neat fix.

  The rest is the usual assorted spray of minor driver fixes.

   - Drop some minor code causing warnings in the Lantiq driver

   - Fix out of bounds write in the Nuvoton driver

   - Fix lost IRQs with CONFIG_PM in the Starfive driver

   - Fix a locking issue in find_pinctrl()

   - Revert a regressive Tegra debug patch

   - Fix the Renesas RZN1 pin muxing"

* tag 'pinctrl-v6.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
  pinctrl: renesas: rzn1: Enable missing PINMUX
  Revert "pinctrl: tegra: Add support to display pin function"
  pinctrl: avoid unsafe code pattern in find_pinctrl()
  pinctrl: starfive: jh7110: Add system pm ops to save and restore context
  pinctrl: starfive: jh7110: Fix failure to set irq after CONFIG_PM is enabled
  pinctrl: nuvoton: wpcm450: fix out of bounds write
  pinctrl: lantiq: Remove unsued declaration ltq_pinctrl_unregister()
parents 40164485 f055ff23
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -20493,6 +20493,7 @@ F: include/dt-bindings/clock/starfive?jh71*.h
STARFIVE JH71X0 PINCTRL DRIVERS
M:	Emil Renner Berthing <kernel@esmil.dk>
M:	Jianlong Huang <jianlong.huang@starfivetech.com>
M:	Hal Feng <hal.feng@starfivetech.com>
L:	linux-gpio@vger.kernel.org
S:	Maintained
F:	Documentation/devicetree/bindings/pinctrl/starfive,jh71*.yaml
+9 −7
Original line number Diff line number Diff line
@@ -1022,17 +1022,20 @@ static int add_setting(struct pinctrl *p, struct pinctrl_dev *pctldev,

static struct pinctrl *find_pinctrl(struct device *dev)
{
	struct pinctrl *p;
	struct pinctrl *entry, *p = NULL;

	mutex_lock(&pinctrl_list_mutex);
	list_for_each_entry(p, &pinctrl_list, node)
		if (p->dev == dev) {
			mutex_unlock(&pinctrl_list_mutex);
			return p;

	list_for_each_entry(entry, &pinctrl_list, node) {
		if (entry->dev == dev) {
			p = entry;
			kref_get(&p->users);
			break;
		}
	}

	mutex_unlock(&pinctrl_list_mutex);
	return NULL;
	return p;
}

static void pinctrl_free(struct pinctrl *p, bool inlist);
@@ -1140,7 +1143,6 @@ struct pinctrl *pinctrl_get(struct device *dev)
	p = find_pinctrl(dev);
	if (p) {
		dev_dbg(dev, "obtain a copy of previously claimed pinctrl\n");
		kref_get(&p->users);
		return p;
	}

+3 −3
Original line number Diff line number Diff line
@@ -1062,13 +1062,13 @@ static int wpcm450_gpio_register(struct platform_device *pdev,
		if (ret < 0)
			return ret;

		gpio = &pctrl->gpio_bank[reg];
		gpio->pctrl = pctrl;

		if (reg >= WPCM450_NUM_BANKS)
			return dev_err_probe(dev, -EINVAL,
					     "GPIO index %d out of range!\n", reg);

		gpio = &pctrl->gpio_bank[reg];
		gpio->pctrl = pctrl;

		bank = &wpcm450_banks[reg];
		gpio->bank = bank;

+0 −1
Original line number Diff line number Diff line
@@ -198,5 +198,4 @@ enum ltq_pin {

extern int ltq_pinctrl_register(struct platform_device *pdev,
				   struct ltq_pinmux_info *info);
extern int ltq_pinctrl_unregister(struct platform_device *pdev);
#endif	/* __PINCTRL_LANTIQ_H */
+1 −0
Original line number Diff line number Diff line
@@ -235,6 +235,7 @@ config PINCTRL_RZN1
	depends on OF
	depends on ARCH_RZN1 || COMPILE_TEST
	select GENERIC_PINCONF
	select PINMUX
	help
	  This selects pinctrl driver for Renesas RZ/N1 devices.

Loading