aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorPhilipp Zabel <philipp.zabel@gmail.com>2008-02-07 03:13:22 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-07 11:42:06 -0500
commit4aa323bd839604dd83aec56ed3a88df352c3339d (patch)
treef9c349b851ddd473837382e87d3f10f22cda4a06 /drivers
parenteccba068915feece2868c502787037e244db3376 (diff)
DS1WM: decouple host IRQ and INTR active state settings
The DS1WM driver incorrectly infers the IAS bit (1-wire interrupt active high) from IRQ settings. There are devices that have IAS=0 but still need the IRQ to trigger on a rising edge. With this patch, machines with DS1WM that need IAS=1 have to set .active_high=1 in the ds1wm_platform_data. Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Acked-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Acked-by: Matt Reimer <mreimer@vpop.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/w1/masters/ds1wm.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/w1/masters/ds1wm.c b/drivers/w1/masters/ds1wm.c
index 5747997f8d7d..688e435b4d9a 100644
--- a/drivers/w1/masters/ds1wm.c
+++ b/drivers/w1/masters/ds1wm.c
@@ -361,11 +361,12 @@ static int ds1wm_probe(struct platform_device *pdev)
361 goto err1; 361 goto err1;
362 } 362 }
363 ds1wm_data->irq = res->start; 363 ds1wm_data->irq = res->start;
364 ds1wm_data->active_high = (res->flags & IORESOURCE_IRQ_HIGHEDGE) ? 364 ds1wm_data->active_high = plat->active_high;
365 1 : 0;
366 365
367 set_irq_type(ds1wm_data->irq, ds1wm_data->active_high ? 366 if (res->flags & IORESOURCE_IRQ_HIGHEDGE)
368 IRQ_TYPE_EDGE_RISING : IRQ_TYPE_EDGE_FALLING); 367 set_irq_type(ds1wm_data->irq, IRQ_TYPE_EDGE_RISING);
368 if (res->flags & IORESOURCE_IRQ_LOWEDGE)
369 set_irq_type(ds1wm_data->irq, IRQ_TYPE_EDGE_FALLING);
369 370
370 ret = request_irq(ds1wm_data->irq, ds1wm_isr, IRQF_DISABLED, 371 ret = request_irq(ds1wm_data->irq, ds1wm_isr, IRQF_DISABLED,
371 "ds1wm", ds1wm_data); 372 "ds1wm", ds1wm_data);