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

rtc: m41t80: use IRQ flags obtained from fwnode

Allow the IRQ type to be passed from the device tree if available as there
may be components changing the trigger type of the interrupt between the
RTC and the IRQ controller.

Link: https://lore.kernel.org/r/20230123200217.1236011-4-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>

+6 -1
+6 -1
drivers/rtc/rtc-m41t80.c
··· 914 914 "wakeup-source"); 915 915 #endif 916 916 if (client->irq > 0) { 917 + unsigned long irqflags = IRQF_TRIGGER_LOW; 918 + 919 + if (dev_fwnode(&client->dev)) 920 + irqflags = 0; 921 + 917 922 rc = devm_request_threaded_irq(&client->dev, client->irq, 918 923 NULL, m41t80_handle_irq, 919 - IRQF_TRIGGER_LOW | IRQF_ONESHOT, 924 + irqflags | IRQF_ONESHOT, 920 925 "m41t80", client); 921 926 if (rc) { 922 927 dev_warn(&client->dev, "unable to request IRQ, alarms disabled\n");