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

gpio: Drop the chained IRQ handler assign function

gpiochip_set_chained_irqchip() would assign a chained handler
to a GPIO chip. We now populate struct gpio_irq_chip for all
chained GPIO irqchips so drop this function.

Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20200113220800.77817-1-linus.walleij@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

+3 -38
-5
Documentation/driver-api/gpio/driver.rst
··· 507 507 cascaded irq has to be handled by a threaded interrupt handler. 508 508 Apart from that it works exactly like the chained irqchip. 509 509 510 - - DEPRECATED: gpiochip_set_chained_irqchip(): sets up a chained cascaded irq 511 - handler for a gpio_chip from a parent IRQ and passes the struct gpio_chip* 512 - as handler data. Notice that we pass is as the handler data, since the 513 - irqchip data is likely used by the parent irqchip. 514 - 515 510 - gpiochip_set_nested_irqchip(): sets up a nested cascaded irq handler for a 516 511 gpio_chip from a parent IRQ. As the parent IRQ has usually been 517 512 explicitly requested by the driver, this does very little more than
+1 -2
drivers/gpio/gpio-mt7621.c
··· 253 253 254 254 /* 255 255 * Directly request the irq here instead of passing 256 - * a flow-handler to gpiochip_set_chained_irqchip, 257 - * because the irq is shared. 256 + * a flow-handler because the irq is shared. 258 257 */ 259 258 ret = devm_request_irq(dev, mtk->gpio_irq, 260 259 mediatek_gpio_irq_handler, IRQF_SHARED,
+1 -2
drivers/gpio/gpio-xgs-iproc.c
··· 251 251 252 252 /* 253 253 * Directly request the irq here instead of passing 254 - * a flow-handler to gpiochip_set_chained_irqchip, 255 - * because the irq is shared. 254 + * a flow-handler because the irq is shared. 256 255 */ 257 256 ret = devm_request_irq(dev, irq, iproc_gpio_irq_handler, 258 257 IRQF_SHARED, chip->gc.label, &chip->gc);
+1 -24
drivers/gpio/gpiolib.c
··· 1805 1805 * gpiochip_set_cascaded_irqchip() - connects a cascaded irqchip to a gpiochip 1806 1806 * @gc: the gpiochip to set the irqchip chain to 1807 1807 * @parent_irq: the irq number corresponding to the parent IRQ for this 1808 - * chained irqchip 1808 + * cascaded irqchip 1809 1809 * @parent_handler: the parent interrupt handler for the accumulated IRQ 1810 1810 * coming out of the gpiochip. If the interrupt is nested rather than 1811 1811 * cascaded, pass NULL in this handler argument ··· 1846 1846 gc); 1847 1847 } 1848 1848 } 1849 - 1850 - /** 1851 - * gpiochip_set_chained_irqchip() - connects a chained irqchip to a gpiochip 1852 - * @gpiochip: the gpiochip to set the irqchip chain to 1853 - * @irqchip: the irqchip to chain to the gpiochip 1854 - * @parent_irq: the irq number corresponding to the parent IRQ for this 1855 - * chained irqchip 1856 - * @parent_handler: the parent interrupt handler for the accumulated IRQ 1857 - * coming out of the gpiochip. 1858 - */ 1859 - void gpiochip_set_chained_irqchip(struct gpio_chip *gpiochip, 1860 - struct irq_chip *irqchip, 1861 - unsigned int parent_irq, 1862 - irq_flow_handler_t parent_handler) 1863 - { 1864 - if (gpiochip->irq.threaded) { 1865 - chip_err(gpiochip, "tried to chain a threaded gpiochip\n"); 1866 - return; 1867 - } 1868 - 1869 - gpiochip_set_cascaded_irqchip(gpiochip, parent_irq, parent_handler); 1870 - } 1871 - EXPORT_SYMBOL_GPL(gpiochip_set_chained_irqchip); 1872 1849 1873 1850 /** 1874 1851 * gpiochip_set_nested_irqchip() - connects a nested irqchip to a gpiochip
-5
include/linux/gpio/driver.h
··· 585 585 void gpiochip_irq_domain_deactivate(struct irq_domain *domain, 586 586 struct irq_data *data); 587 587 588 - void gpiochip_set_chained_irqchip(struct gpio_chip *gpiochip, 589 - struct irq_chip *irqchip, 590 - unsigned int parent_irq, 591 - irq_flow_handler_t parent_handler); 592 - 593 588 void gpiochip_set_nested_irqchip(struct gpio_chip *gpiochip, 594 589 struct irq_chip *irqchip, 595 590 unsigned int parent_irq);