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

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

Pull pin control fixes from Linus Walleij:

- Mark som pins as invalid for IRQ use in the Qualcomm driver

- Fix up the use of device properties on the MA35DX Nuvoton, apparently
something went sidewise

- Clear the GPIO debounce settings when going down for suspend in the
AMD driver. Very good for some AMD laptops that now wake up from
suspend again!

- Add the compulsory .can_sleep bool flag in the AW9523 driver, should
have been there from the beginning, now there are users finding the
bug

- Drop some bouncing email address from MAINTAINERS

* tag 'pinctrl-v6.16-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
pinctrl: aw9523: fix can_sleep flag for GPIO chip
pinctrl: amd: Clear GPIO debounce for suspend
pinctrl: nuvoton: Fix boot on ma35dx platforms
MAINTAINERS: drop bouncing Lakshmi Sowjanya D
pinctrl: qcom: msm: mark certain pins as invalid for interrupts

+41 -5
+1 -2
MAINTAINERS
··· 19603 19603 F: drivers/pinctrl/intel/ 19604 19604 19605 19605 PIN CONTROLLER - KEEMBAY 19606 - M: Lakshmi Sowjanya D <lakshmi.sowjanya.d@intel.com> 19607 - S: Supported 19606 + S: Orphan 19608 19607 F: drivers/pinctrl/pinctrl-keembay* 19609 19608 19610 19609 PIN CONTROLLER - MEDIATEK
+8 -2
drivers/pinctrl/nuvoton/pinctrl-ma35.c
··· 1074 1074 u32 idx = 0; 1075 1075 int ret; 1076 1076 1077 - for_each_gpiochip_node(dev, child) { 1077 + device_for_each_child_node(dev, child) { 1078 + if (fwnode_property_present(child, "gpio-controller")) 1079 + continue; 1080 + 1078 1081 npctl->nfunctions++; 1079 1082 npctl->ngroups += of_get_child_count(to_of_node(child)); 1080 1083 } ··· 1095 1092 if (!npctl->groups) 1096 1093 return -ENOMEM; 1097 1094 1098 - for_each_gpiochip_node(dev, child) { 1095 + device_for_each_child_node(dev, child) { 1096 + if (fwnode_property_present(child, "gpio-controller")) 1097 + continue; 1098 + 1099 1099 ret = ma35_pinctrl_parse_functions(child, npctl, idx++); 1100 1100 if (ret) { 1101 1101 fwnode_handle_put(child);
+11
drivers/pinctrl/pinctrl-amd.c
··· 979 979 pin, is_suspend ? "suspend" : "hibernate"); 980 980 } 981 981 982 + /* 983 + * debounce enabled over suspend has shown issues with a GPIO 984 + * being unable to wake the system, as we're only interested in 985 + * the actual wakeup event, clear it. 986 + */ 987 + if (gpio_dev->saved_regs[i] & (DB_CNTRl_MASK << DB_CNTRL_OFF)) { 988 + amd_gpio_set_debounce(gpio_dev, pin, 0); 989 + pm_pr_dbg("Clearing debounce for GPIO #%d during %s.\n", 990 + pin, is_suspend ? "suspend" : "hibernate"); 991 + } 992 + 982 993 raw_spin_unlock_irqrestore(&gpio_dev->lock, flags); 983 994 } 984 995
+1 -1
drivers/pinctrl/pinctrl-aw9523.c
··· 784 784 gc->set_config = gpiochip_generic_config; 785 785 gc->parent = dev; 786 786 gc->owner = THIS_MODULE; 787 - gc->can_sleep = false; 787 + gc->can_sleep = true; 788 788 789 789 return 0; 790 790 }
+20
drivers/pinctrl/qcom/pinctrl-msm.c
··· 1038 1038 test_bit(d->hwirq, pctrl->skip_wake_irqs); 1039 1039 } 1040 1040 1041 + static void msm_gpio_irq_init_valid_mask(struct gpio_chip *gc, 1042 + unsigned long *valid_mask, 1043 + unsigned int ngpios) 1044 + { 1045 + struct msm_pinctrl *pctrl = gpiochip_get_data(gc); 1046 + const struct msm_pingroup *g; 1047 + int i; 1048 + 1049 + bitmap_fill(valid_mask, ngpios); 1050 + 1051 + for (i = 0; i < ngpios; i++) { 1052 + g = &pctrl->soc->groups[i]; 1053 + 1054 + if (g->intr_detection_width != 1 && 1055 + g->intr_detection_width != 2) 1056 + clear_bit(i, valid_mask); 1057 + } 1058 + } 1059 + 1041 1060 static int msm_gpio_irq_set_type(struct irq_data *d, unsigned int type) 1042 1061 { 1043 1062 struct gpio_chip *gc = irq_data_get_irq_chip_data(d); ··· 1460 1441 girq->default_type = IRQ_TYPE_NONE; 1461 1442 girq->handler = handle_bad_irq; 1462 1443 girq->parents[0] = pctrl->irq; 1444 + girq->init_valid_mask = msm_gpio_irq_init_valid_mask; 1463 1445 1464 1446 ret = devm_gpiochip_add_data(pctrl->dev, &pctrl->chip, pctrl); 1465 1447 if (ret) {