Skip to content

Commit 651a853

Browse files
committed
Merge tag 'pinctrl-v5.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl
Pull pin control fixes from Linus Walleij: - Tag Intel pin control as supported in MAINTAINERS - Fix a NULL pointer exception in the Aspeed driver - Correct some NAND functions in the Sunxi A83T driver - Use the right offset for some Sunxi pins - Fix a zero base offset in the Freescale (NXP) i.MX93 - Fix the IRQ support in the STM32 driver * tag 'pinctrl-v5.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: stm32: fix optional IRQ support to gpios pinctrl: imx: Add the zero base flag for imx93 pinctrl: sunxi: sunxi_pconf_set: use correct offset pinctrl: sunxi: a83t: Fix NAND function name for some pins pinctrl: aspeed: Fix potential NULL dereference in aspeed_pinmux_set_mux() MAINTAINERS: Update Intel pin control to Supported
2 parents a382f8f + a1d4ef1 commit 651a853

File tree

6 files changed

+23
-16
lines changed

6 files changed

+23
-16
lines changed

MAINTAINERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15792,7 +15792,7 @@ F: drivers/pinctrl/freescale/
1579215792
PIN CONTROLLER - INTEL
1579315793
M: Mika Westerberg <[email protected]>
1579415794
M: Andy Shevchenko <[email protected]>
15795-
S: Maintained
15795+
S: Supported
1579615796
T: git git://git.kernel.org/pub/scm/linux/kernel/git/pinctrl/intel.git
1579715797
F: drivers/pinctrl/intel/
1579815798

drivers/pinctrl/aspeed/pinctrl-aspeed.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,11 +236,11 @@ int aspeed_pinmux_set_mux(struct pinctrl_dev *pctldev, unsigned int function,
236236
const struct aspeed_sig_expr **funcs;
237237
const struct aspeed_sig_expr ***prios;
238238

239-
pr_debug("Muxing pin %s for %s\n", pdesc->name, pfunc->name);
240-
241239
if (!pdesc)
242240
return -EINVAL;
243241

242+
pr_debug("Muxing pin %s for %s\n", pdesc->name, pfunc->name);
243+
244244
prios = pdesc->prios;
245245

246246
if (!prios)

drivers/pinctrl/freescale/pinctrl-imx93.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ static const struct pinctrl_pin_desc imx93_pinctrl_pads[] = {
239239
static const struct imx_pinctrl_soc_info imx93_pinctrl_info = {
240240
.pins = imx93_pinctrl_pads,
241241
.npins = ARRAY_SIZE(imx93_pinctrl_pads),
242+
.flags = ZERO_OFFSET_VALID,
242243
.gpr_compatible = "fsl,imx93-iomuxc-gpr",
243244
};
244245

drivers/pinctrl/stm32/pinctrl-stm32.c

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1338,16 +1338,18 @@ static int stm32_gpiolib_register_bank(struct stm32_pinctrl *pctl, struct fwnode
13381338
bank->secure_control = pctl->match_data->secure_control;
13391339
spin_lock_init(&bank->lock);
13401340

1341-
/* create irq hierarchical domain */
1342-
bank->fwnode = fwnode;
1341+
if (pctl->domain) {
1342+
/* create irq hierarchical domain */
1343+
bank->fwnode = fwnode;
13431344

1344-
bank->domain = irq_domain_create_hierarchy(pctl->domain, 0,
1345-
STM32_GPIO_IRQ_LINE, bank->fwnode,
1346-
&stm32_gpio_domain_ops, bank);
1345+
bank->domain = irq_domain_create_hierarchy(pctl->domain, 0, STM32_GPIO_IRQ_LINE,
1346+
bank->fwnode, &stm32_gpio_domain_ops,
1347+
bank);
13471348

1348-
if (!bank->domain) {
1349-
err = -ENODEV;
1350-
goto err_clk;
1349+
if (!bank->domain) {
1350+
err = -ENODEV;
1351+
goto err_clk;
1352+
}
13511353
}
13521354

13531355
err = gpiochip_add_data(&bank->gpio_chip, bank);
@@ -1510,6 +1512,8 @@ int stm32_pctl_probe(struct platform_device *pdev)
15101512
pctl->domain = stm32_pctrl_get_irq_domain(pdev);
15111513
if (IS_ERR(pctl->domain))
15121514
return PTR_ERR(pctl->domain);
1515+
if (!pctl->domain)
1516+
dev_warn(dev, "pinctrl without interrupt support\n");
15131517

15141518
/* hwspinlock is optional */
15151519
hwlock_id = of_hwspin_lock_get_id(pdev->dev.of_node, 0);

drivers/pinctrl/sunxi/pinctrl-sun8i-a83t.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -158,26 +158,26 @@ static const struct sunxi_desc_pin sun8i_a83t_pins[] = {
158158
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 14),
159159
SUNXI_FUNCTION(0x0, "gpio_in"),
160160
SUNXI_FUNCTION(0x1, "gpio_out"),
161-
SUNXI_FUNCTION(0x2, "nand"), /* DQ6 */
161+
SUNXI_FUNCTION(0x2, "nand0"), /* DQ6 */
162162
SUNXI_FUNCTION(0x3, "mmc2")), /* D6 */
163163
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 15),
164164
SUNXI_FUNCTION(0x0, "gpio_in"),
165165
SUNXI_FUNCTION(0x1, "gpio_out"),
166-
SUNXI_FUNCTION(0x2, "nand"), /* DQ7 */
166+
SUNXI_FUNCTION(0x2, "nand0"), /* DQ7 */
167167
SUNXI_FUNCTION(0x3, "mmc2")), /* D7 */
168168
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 16),
169169
SUNXI_FUNCTION(0x0, "gpio_in"),
170170
SUNXI_FUNCTION(0x1, "gpio_out"),
171-
SUNXI_FUNCTION(0x2, "nand"), /* DQS */
171+
SUNXI_FUNCTION(0x2, "nand0"), /* DQS */
172172
SUNXI_FUNCTION(0x3, "mmc2")), /* RST */
173173
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 17),
174174
SUNXI_FUNCTION(0x0, "gpio_in"),
175175
SUNXI_FUNCTION(0x1, "gpio_out"),
176-
SUNXI_FUNCTION(0x2, "nand")), /* CE2 */
176+
SUNXI_FUNCTION(0x2, "nand0")), /* CE2 */
177177
SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 18),
178178
SUNXI_FUNCTION(0x0, "gpio_in"),
179179
SUNXI_FUNCTION(0x1, "gpio_out"),
180-
SUNXI_FUNCTION(0x2, "nand")), /* CE3 */
180+
SUNXI_FUNCTION(0x2, "nand0")), /* CE3 */
181181
/* Hole */
182182
SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 2),
183183
SUNXI_FUNCTION(0x0, "gpio_in"),

drivers/pinctrl/sunxi/pinctrl-sunxi.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,8 @@ static int sunxi_pconf_set(struct pinctrl_dev *pctldev, unsigned pin,
544544
struct sunxi_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev);
545545
int i;
546546

547+
pin -= pctl->desc->pin_base;
548+
547549
for (i = 0; i < num_configs; i++) {
548550
enum pin_config_param param;
549551
unsigned long flags;

0 commit comments

Comments
 (0)