Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1b5caa3e authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull pin control fixes from Linus Walleij:
 "Here is a set of pin control fixes for the v4.6 series.

  A bit bigger than what I hoped for, but all fixes are confined to
  drivers, a few of them also targeted to stable.

  Summary:

   - On Super-H PFC (Renesas) controllers: only use dummies on legacy
     systems.  This fixes a serious ethernet regression on a Renesas
     board.
   - Pistachio: Fix errors in the pin table.
   - Allwinner SunXi: fix the external interrupts to work.
   - Intel: fix so the high level interrupts start working, and fix a
     spurious interrupt issue.
   - Qualcomm ipq4019: fix the number of GPIOs provided (bump to 100),
     correct register offsets and handle GPIO mode properly.
   - Revert the revert on the revert so that Xway has a .to_irq()
     callback again.
   - Minor fixes to errorpaths and debug info.
   - A MAINTAINERS update"

* tag 'pinctrl-v4.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
  Revert "Revert "pinctrl: lantiq: Implement gpio_chip.to_irq""
  pinctrl: qcom: ipq4019: fix register offsets
  pinctrl: qcom: ipq4019: fix the function enum for gpio mode
  pinctrl: qcom: ipq4019: set ngpios to correct value
  pinctrl: nomadik: fix pull debug print inversion
  MAINTAINERS: pinctrl: samsung: Add two new maintainers
  pinctrl: intel: implement gpio_irq_enable
  pinctrl: intel: make the high level interrupt working
  pinctrl: freescale: imx: fix bogus check of of_iomap() return value
  pinctrl: sunxi: Fix A33 external interrupts not working
  pinctrl: pistachio: fix mfio84-89 function description and pinmux.
  pinctrl: sh-pfc: only use dummy states for non-DT platforms
parents 62d2def9 e1641c9d
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -134,12 +134,12 @@ mfio80 ddr_debug, mips_trace_data, mips_debug
mfio81		dreq0, mips_trace_data, eth_debug
mfio82		dreq1, mips_trace_data, eth_debug
mfio83		mips_pll_lock, mips_trace_data, usb_debug
mfio84		sys_pll_lock, mips_trace_data, usb_debug
mfio85		wifi_pll_lock, mips_trace_data, sdhost_debug
mfio86		bt_pll_lock, mips_trace_data, sdhost_debug
mfio87		rpu_v_pll_lock, dreq2, socif_debug
mfio88		rpu_l_pll_lock, dreq3, socif_debug
mfio89		audio_pll_lock, dreq4, dreq5
mfio84		audio_pll_lock, mips_trace_data, usb_debug
mfio85		rpu_v_pll_lock, mips_trace_data, sdhost_debug
mfio86		rpu_l_pll_lock, mips_trace_data, sdhost_debug
mfio87		sys_pll_lock, dreq2, socif_debug
mfio88		wifi_pll_lock, dreq3, socif_debug
mfio89		bt_pll_lock, dreq4, dreq5
tck
trstn
tdi
+2 −0
Original line number Diff line number Diff line
@@ -8712,6 +8712,8 @@ F: drivers/pinctrl/sh-pfc/

PIN CONTROLLER - SAMSUNG
M:	Tomasz Figa <tomasz.figa@gmail.com>
M:	Krzysztof Kozlowski <k.kozlowski@samsung.com>
M:	Sylwester Nawrocki <s.nawrocki@samsung.com>
L:	linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
L:	linux-samsung-soc@vger.kernel.org (moderated for non-subscribers)
S:	Maintained
+8 −9
Original line number Diff line number Diff line
@@ -762,19 +762,18 @@ int imx_pinctrl_probe(struct platform_device *pdev,

	if (of_property_read_bool(dev_np, "fsl,input-sel")) {
		np = of_parse_phandle(dev_np, "fsl,input-sel", 0);
		if (np) {
		if (!np) {
			dev_err(&pdev->dev, "iomuxc fsl,input-sel property not found\n");
			return -EINVAL;
		}

		ipctl->input_sel_base = of_iomap(np, 0);
			if (IS_ERR(ipctl->input_sel_base)) {
		of_node_put(np);
		if (!ipctl->input_sel_base) {
			dev_err(&pdev->dev,
				"iomuxc input select base address not found\n");
				return PTR_ERR(ipctl->input_sel_base);
			}
		} else {
			dev_err(&pdev->dev, "iomuxc fsl,input-sel property not found\n");
			return -EINVAL;
			return -ENOMEM;
		}
		of_node_put(np);
	}

	imx_pinctrl_desc.name = dev_name(&pdev->dev);
+33 −2
Original line number Diff line number Diff line
@@ -665,6 +665,35 @@ static void intel_gpio_irq_ack(struct irq_data *d)
	spin_unlock(&pctrl->lock);
}

static void intel_gpio_irq_enable(struct irq_data *d)
{
	struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
	struct intel_pinctrl *pctrl = gpiochip_get_data(gc);
	const struct intel_community *community;
	unsigned pin = irqd_to_hwirq(d);
	unsigned long flags;

	spin_lock_irqsave(&pctrl->lock, flags);

	community = intel_get_community(pctrl, pin);
	if (community) {
		unsigned padno = pin_to_padno(community, pin);
		unsigned gpp_size = community->gpp_size;
		unsigned gpp_offset = padno % gpp_size;
		unsigned gpp = padno / gpp_size;
		u32 value;

		/* Clear interrupt status first to avoid unexpected interrupt */
		writel(BIT(gpp_offset), community->regs + GPI_IS + gpp * 4);

		value = readl(community->regs + community->ie_offset + gpp * 4);
		value |= BIT(gpp_offset);
		writel(value, community->regs + community->ie_offset + gpp * 4);
	}

	spin_unlock_irqrestore(&pctrl->lock, flags);
}

static void intel_gpio_irq_mask_unmask(struct irq_data *d, bool mask)
{
	struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
@@ -741,7 +770,8 @@ static int intel_gpio_irq_type(struct irq_data *d, unsigned type)
		value |= PADCFG0_RXINV;
	} else if (type & IRQ_TYPE_EDGE_RISING) {
		value |= PADCFG0_RXEVCFG_EDGE << PADCFG0_RXEVCFG_SHIFT;
	} else if (type & IRQ_TYPE_LEVEL_LOW) {
	} else if (type & IRQ_TYPE_LEVEL_MASK) {
		if (type & IRQ_TYPE_LEVEL_LOW)
			value |= PADCFG0_RXINV;
	} else {
		value |= PADCFG0_RXEVCFG_DISABLED << PADCFG0_RXEVCFG_SHIFT;
@@ -852,6 +882,7 @@ static irqreturn_t intel_gpio_irq(int irq, void *data)

static struct irq_chip intel_gpio_irqchip = {
	.name = "intel-gpio",
	.irq_enable = intel_gpio_irq_enable,
	.irq_ack = intel_gpio_irq_ack,
	.irq_mask = intel_gpio_irq_mask,
	.irq_unmask = intel_gpio_irq_unmask,
+1 −1
Original line number Diff line number Diff line
@@ -990,7 +990,7 @@ static void nmk_gpio_dbg_show_one(struct seq_file *s,
		int val;

		if (pull)
			pullidx = data_out ? 1 : 2;
			pullidx = data_out ? 2 : 1;

		seq_printf(s, " gpio-%-3d (%-20.20s) in  %s %s",
			   gpio,
Loading