Skip to content

Commit 16f4aa9

Browse files
committed
Merge tag 'pinctrl-v5.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl
Pull pin control fixes from Linus Walleij: "Some early fixes collected during the first week after the merge window, all pretty self-evident, with the details below. The revert is the crucial thing. - Fix a warning on the Qualcomm SPMI GPIO chip being instatiated twice without a unique irqchip struct - Use the noirq variants of the suspend and resume callbacks in the Tegra driver - Clean up the errorpath on the MCP23s08 driver - Revert the use of devm_of_iomap() in the Freescale driver as it was regressing the platform - Add some missing pins in the Qualcomm IPQ6018 driver - Fix a simple documentation bug in the pinctrl-single driver" * tag 'pinctrl-v5.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: single: fix function name in documentation pinctrl: qcom: ipq6018 Add missing pins in qpic pin group Revert "pinctrl: freescale: imx: Use 'devm_of_iomap()' to avoid a resource leak in case of error in 'imx_pinctrl_probe()'" pinctrl: mcp23s08: Split to three parts: fix ptr_ret.cocci warnings pinctrl: tegra: Use noirq suspend/resume callbacks pinctrl: qcom: spmi-gpio: fix warning about irq chip reusage
2 parents be9160a + 25fae75 commit 16f4aa9

File tree

6 files changed

+19
-23
lines changed

6 files changed

+19
-23
lines changed

drivers/pinctrl/freescale/pinctrl-imx.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -824,13 +824,12 @@ int imx_pinctrl_probe(struct platform_device *pdev,
824824
return -EINVAL;
825825
}
826826

827-
ipctl->input_sel_base = devm_of_iomap(&pdev->dev, np,
828-
0, NULL);
827+
ipctl->input_sel_base = of_iomap(np, 0);
829828
of_node_put(np);
830-
if (IS_ERR(ipctl->input_sel_base)) {
829+
if (!ipctl->input_sel_base) {
831830
dev_err(&pdev->dev,
832831
"iomuxc input select base address not found\n");
833-
return PTR_ERR(ipctl->input_sel_base);
832+
return -ENOMEM;
834833
}
835834
}
836835
}

drivers/pinctrl/pinctrl-mcp23s08_spi.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,7 @@ static int mcp23s08_spi_regmap_init(struct mcp23s08 *mcp, struct device *dev,
126126
copy->name = name;
127127

128128
mcp->regmap = devm_regmap_init(dev, &mcp23sxx_spi_regmap, mcp, copy);
129-
if (IS_ERR(mcp->regmap))
130-
return PTR_ERR(mcp->regmap);
131-
132-
return 0;
129+
return PTR_ERR_OR_ZERO(mcp->regmap);
133130
}
134131

135132
static int mcp23s08_probe(struct spi_device *spi)

drivers/pinctrl/pinctrl-single.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -958,7 +958,7 @@ static int pcs_parse_pinconf(struct pcs_device *pcs, struct device_node *np,
958958
}
959959

960960
/**
961-
* smux_parse_one_pinctrl_entry() - parses a device tree mux entry
961+
* pcs_parse_one_pinctrl_entry() - parses a device tree mux entry
962962
* @pctldev: pin controller device
963963
* @pcs: pinctrl driver instance
964964
* @np: device node of the mux entry

drivers/pinctrl/qcom/pinctrl-ipq6018.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,8 @@ static const char * const wci20_groups[] = {
367367

368368
static const char * const qpic_pad_groups[] = {
369369
"gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio9", "gpio10",
370-
"gpio11", "gpio17",
370+
"gpio11", "gpio17", "gpio15", "gpio12", "gpio13", "gpio14", "gpio5",
371+
"gpio6", "gpio7", "gpio8",
371372
};
372373

373374
static const char * const burn0_groups[] = {

drivers/pinctrl/qcom/pinctrl-spmi-gpio.c

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ struct pmic_gpio_state {
170170
struct regmap *map;
171171
struct pinctrl_dev *ctrl;
172172
struct gpio_chip chip;
173+
struct irq_chip irq;
173174
};
174175

175176
static const struct pinconf_generic_params pmic_gpio_bindings[] = {
@@ -917,16 +918,6 @@ static int pmic_gpio_populate(struct pmic_gpio_state *state,
917918
return 0;
918919
}
919920

920-
static struct irq_chip pmic_gpio_irq_chip = {
921-
.name = "spmi-gpio",
922-
.irq_ack = irq_chip_ack_parent,
923-
.irq_mask = irq_chip_mask_parent,
924-
.irq_unmask = irq_chip_unmask_parent,
925-
.irq_set_type = irq_chip_set_type_parent,
926-
.irq_set_wake = irq_chip_set_wake_parent,
927-
.flags = IRQCHIP_MASK_ON_SUSPEND,
928-
};
929-
930921
static int pmic_gpio_domain_translate(struct irq_domain *domain,
931922
struct irq_fwspec *fwspec,
932923
unsigned long *hwirq,
@@ -1053,8 +1044,16 @@ static int pmic_gpio_probe(struct platform_device *pdev)
10531044
if (!parent_domain)
10541045
return -ENXIO;
10551046

1047+
state->irq.name = "spmi-gpio",
1048+
state->irq.irq_ack = irq_chip_ack_parent,
1049+
state->irq.irq_mask = irq_chip_mask_parent,
1050+
state->irq.irq_unmask = irq_chip_unmask_parent,
1051+
state->irq.irq_set_type = irq_chip_set_type_parent,
1052+
state->irq.irq_set_wake = irq_chip_set_wake_parent,
1053+
state->irq.flags = IRQCHIP_MASK_ON_SUSPEND,
1054+
10561055
girq = &state->chip.irq;
1057-
girq->chip = &pmic_gpio_irq_chip;
1056+
girq->chip = &state->irq;
10581057
girq->default_type = IRQ_TYPE_NONE;
10591058
girq->handler = handle_level_irq;
10601059
girq->fwnode = of_node_to_fwnode(state->dev->of_node);

drivers/pinctrl/tegra/pinctrl-tegra.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -731,8 +731,8 @@ static int tegra_pinctrl_resume(struct device *dev)
731731
}
732732

733733
const struct dev_pm_ops tegra_pinctrl_pm = {
734-
.suspend = &tegra_pinctrl_suspend,
735-
.resume = &tegra_pinctrl_resume
734+
.suspend_noirq = &tegra_pinctrl_suspend,
735+
.resume_noirq = &tegra_pinctrl_resume
736736
};
737737

738738
static bool tegra_pinctrl_gpio_node_has_range(struct tegra_pmx *pmx)

0 commit comments

Comments
 (0)