Merge tag 'gpio-fixes-for-v6.1-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux

Pull gpio fixes from Bartosz Golaszewski:

- convert gpio-tegra to using an immutable irqchip

- MAINTAINERS update

* tag 'gpio-fixes-for-v6.1-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
MAINTAINERS: Change myself to a maintainer
gpio: tegra: Convert to immutable irq chip

Changed files
+46 -18
drivers
+2 -2
MAINTAINERS
··· 17812 17812 F: drivers/tty/serial/rp2.* 17813 17813 17814 17814 ROHM BD99954 CHARGER IC 17815 - R: Matti Vaittinen <mazziesaccount@gmail.com> 17815 + M: Matti Vaittinen <mazziesaccount@gmail.com> 17816 17816 S: Supported 17817 17817 F: drivers/power/supply/bd99954-charger.c 17818 17818 F: drivers/power/supply/bd99954-charger.h ··· 17835 17835 F: include/linux/mfd/bd9571mwv.h 17836 17836 17837 17837 ROHM POWER MANAGEMENT IC DEVICE DRIVERS 17838 - R: Matti Vaittinen <mazziesaccount@gmail.com> 17838 + M: Matti Vaittinen <mazziesaccount@gmail.com> 17839 17839 S: Supported 17840 17840 F: drivers/clk/clk-bd718x7.c 17841 17841 F: drivers/gpio/gpio-bd71815.c
+44 -16
drivers/gpio/gpio-tegra.c
··· 18 18 #include <linux/of_device.h> 19 19 #include <linux/platform_device.h> 20 20 #include <linux/module.h> 21 + #include <linux/seq_file.h> 21 22 #include <linux/irqdomain.h> 22 23 #include <linux/irqchip/chained_irq.h> 23 24 #include <linux/pinctrl/consumer.h> ··· 95 94 struct tegra_gpio_bank *bank_info; 96 95 const struct tegra_gpio_soc_config *soc; 97 96 struct gpio_chip gc; 98 - struct irq_chip ic; 99 97 u32 bank_count; 100 98 unsigned int *irqs; 101 99 }; ··· 288 288 unsigned int gpio = d->hwirq; 289 289 290 290 tegra_gpio_mask_write(tgi, GPIO_MSK_INT_ENB(tgi, gpio), gpio, 0); 291 + gpiochip_disable_irq(chip, gpio); 291 292 } 292 293 293 294 static void tegra_gpio_irq_unmask(struct irq_data *d) ··· 297 296 struct tegra_gpio_info *tgi = gpiochip_get_data(chip); 298 297 unsigned int gpio = d->hwirq; 299 298 299 + gpiochip_enable_irq(chip, gpio); 300 300 tegra_gpio_mask_write(tgi, GPIO_MSK_INT_ENB(tgi, gpio), gpio, 1); 301 301 } 302 302 ··· 600 598 tegra_gpio_enable(tgi, d->hwirq); 601 599 } 602 600 601 + static void tegra_gpio_irq_print_chip(struct irq_data *d, struct seq_file *s) 602 + { 603 + struct gpio_chip *chip = irq_data_get_irq_chip_data(d); 604 + 605 + seq_printf(s, dev_name(chip->parent)); 606 + } 607 + 608 + static const struct irq_chip tegra_gpio_irq_chip = { 609 + .irq_shutdown = tegra_gpio_irq_shutdown, 610 + .irq_ack = tegra_gpio_irq_ack, 611 + .irq_mask = tegra_gpio_irq_mask, 612 + .irq_unmask = tegra_gpio_irq_unmask, 613 + .irq_set_type = tegra_gpio_irq_set_type, 614 + #ifdef CONFIG_PM_SLEEP 615 + .irq_set_wake = tegra_gpio_irq_set_wake, 616 + #endif 617 + .irq_print_chip = tegra_gpio_irq_print_chip, 618 + .irq_request_resources = tegra_gpio_irq_request_resources, 619 + .irq_release_resources = tegra_gpio_irq_release_resources, 620 + .flags = IRQCHIP_IMMUTABLE, 621 + }; 622 + 623 + static const struct irq_chip tegra210_gpio_irq_chip = { 624 + .irq_shutdown = tegra_gpio_irq_shutdown, 625 + .irq_ack = tegra_gpio_irq_ack, 626 + .irq_mask = tegra_gpio_irq_mask, 627 + .irq_unmask = tegra_gpio_irq_unmask, 628 + .irq_set_affinity = tegra_gpio_irq_set_affinity, 629 + .irq_set_type = tegra_gpio_irq_set_type, 630 + #ifdef CONFIG_PM_SLEEP 631 + .irq_set_wake = tegra_gpio_irq_set_wake, 632 + #endif 633 + .irq_print_chip = tegra_gpio_irq_print_chip, 634 + .irq_request_resources = tegra_gpio_irq_request_resources, 635 + .irq_release_resources = tegra_gpio_irq_release_resources, 636 + .flags = IRQCHIP_IMMUTABLE, 637 + }; 638 + 603 639 #ifdef CONFIG_DEBUG_FS 604 640 605 641 #include <linux/debugfs.h> 606 - #include <linux/seq_file.h> 607 642 608 643 static int tegra_dbg_gpio_show(struct seq_file *s, void *unused) 609 644 { ··· 728 689 tgi->gc.ngpio = tgi->bank_count * 32; 729 690 tgi->gc.parent = &pdev->dev; 730 691 731 - tgi->ic.name = "GPIO"; 732 - tgi->ic.irq_ack = tegra_gpio_irq_ack; 733 - tgi->ic.irq_mask = tegra_gpio_irq_mask; 734 - tgi->ic.irq_unmask = tegra_gpio_irq_unmask; 735 - tgi->ic.irq_set_type = tegra_gpio_irq_set_type; 736 - tgi->ic.irq_shutdown = tegra_gpio_irq_shutdown; 737 - #ifdef CONFIG_PM_SLEEP 738 - tgi->ic.irq_set_wake = tegra_gpio_irq_set_wake; 739 - #endif 740 - tgi->ic.irq_request_resources = tegra_gpio_irq_request_resources; 741 - tgi->ic.irq_release_resources = tegra_gpio_irq_release_resources; 742 - 743 692 platform_set_drvdata(pdev, tgi); 744 693 745 694 if (tgi->soc->debounce_supported) ··· 760 733 } 761 734 762 735 irq = &tgi->gc.irq; 763 - irq->chip = &tgi->ic; 764 736 irq->fwnode = of_node_to_fwnode(pdev->dev.of_node); 765 737 irq->child_to_parent_hwirq = tegra_gpio_child_to_parent_hwirq; 766 738 irq->populate_parent_alloc_arg = tegra_gpio_populate_parent_fwspec; ··· 778 752 if (!irq->parent_domain) 779 753 return -EPROBE_DEFER; 780 754 781 - tgi->ic.irq_set_affinity = tegra_gpio_irq_set_affinity; 755 + gpio_irq_chip_set_chip(irq, &tegra210_gpio_irq_chip); 756 + } else { 757 + gpio_irq_chip_set_chip(irq, &tegra_gpio_irq_chip); 782 758 } 783 759 784 760 tgi->regs = devm_platform_ioremap_resource(pdev, 0);