Skip to content

Commit 72780ce

Browse files
committed
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 <[email protected]> Signed-off-by: Linus Walleij <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
1 parent eec6d97 commit 72780ce

File tree

5 files changed

+3
-38
lines changed

5 files changed

+3
-38
lines changed

Documentation/driver-api/gpio/driver.rst

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -507,11 +507,6 @@ available but we try to move away from this:
507507
cascaded irq has to be handled by a threaded interrupt handler.
508508
Apart from that it works exactly like the chained irqchip.
509509

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-
515510
- gpiochip_set_nested_irqchip(): sets up a nested cascaded irq handler for a
516511
gpio_chip from a parent IRQ. As the parent IRQ has usually been
517512
explicitly requested by the driver, this does very little more than

drivers/gpio/gpio-mt7621.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,7 @@ mediatek_gpio_bank_probe(struct device *dev,
253253

254254
/*
255255
* 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.
258257
*/
259258
ret = devm_request_irq(dev, mtk->gpio_irq,
260259
mediatek_gpio_irq_handler, IRQF_SHARED,

drivers/gpio/gpio-xgs-iproc.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,7 @@ static int iproc_gpio_probe(struct platform_device *pdev)
251251

252252
/*
253253
* 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.
256255
*/
257256
ret = devm_request_irq(dev, irq, iproc_gpio_irq_handler,
258257
IRQF_SHARED, chip->gc.label, &chip->gc);

drivers/gpio/gpiolib.c

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1805,7 +1805,7 @@ EXPORT_SYMBOL_GPL(gpiochip_irqchip_irq_valid);
18051805
* gpiochip_set_cascaded_irqchip() - connects a cascaded irqchip to a gpiochip
18061806
* @gc: the gpiochip to set the irqchip chain to
18071807
* @parent_irq: the irq number corresponding to the parent IRQ for this
1808-
* chained irqchip
1808+
* cascaded irqchip
18091809
* @parent_handler: the parent interrupt handler for the accumulated IRQ
18101810
* coming out of the gpiochip. If the interrupt is nested rather than
18111811
* cascaded, pass NULL in this handler argument
@@ -1847,29 +1847,6 @@ static void gpiochip_set_cascaded_irqchip(struct gpio_chip *gc,
18471847
}
18481848
}
18491849

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-
18731850
/**
18741851
* gpiochip_set_nested_irqchip() - connects a nested irqchip to a gpiochip
18751852
* @gpiochip: the gpiochip to set the irqchip nested handler to

include/linux/gpio/driver.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -585,11 +585,6 @@ int gpiochip_irq_domain_activate(struct irq_domain *domain,
585585
void gpiochip_irq_domain_deactivate(struct irq_domain *domain,
586586
struct irq_data *data);
587587

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-
593588
void gpiochip_set_nested_irqchip(struct gpio_chip *gpiochip,
594589
struct irq_chip *irqchip,
595590
unsigned int parent_irq);

0 commit comments

Comments
 (0)