Commit a6ff4631 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'pinctrl-v5.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl

Pull pin control fixes from Linus Walleij:
 "Some pin control fixes for the v5.6 series.

  It comes down to memory leaks in the core and driver fixes. Some
  should have been sent earlier but they kept piling up and the world is
  just so full of distractions these days.

   - Fix some inverted pins in the Meson GLX driver.

   - Align the i.MX SC message structs causing warnings from KASan.

   - Balance the kref in pinctrl hogs so they are actually free:d when
     removing a pin control module. We haven't seen it before as people
     don't use modules for pin control that much, I think.

   - Add a missing call to pinctrl_unregister_mappings() another memory
     leak when using modules.

   - Fix the fwspec parsing in the Qualcomm driver.

   - Fix a syntax error in the Falcon driver.

   - Assign .irq_eoi conditionally in the Qualcomm driver, fixing a bug
     affecting elder Qualcomm platforms"

* tag 'pinctrl-v5.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
  pinctrl: qcom: Assign irq_eoi conditionally
  pinctrl: falcon: fix syntax error
  pinctrl: qcom: ssbi-gpio: Fix fwspec parsing bug
  pinctrl: madera: Add missing call to pinctrl_unregister_mappings
  pinctrl: core: Remove extra kref_get which blocks hogs being freed
  pinctrl: imx: scu: Align imx sc msg structs to 4
  pinctrl: meson-gxl: fix GPIOX sdio pins
parents e3a36eb6 1cada2f3
...@@ -1073,13 +1073,26 @@ static int madera_pin_probe(struct platform_device *pdev) ...@@ -1073,13 +1073,26 @@ static int madera_pin_probe(struct platform_device *pdev)
return ret; return ret;
} }
platform_set_drvdata(pdev, priv);
dev_dbg(priv->dev, "pinctrl probed ok\n"); dev_dbg(priv->dev, "pinctrl probed ok\n");
return 0; return 0;
} }
static int madera_pin_remove(struct platform_device *pdev)
{
struct madera_pin_private *priv = platform_get_drvdata(pdev);
if (priv->madera->pdata.gpio_configs)
pinctrl_unregister_mappings(priv->madera->pdata.gpio_configs);
return 0;
}
static struct platform_driver madera_pin_driver = { static struct platform_driver madera_pin_driver = {
.probe = madera_pin_probe, .probe = madera_pin_probe,
.remove = madera_pin_remove,
.driver = { .driver = {
.name = "madera-pinctrl", .name = "madera-pinctrl",
}, },
......
...@@ -2021,7 +2021,6 @@ static int pinctrl_claim_hogs(struct pinctrl_dev *pctldev) ...@@ -2021,7 +2021,6 @@ static int pinctrl_claim_hogs(struct pinctrl_dev *pctldev)
return PTR_ERR(pctldev->p); return PTR_ERR(pctldev->p);
} }
kref_get(&pctldev->p->users);
pctldev->hog_default = pctldev->hog_default =
pinctrl_lookup_state(pctldev->p, PINCTRL_STATE_DEFAULT); pinctrl_lookup_state(pctldev->p, PINCTRL_STATE_DEFAULT);
if (IS_ERR(pctldev->hog_default)) { if (IS_ERR(pctldev->hog_default)) {
......
...@@ -23,12 +23,12 @@ struct imx_sc_msg_req_pad_set { ...@@ -23,12 +23,12 @@ struct imx_sc_msg_req_pad_set {
struct imx_sc_rpc_msg hdr; struct imx_sc_rpc_msg hdr;
u32 val; u32 val;
u16 pad; u16 pad;
} __packed; } __packed __aligned(4);
struct imx_sc_msg_req_pad_get { struct imx_sc_msg_req_pad_get {
struct imx_sc_rpc_msg hdr; struct imx_sc_rpc_msg hdr;
u16 pad; u16 pad;
} __packed; } __packed __aligned(4);
struct imx_sc_msg_resp_pad_get { struct imx_sc_msg_resp_pad_get {
struct imx_sc_rpc_msg hdr; struct imx_sc_rpc_msg hdr;
......
...@@ -147,8 +147,8 @@ static const unsigned int sdio_d0_pins[] = { GPIOX_0 }; ...@@ -147,8 +147,8 @@ static const unsigned int sdio_d0_pins[] = { GPIOX_0 };
static const unsigned int sdio_d1_pins[] = { GPIOX_1 }; static const unsigned int sdio_d1_pins[] = { GPIOX_1 };
static const unsigned int sdio_d2_pins[] = { GPIOX_2 }; static const unsigned int sdio_d2_pins[] = { GPIOX_2 };
static const unsigned int sdio_d3_pins[] = { GPIOX_3 }; static const unsigned int sdio_d3_pins[] = { GPIOX_3 };
static const unsigned int sdio_cmd_pins[] = { GPIOX_4 }; static const unsigned int sdio_clk_pins[] = { GPIOX_4 };
static const unsigned int sdio_clk_pins[] = { GPIOX_5 }; static const unsigned int sdio_cmd_pins[] = { GPIOX_5 };
static const unsigned int sdio_irq_pins[] = { GPIOX_7 }; static const unsigned int sdio_irq_pins[] = { GPIOX_7 };
static const unsigned int nand_ce0_pins[] = { BOOT_8 }; static const unsigned int nand_ce0_pins[] = { BOOT_8 };
......
...@@ -451,7 +451,7 @@ static int pinctrl_falcon_probe(struct platform_device *pdev) ...@@ -451,7 +451,7 @@ static int pinctrl_falcon_probe(struct platform_device *pdev)
falcon_info.clk[*bank] = clk_get(&ppdev->dev, NULL); falcon_info.clk[*bank] = clk_get(&ppdev->dev, NULL);
if (IS_ERR(falcon_info.clk[*bank])) { if (IS_ERR(falcon_info.clk[*bank])) {
dev_err(&ppdev->dev, "failed to get clock\n"); dev_err(&ppdev->dev, "failed to get clock\n");
of_node_put(np) of_node_put(np);
return PTR_ERR(falcon_info.clk[*bank]); return PTR_ERR(falcon_info.clk[*bank]);
} }
falcon_info.membase[*bank] = devm_ioremap_resource(&pdev->dev, falcon_info.membase[*bank] = devm_ioremap_resource(&pdev->dev,
......
...@@ -1104,7 +1104,6 @@ static int msm_gpio_init(struct msm_pinctrl *pctrl) ...@@ -1104,7 +1104,6 @@ static int msm_gpio_init(struct msm_pinctrl *pctrl)
pctrl->irq_chip.irq_mask = msm_gpio_irq_mask; pctrl->irq_chip.irq_mask = msm_gpio_irq_mask;
pctrl->irq_chip.irq_unmask = msm_gpio_irq_unmask; pctrl->irq_chip.irq_unmask = msm_gpio_irq_unmask;
pctrl->irq_chip.irq_ack = msm_gpio_irq_ack; pctrl->irq_chip.irq_ack = msm_gpio_irq_ack;
pctrl->irq_chip.irq_eoi = irq_chip_eoi_parent;
pctrl->irq_chip.irq_set_type = msm_gpio_irq_set_type; pctrl->irq_chip.irq_set_type = msm_gpio_irq_set_type;
pctrl->irq_chip.irq_set_wake = msm_gpio_irq_set_wake; pctrl->irq_chip.irq_set_wake = msm_gpio_irq_set_wake;
pctrl->irq_chip.irq_request_resources = msm_gpio_irq_reqres; pctrl->irq_chip.irq_request_resources = msm_gpio_irq_reqres;
...@@ -1118,7 +1117,7 @@ static int msm_gpio_init(struct msm_pinctrl *pctrl) ...@@ -1118,7 +1117,7 @@ static int msm_gpio_init(struct msm_pinctrl *pctrl)
if (!chip->irq.parent_domain) if (!chip->irq.parent_domain)
return -EPROBE_DEFER; return -EPROBE_DEFER;
chip->irq.child_to_parent_hwirq = msm_gpio_wakeirq; chip->irq.child_to_parent_hwirq = msm_gpio_wakeirq;
pctrl->irq_chip.irq_eoi = irq_chip_eoi_parent;
/* /*
* Let's skip handling the GPIOs, if the parent irqchip * Let's skip handling the GPIOs, if the parent irqchip
* is handling the direct connect IRQ of the GPIO. * is handling the direct connect IRQ of the GPIO.
......
...@@ -794,7 +794,7 @@ static int pm8xxx_gpio_probe(struct platform_device *pdev) ...@@ -794,7 +794,7 @@ static int pm8xxx_gpio_probe(struct platform_device *pdev)
girq->fwnode = of_node_to_fwnode(pctrl->dev->of_node); girq->fwnode = of_node_to_fwnode(pctrl->dev->of_node);
girq->parent_domain = parent_domain; girq->parent_domain = parent_domain;
girq->child_to_parent_hwirq = pm8xxx_child_to_parent_hwirq; girq->child_to_parent_hwirq = pm8xxx_child_to_parent_hwirq;
girq->populate_parent_alloc_arg = gpiochip_populate_parent_fwspec_fourcell; girq->populate_parent_alloc_arg = gpiochip_populate_parent_fwspec_twocell;
girq->child_offset_to_irq = pm8xxx_child_offset_to_irq; girq->child_offset_to_irq = pm8xxx_child_offset_to_irq;
girq->child_irq_domain_ops.translate = pm8xxx_domain_translate; girq->child_irq_domain_ops.translate = pm8xxx_domain_translate;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment