Commit 1d925f45 authored by Johannes Poehlmann's avatar Johannes Poehlmann Committed by Greg Kroah-Hartman

w1: ds1wm: silence interrupts on HW before claiming the interrupt

w1: ds1wm: silence interrupts on HW before claiming the interrupt.
This way avoid possible invalid interrupts in the initialization phase.
Signed-off-by: default avatarJohannes Poehlmann <johannes.poehlmann@izt-labs.de>
Acked-by: default avatarEvgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c3248f0e
...@@ -509,6 +509,7 @@ static int ds1wm_probe(struct platform_device *pdev) ...@@ -509,6 +509,7 @@ static int ds1wm_probe(struct platform_device *pdev)
struct ds1wm_driver_data *plat; struct ds1wm_driver_data *plat;
struct resource *res; struct resource *res;
int ret; int ret;
u8 inten;
if (!pdev) if (!pdev)
return -ENODEV; return -ENODEV;
...@@ -562,6 +563,11 @@ static int ds1wm_probe(struct platform_device *pdev) ...@@ -562,6 +563,11 @@ static int ds1wm_probe(struct platform_device *pdev)
ds1wm_data->int_en_reg_none = (plat->active_high ? DS1WM_INTEN_IAS : 0); ds1wm_data->int_en_reg_none = (plat->active_high ? DS1WM_INTEN_IAS : 0);
ds1wm_data->reset_recover_delay = plat->reset_recover_delay; ds1wm_data->reset_recover_delay = plat->reset_recover_delay;
/* Mask interrupts, set IAS before claiming interrupt */
inten = ds1wm_read_register(ds1wm_data, DS1WM_INT_EN);
ds1wm_write_register(ds1wm_data,
DS1WM_INT_EN, ds1wm_data->int_en_reg_none);
if (res->flags & IORESOURCE_IRQ_HIGHEDGE) if (res->flags & IORESOURCE_IRQ_HIGHEDGE)
irq_set_irq_type(ds1wm_data->irq, IRQ_TYPE_EDGE_RISING); irq_set_irq_type(ds1wm_data->irq, IRQ_TYPE_EDGE_RISING);
if (res->flags & IORESOURCE_IRQ_LOWEDGE) if (res->flags & IORESOURCE_IRQ_LOWEDGE)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment