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.12-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl

Pull pin control fixes from Linus Walleij:
"Late pin control fixes, would have been in the main pull request
normally but hey I got lucky and we got another week to polish up
v5.12 so here we go.

One driver fix and one making the core debugfs work:

- Fix the number of pins in the community of the Intel Lewisburg SoC

- Show pin numbers for controllers with base = 0 in the new debugfs
feature"

* tag 'pinctrl-v5.12-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
pinctrl: core: Show pin numbers for the controllers with base = 0
pinctrl: lewisburg: Update number of pins in community

+11 -9
+8 -6
drivers/pinctrl/core.c
··· 1604 1604 unsigned i, pin; 1605 1605 #ifdef CONFIG_GPIOLIB 1606 1606 struct pinctrl_gpio_range *range; 1607 - unsigned int gpio_num; 1608 1607 struct gpio_chip *chip; 1608 + int gpio_num; 1609 1609 #endif 1610 1610 1611 1611 seq_printf(s, "registered pins: %d\n", pctldev->desc->npins); ··· 1625 1625 seq_printf(s, "pin %d (%s) ", pin, desc->name); 1626 1626 1627 1627 #ifdef CONFIG_GPIOLIB 1628 - gpio_num = 0; 1628 + gpio_num = -1; 1629 1629 list_for_each_entry(range, &pctldev->gpio_ranges, node) { 1630 1630 if ((pin >= range->pin_base) && 1631 1631 (pin < (range->pin_base + range->npins))) { ··· 1633 1633 break; 1634 1634 } 1635 1635 } 1636 - chip = gpio_to_chip(gpio_num); 1637 - if (chip && chip->gpiodev && chip->gpiodev->base) 1638 - seq_printf(s, "%u:%s ", gpio_num - 1639 - chip->gpiodev->base, chip->label); 1636 + if (gpio_num >= 0) 1637 + chip = gpio_to_chip(gpio_num); 1638 + else 1639 + chip = NULL; 1640 + if (chip) 1641 + seq_printf(s, "%u:%s ", gpio_num - chip->gpiodev->base, chip->label); 1640 1642 else 1641 1643 seq_puts(s, "0:? "); 1642 1644 #endif
+3 -3
drivers/pinctrl/intel/pinctrl-lewisburg.c
··· 299 299 static const struct intel_community lbg_communities[] = { 300 300 LBG_COMMUNITY(0, 0, 71), 301 301 LBG_COMMUNITY(1, 72, 132), 302 - LBG_COMMUNITY(3, 133, 144), 303 - LBG_COMMUNITY(4, 145, 180), 304 - LBG_COMMUNITY(5, 181, 246), 302 + LBG_COMMUNITY(3, 133, 143), 303 + LBG_COMMUNITY(4, 144, 178), 304 + LBG_COMMUNITY(5, 179, 246), 305 305 }; 306 306 307 307 static const struct intel_pinctrl_soc_data lbg_soc_data = {