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

Configure Feed

Select the types of activity you want to include in your feed.

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

Pull pin control fixes from Linus Walleij:
"These two fixes should fix the issues seen on the OrangePi, first we
needed the correct offset when calling pinctrl_gpio_direction(), and
fixing that made a lockdep issue explode in our face. Both now fixed"

* tag 'pinctrl-v5.17-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
pinctrl: sunxi: Use unique lockdep classes for IRQs
pinctrl-sunxi: sunxi_pinctrl_gpio_direction_in/output: use correct offset

+13 -2
+13 -2
drivers/pinctrl/sunxi/pinctrl-sunxi.c
··· 36 36 #include "../core.h" 37 37 #include "pinctrl-sunxi.h" 38 38 39 + /* 40 + * These lock classes tell lockdep that GPIO IRQs are in a different 41 + * category than their parents, so it won't report false recursion. 42 + */ 43 + static struct lock_class_key sunxi_pinctrl_irq_lock_class; 44 + static struct lock_class_key sunxi_pinctrl_irq_request_class; 45 + 39 46 static struct irq_chip sunxi_pinctrl_edge_irq_chip; 40 47 static struct irq_chip sunxi_pinctrl_level_irq_chip; 41 48 ··· 844 837 { 845 838 struct sunxi_pinctrl *pctl = gpiochip_get_data(chip); 846 839 847 - return sunxi_pmx_gpio_set_direction(pctl->pctl_dev, NULL, offset, true); 840 + return sunxi_pmx_gpio_set_direction(pctl->pctl_dev, NULL, 841 + chip->base + offset, true); 848 842 } 849 843 850 844 static int sunxi_pinctrl_gpio_get(struct gpio_chip *chip, unsigned offset) ··· 898 890 struct sunxi_pinctrl *pctl = gpiochip_get_data(chip); 899 891 900 892 sunxi_pinctrl_gpio_set(chip, offset, value); 901 - return sunxi_pmx_gpio_set_direction(pctl->pctl_dev, NULL, offset, false); 893 + return sunxi_pmx_gpio_set_direction(pctl->pctl_dev, NULL, 894 + chip->base + offset, false); 902 895 } 903 896 904 897 static int sunxi_pinctrl_gpio_of_xlate(struct gpio_chip *gc, ··· 1564 1555 for (i = 0; i < (pctl->desc->irq_banks * IRQ_PER_BANK); i++) { 1565 1556 int irqno = irq_create_mapping(pctl->domain, i); 1566 1557 1558 + irq_set_lockdep_class(irqno, &sunxi_pinctrl_irq_lock_class, 1559 + &sunxi_pinctrl_irq_request_class); 1567 1560 irq_set_chip_and_handler(irqno, &sunxi_pinctrl_edge_irq_chip, 1568 1561 handle_edge_irq); 1569 1562 irq_set_chip_data(irqno, pctl);