Skip to content

Commit 85f91d5

Browse files
committed
Merge tag 'pinctrl-v4.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl
Pull more pin control fixes from Linus Walleij: "Here is a bunch of pin control fixes again A bit more than I'd like for this subsystem at this point, but what can I do. They are all driver fixes for hardware issues, as like "we forgot", "we didn't think of the fact that this could happen", "oops that one goes there" etc - Kconfig fixup for the TI IOdelay pinctrl-single add-on - fix up a typo in the meson i2c ao groups - switch a remapping back to use devm_ioremap() as devm_ioremap_resource() does not allow for sharing memory regions - do not clear the Qualcomm irq status bit in irq_unmask(), as this can lead to missing interrupts while the irq handler is executing - add irq_request/release_resources() on the ST driver - add a bunch of mysteriously missing pingroups for high numbered pins in the Qualcomm ipq4019 driver" * tag 'pinctrl-v4.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: qcom: ipq4019: add missing pingroups for pins > 70 pinctrl: st: add irq_request/release_resources callbacks pinctrl: qcom: Don't clear status bit on irq_unmask pinctrl: samsung: Fix memory mapping code pinctrl: meson-gxbb: Fix typo in i2c ao groups pinctrl: ti: The IODelay driver is a DRA7xxx feature so depend on that SoC
2 parents d3e68ce + d7402de commit 85f91d5

File tree

6 files changed

+67
-16
lines changed

6 files changed

+67
-16
lines changed

drivers/pinctrl/meson/pinctrl-meson-gxbb.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -667,11 +667,11 @@ static const char * const uart_ao_b_groups[] = {
667667
};
668668

669669
static const char * const i2c_ao_groups[] = {
670-
"i2c_sdk_ao", "i2c_sda_ao",
670+
"i2c_sck_ao", "i2c_sda_ao",
671671
};
672672

673673
static const char * const i2c_slave_ao_groups[] = {
674-
"i2c_slave_sdk_ao", "i2c_slave_sda_ao",
674+
"i2c_slave_sck_ao", "i2c_slave_sda_ao",
675675
};
676676

677677
static const char * const remote_input_ao_groups[] = {

drivers/pinctrl/pinctrl-st.c

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1285,6 +1285,22 @@ static void st_gpio_irq_unmask(struct irq_data *d)
12851285
writel(BIT(d->hwirq), bank->base + REG_PIO_SET_PMASK);
12861286
}
12871287

1288+
static int st_gpio_irq_request_resources(struct irq_data *d)
1289+
{
1290+
struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
1291+
1292+
st_gpio_direction_input(gc, d->hwirq);
1293+
1294+
return gpiochip_lock_as_irq(gc, d->hwirq);
1295+
}
1296+
1297+
static void st_gpio_irq_release_resources(struct irq_data *d)
1298+
{
1299+
struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
1300+
1301+
gpiochip_unlock_as_irq(gc, d->hwirq);
1302+
}
1303+
12881304
static int st_gpio_irq_set_type(struct irq_data *d, unsigned type)
12891305
{
12901306
struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
@@ -1438,12 +1454,14 @@ static struct gpio_chip st_gpio_template = {
14381454
};
14391455

14401456
static struct irq_chip st_gpio_irqchip = {
1441-
.name = "GPIO",
1442-
.irq_disable = st_gpio_irq_mask,
1443-
.irq_mask = st_gpio_irq_mask,
1444-
.irq_unmask = st_gpio_irq_unmask,
1445-
.irq_set_type = st_gpio_irq_set_type,
1446-
.flags = IRQCHIP_SKIP_SET_WAKE,
1457+
.name = "GPIO",
1458+
.irq_request_resources = st_gpio_irq_request_resources,
1459+
.irq_release_resources = st_gpio_irq_release_resources,
1460+
.irq_disable = st_gpio_irq_mask,
1461+
.irq_mask = st_gpio_irq_mask,
1462+
.irq_unmask = st_gpio_irq_unmask,
1463+
.irq_set_type = st_gpio_irq_set_type,
1464+
.flags = IRQCHIP_SKIP_SET_WAKE,
14471465
};
14481466

14491467
static int st_gpiolib_register_bank(struct st_pinctrl *info,

drivers/pinctrl/qcom/pinctrl-ipq4019.c

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,36 @@ static const struct msm_pingroup ipq4019_groups[] = {
405405
PINGROUP(67, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
406406
PINGROUP(68, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
407407
PINGROUP(69, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
408+
PINGROUP(70, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
409+
PINGROUP(71, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
410+
PINGROUP(72, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
411+
PINGROUP(73, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
412+
PINGROUP(74, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
413+
PINGROUP(75, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
414+
PINGROUP(76, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
415+
PINGROUP(77, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
416+
PINGROUP(78, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
417+
PINGROUP(79, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
418+
PINGROUP(80, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
419+
PINGROUP(81, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
420+
PINGROUP(82, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
421+
PINGROUP(83, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
422+
PINGROUP(84, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
423+
PINGROUP(85, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
424+
PINGROUP(86, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
425+
PINGROUP(87, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
426+
PINGROUP(88, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
427+
PINGROUP(89, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
428+
PINGROUP(90, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
429+
PINGROUP(91, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
430+
PINGROUP(92, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
431+
PINGROUP(93, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
432+
PINGROUP(94, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
433+
PINGROUP(95, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
434+
PINGROUP(96, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
435+
PINGROUP(97, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
436+
PINGROUP(98, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
437+
PINGROUP(99, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
408438
};
409439

410440
static const struct msm_pinctrl_soc_data ipq4019_pinctrl = {

drivers/pinctrl/qcom/pinctrl-msm.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -609,10 +609,6 @@ static void msm_gpio_irq_unmask(struct irq_data *d)
609609

610610
raw_spin_lock_irqsave(&pctrl->lock, flags);
611611

612-
val = readl(pctrl->regs + g->intr_status_reg);
613-
val &= ~BIT(g->intr_status_bit);
614-
writel(val, pctrl->regs + g->intr_status_reg);
615-
616612
val = readl(pctrl->regs + g->intr_cfg_reg);
617613
val |= BIT(g->intr_enable_bit);
618614
writel(val, pctrl->regs + g->intr_cfg_reg);

drivers/pinctrl/samsung/pinctrl-samsung.c

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -988,9 +988,16 @@ samsung_pinctrl_get_soc_data(struct samsung_pinctrl_drv_data *d,
988988

989989
for (i = 0; i < ctrl->nr_ext_resources + 1; i++) {
990990
res = platform_get_resource(pdev, IORESOURCE_MEM, i);
991-
virt_base[i] = devm_ioremap_resource(&pdev->dev, res);
992-
if (IS_ERR(virt_base[i]))
993-
return ERR_CAST(virt_base[i]);
991+
if (!res) {
992+
dev_err(&pdev->dev, "failed to get mem%d resource\n", i);
993+
return ERR_PTR(-EINVAL);
994+
}
995+
virt_base[i] = devm_ioremap(&pdev->dev, res->start,
996+
resource_size(res));
997+
if (!virt_base[i]) {
998+
dev_err(&pdev->dev, "failed to ioremap %pR\n", res);
999+
return ERR_PTR(-EIO);
1000+
}
9941001
}
9951002

9961003
bank = d->pin_banks;

drivers/pinctrl/ti/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
config PINCTRL_TI_IODELAY
22
tristate "TI IODelay Module pinconf driver"
3-
depends on OF
3+
depends on OF && (SOC_DRA7XX || COMPILE_TEST)
44
select GENERIC_PINCTRL_GROUPS
55
select GENERIC_PINMUX_FUNCTIONS
66
select GENERIC_PINCONF

0 commit comments

Comments
 (0)