w1: ds1wm: add level interrupt modes
authorJohannes Poehlmann <johannes.poehlmann@izt-labs.de>
Tue, 25 Jul 2017 11:27:13 +0000 (13:27 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Aug 2017 15:20:01 +0000 (17:20 +0200)
w1: ds1wm: add level interrupt modes

Signed-off-by: Johannes Poehlmann <johannes.poehlmann@izt-labs.de>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/w1/masters/ds1wm.c

index d15575d..f8a3ba0 100644 (file)
@@ -566,6 +566,10 @@ static int ds1wm_probe(struct platform_device *pdev)
                irq_set_irq_type(ds1wm_data->irq, IRQ_TYPE_EDGE_RISING);
        if (res->flags & IORESOURCE_IRQ_LOWEDGE)
                irq_set_irq_type(ds1wm_data->irq, IRQ_TYPE_EDGE_FALLING);
+       if (res->flags & IORESOURCE_IRQ_HIGHLEVEL)
+               irq_set_irq_type(ds1wm_data->irq, IRQ_TYPE_LEVEL_HIGH);
+       if (res->flags & IORESOURCE_IRQ_LOWLEVEL)
+               irq_set_irq_type(ds1wm_data->irq, IRQ_TYPE_LEVEL_LOW);
 
        ret = devm_request_irq(&pdev->dev, ds1wm_data->irq, ds1wm_isr,
                        IRQF_SHARED, "ds1wm", ds1wm_data);