pinctrl: mcp23s08: Don't change irq trigger type
Subsystems (2)
PATCH 1/1 pinctrl: mcp23s08: Don't change irq trigger type
IRQ polarity option "microchip,irq-active-high" not only sets polarity in IOCON_INTPOL register, but also imposes trigger type to interrupt-parent. Trigger type must be taken from device-tree "interrupts" property, otherwise:
- trigger type in device-tree unexpectedly doesn't correspond to real one;
- it's impossible to use inverting level shifter between mcp and interrupt-parent;
Signed-off-by Dmitry Mastykin <[email protected]>
--- drivers/pinctrl/pinctrl-mcp23s08.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)
drivers/pinctrl/pinctrl-mcp23s08.c +2 -7
@@ -572,16 +572,11 @@ static int mcp23s08_irq_setup(struct mcp23s08 *mcp) {struct gpio_chip *chip = &mcp->chip;int err; -unsigned long irqflags =IRQF_ONESHOT |IRQF_SHARED ; - -if (mcp->irq_active_high) - irqflags |=IRQF_TRIGGER_HIGH ; -else - irqflags |=IRQF_TRIGGER_LOW ; err =devm_request_threaded_irq (chip->parent, mcp->irq,NULL , mcp23s08_irq, - irqflags,dev_name (chip->parent), mcp); +IRQF_ONESHOT |IRQF_SHARED , +dev_name (chip->parent), mcp);if (err !=0 ) {dev_err (chip->parent,"unable to request IRQ#%d: %d\n" , mcp->irq, err);
Signature · 1 line
2.34.1