Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

Pull pin control fixes from Linus Walleij:

- Use flag saving spinlocks in the Renesas rzg2l driver. This fixes up
PREEMPT_RT problems.

- Remove broken Qualcomm PM8008 that clearly was never working. A new
version will arrive in the next merge window.

- Add a quirk for LP8764 regmap that was missed and made the TI J7200
board unusable.

- Fix persistance on the BCM2835 GPIO outputs kernel parameter so this
remains consisten across a booted kernel.

- Fix a potential deadlock in create_pinctrl()

- Fix some erroneous bitfields and pinmux reset in the Rockchip RK3328
driver.

* tag 'pinctrl-v6.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
pinctrl: rockchip: fix pinmux reset in rockchip_pmx_set
pinctrl: rockchip: use dedicated pinctrl type for RK3328
pinctrl: rockchip: fix pinmux bits for RK3328 GPIO3-B pins
pinctrl: rockchip: fix pinmux bits for RK3328 GPIO2-B pins
pinctrl: fix deadlock in create_pinctrl() when handling -EPROBE_DEFER
pinctrl: bcm2835: Fix permissions of persist_gpio_outputs
pinctrl: tps6594: add missing support for LP8764 PMIC
dt-bindings: pinctrl: qcom,pmic-gpio: drop pm8008
pinctrl: qcom: spmi-gpio: drop broken pm8008 support
pinctrl: renesas: rzg2l: Use spin_{lock,unlock}_irq{save,restore}

+65 -17
-3
Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml
··· 29 29 - qcom,pm7325-gpio 30 30 - qcom,pm7550ba-gpio 31 31 - qcom,pm8005-gpio 32 - - qcom,pm8008-gpio 33 32 - qcom,pm8018-gpio 34 33 - qcom,pm8019-gpio 35 34 - qcom,pm8038-gpio ··· 125 126 compatible: 126 127 contains: 127 128 enum: 128 - - qcom,pm8008-gpio 129 129 - qcom,pmi8950-gpio 130 130 - qcom,pmr735d-gpio 131 131 then: ··· 446 448 - gpio1-gpio10 for pm7325 447 449 - gpio1-gpio8 for pm7550ba 448 450 - gpio1-gpio4 for pm8005 449 - - gpio1-gpio2 for pm8008 450 451 - gpio1-gpio6 for pm8018 451 452 - gpio1-gpio12 for pm8038 452 453 - gpio1-gpio40 for pm8058
+1 -1
drivers/pinctrl/bcm/pinctrl-bcm2835.c
··· 245 245 }; 246 246 247 247 static bool persist_gpio_outputs; 248 - module_param(persist_gpio_outputs, bool, 0644); 248 + module_param(persist_gpio_outputs, bool, 0444); 249 249 MODULE_PARM_DESC(persist_gpio_outputs, "Enable GPIO_OUT persistence when pin is freed"); 250 250 251 251 static inline u32 bcm2835_gpio_rd(struct bcm2835_pinctrl *pc, unsigned reg)
+1 -1
drivers/pinctrl/core.c
··· 1106 1106 * an -EPROBE_DEFER later, as that is the worst case. 1107 1107 */ 1108 1108 if (ret == -EPROBE_DEFER) { 1109 - pinctrl_free(p, false); 1110 1109 mutex_unlock(&pinctrl_maps_mutex); 1110 + pinctrl_free(p, false); 1111 1111 return ERR_PTR(ret); 1112 1112 } 1113 1113 }
+59 -9
drivers/pinctrl/pinctrl-rockchip.c
··· 634 634 635 635 static struct rockchip_mux_recalced_data rk3328_mux_recalced_data[] = { 636 636 { 637 - .num = 2, 638 - .pin = 12, 639 - .reg = 0x24, 640 - .bit = 8, 641 - .mask = 0x3 642 - }, { 637 + /* gpio2_b7_sel */ 643 638 .num = 2, 644 639 .pin = 15, 645 640 .reg = 0x28, 646 641 .bit = 0, 647 642 .mask = 0x7 648 643 }, { 644 + /* gpio2_c7_sel */ 649 645 .num = 2, 650 646 .pin = 23, 651 647 .reg = 0x30, 648 + .bit = 14, 649 + .mask = 0x3 650 + }, { 651 + /* gpio3_b1_sel */ 652 + .num = 3, 653 + .pin = 9, 654 + .reg = 0x44, 655 + .bit = 2, 656 + .mask = 0x3 657 + }, { 658 + /* gpio3_b2_sel */ 659 + .num = 3, 660 + .pin = 10, 661 + .reg = 0x44, 662 + .bit = 4, 663 + .mask = 0x3 664 + }, { 665 + /* gpio3_b3_sel */ 666 + .num = 3, 667 + .pin = 11, 668 + .reg = 0x44, 669 + .bit = 6, 670 + .mask = 0x3 671 + }, { 672 + /* gpio3_b4_sel */ 673 + .num = 3, 674 + .pin = 12, 675 + .reg = 0x44, 676 + .bit = 8, 677 + .mask = 0x3 678 + }, { 679 + /* gpio3_b5_sel */ 680 + .num = 3, 681 + .pin = 13, 682 + .reg = 0x44, 683 + .bit = 10, 684 + .mask = 0x3 685 + }, { 686 + /* gpio3_b6_sel */ 687 + .num = 3, 688 + .pin = 14, 689 + .reg = 0x44, 690 + .bit = 12, 691 + .mask = 0x3 692 + }, { 693 + /* gpio3_b7_sel */ 694 + .num = 3, 695 + .pin = 15, 696 + .reg = 0x44, 652 697 .bit = 14, 653 698 .mask = 0x3 654 699 }, ··· 2478 2433 case RK3188: 2479 2434 case RK3288: 2480 2435 case RK3308: 2436 + case RK3328: 2481 2437 case RK3368: 2482 2438 case RK3399: 2483 2439 case RK3568: ··· 2537 2491 case RK3188: 2538 2492 case RK3288: 2539 2493 case RK3308: 2494 + case RK3328: 2540 2495 case RK3368: 2541 2496 case RK3399: 2542 2497 case RK3568: ··· 2751 2704 2752 2705 if (ret) { 2753 2706 /* revert the already done pin settings */ 2754 - for (cnt--; cnt >= 0; cnt--) 2707 + for (cnt--; cnt >= 0; cnt--) { 2708 + bank = pin_to_bank(info, pins[cnt]); 2755 2709 rockchip_set_mux(bank, pins[cnt] - bank->pin_base, 0); 2710 + } 2756 2711 2757 2712 return ret; 2758 2713 } ··· 2802 2753 case RK3188: 2803 2754 case RK3288: 2804 2755 case RK3308: 2756 + case RK3328: 2805 2757 case RK3368: 2806 2758 case RK3399: 2807 2759 case RK3568: ··· 3813 3763 PIN_BANK_IOMUX_FLAGS(0, 32, "gpio0", 0, 0, 0, 0), 3814 3764 PIN_BANK_IOMUX_FLAGS(1, 32, "gpio1", 0, 0, 0, 0), 3815 3765 PIN_BANK_IOMUX_FLAGS(2, 32, "gpio2", 0, 3816 - IOMUX_WIDTH_3BIT, 3766 + 0, 3817 3767 IOMUX_WIDTH_3BIT, 3818 3768 0), 3819 3769 PIN_BANK_IOMUX_FLAGS(3, 32, "gpio3", ··· 3827 3777 .pin_banks = rk3328_pin_banks, 3828 3778 .nr_banks = ARRAY_SIZE(rk3328_pin_banks), 3829 3779 .label = "RK3328-GPIO", 3830 - .type = RK3288, 3780 + .type = RK3328, 3831 3781 .grf_mux_offset = 0x0, 3832 3782 .iomux_recalced = rk3328_mux_recalced_data, 3833 3783 .niomux_recalced = ARRAY_SIZE(rk3328_mux_recalced_data),
+1
drivers/pinctrl/pinctrl-rockchip.h
··· 193 193 RK3188, 194 194 RK3288, 195 195 RK3308, 196 + RK3328, 196 197 RK3368, 197 198 RK3399, 198 199 RK3568,
+1
drivers/pinctrl/pinctrl-tps6594.c
··· 486 486 break; 487 487 case TPS6593: 488 488 case TPS6594: 489 + case LP8764: 489 490 pctrl_desc->pins = tps6594_pins; 490 491 pctrl_desc->npins = ARRAY_SIZE(tps6594_pins); 491 492
-1
drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
··· 1207 1207 { .compatible = "qcom,pm7325-gpio", .data = (void *) 10 }, 1208 1208 { .compatible = "qcom,pm7550ba-gpio", .data = (void *) 8}, 1209 1209 { .compatible = "qcom,pm8005-gpio", .data = (void *) 4 }, 1210 - { .compatible = "qcom,pm8008-gpio", .data = (void *) 2 }, 1211 1210 { .compatible = "qcom,pm8019-gpio", .data = (void *) 6 }, 1212 1211 /* pm8150 has 10 GPIOs with holes on 2, 5, 7 and 8 */ 1213 1212 { .compatible = "qcom,pm8150-gpio", .data = (void *) 10 },
+2 -2
drivers/pinctrl/renesas/pinctrl-rzg2l.c
··· 2071 2071 * This has to be atomically executed to protect against a concurrent 2072 2072 * interrupt. 2073 2073 */ 2074 - raw_spin_lock_irqsave(&pctrl->lock.rlock, flags); 2074 + spin_lock_irqsave(&pctrl->lock, flags); 2075 2075 ret = rzg2l_gpio_irq_set_type(data, irqd_get_trigger_type(data)); 2076 2076 if (!ret && !irqd_irq_disabled(data)) 2077 2077 rzg2l_gpio_irq_enable(data); 2078 - raw_spin_unlock_irqrestore(&pctrl->lock.rlock, flags); 2078 + spin_unlock_irqrestore(&pctrl->lock, flags); 2079 2079 2080 2080 if (ret) 2081 2081 dev_crit(pctrl->dev, "Failed to set IRQ type for virq=%u\n", virq);