diff options
-rw-r--r-- | drivers/mfd/asic3.c | 1 | ||||
-rw-r--r-- | drivers/mfd/htc-pasic3.c | 1 | ||||
-rw-r--r-- | drivers/w1/masters/ds1wm.c | 5 | ||||
-rw-r--r-- | include/linux/mfd/ds1wm.h | 7 |
4 files changed, 14 insertions, 0 deletions
diff --git a/drivers/mfd/asic3.c b/drivers/mfd/asic3.c index c27fd1fc3b86..c71ae09430c5 100644 --- a/drivers/mfd/asic3.c +++ b/drivers/mfd/asic3.c | |||
@@ -619,6 +619,7 @@ static void asic3_clk_disable(struct asic3 *asic, struct asic3_clk *clk) | |||
619 | /* MFD cells (SPI, PWM, LED, DS1WM, MMC) */ | 619 | /* MFD cells (SPI, PWM, LED, DS1WM, MMC) */ |
620 | static struct ds1wm_driver_data ds1wm_pdata = { | 620 | static struct ds1wm_driver_data ds1wm_pdata = { |
621 | .active_high = 1, | 621 | .active_high = 1, |
622 | .reset_recover_delay = 1, | ||
622 | }; | 623 | }; |
623 | 624 | ||
624 | static struct resource ds1wm_resources[] = { | 625 | static struct resource ds1wm_resources[] = { |
diff --git a/drivers/mfd/htc-pasic3.c b/drivers/mfd/htc-pasic3.c index 2808bd125d13..04c7093d6499 100644 --- a/drivers/mfd/htc-pasic3.c +++ b/drivers/mfd/htc-pasic3.c | |||
@@ -99,6 +99,7 @@ static int ds1wm_disable(struct platform_device *pdev) | |||
99 | 99 | ||
100 | static struct ds1wm_driver_data ds1wm_pdata = { | 100 | static struct ds1wm_driver_data ds1wm_pdata = { |
101 | .active_high = 0, | 101 | .active_high = 0, |
102 | .reset_recover_delay = 1, | ||
102 | }; | 103 | }; |
103 | 104 | ||
104 | static struct resource ds1wm_resources[] __initdata = { | 105 | static struct resource ds1wm_resources[] __initdata = { |
diff --git a/drivers/w1/masters/ds1wm.c b/drivers/w1/masters/ds1wm.c index ad57593d224a..a0c8965c1a79 100644 --- a/drivers/w1/masters/ds1wm.c +++ b/drivers/w1/masters/ds1wm.c | |||
@@ -109,6 +109,7 @@ struct ds1wm_data { | |||
109 | /* byte to write that makes all intr disabled, */ | 109 | /* byte to write that makes all intr disabled, */ |
110 | /* considering active_state (IAS) (optimization) */ | 110 | /* considering active_state (IAS) (optimization) */ |
111 | u8 int_en_reg_none; | 111 | u8 int_en_reg_none; |
112 | unsigned int reset_recover_delay; /* see ds1wm.h */ | ||
112 | }; | 113 | }; |
113 | 114 | ||
114 | static inline void ds1wm_write_register(struct ds1wm_data *ds1wm_data, u32 reg, | 115 | static inline void ds1wm_write_register(struct ds1wm_data *ds1wm_data, u32 reg, |
@@ -187,6 +188,9 @@ static int ds1wm_reset(struct ds1wm_data *ds1wm_data) | |||
187 | return 1; | 188 | return 1; |
188 | } | 189 | } |
189 | 190 | ||
191 | if (ds1wm_data->reset_recover_delay) | ||
192 | msleep(ds1wm_data->reset_recover_delay); | ||
193 | |||
190 | return 0; | 194 | return 0; |
191 | } | 195 | } |
192 | 196 | ||
@@ -490,6 +494,7 @@ static int ds1wm_probe(struct platform_device *pdev) | |||
490 | } | 494 | } |
491 | ds1wm_data->irq = res->start; | 495 | ds1wm_data->irq = res->start; |
492 | ds1wm_data->int_en_reg_none = (plat->active_high ? DS1WM_INTEN_IAS : 0); | 496 | ds1wm_data->int_en_reg_none = (plat->active_high ? DS1WM_INTEN_IAS : 0); |
497 | ds1wm_data->reset_recover_delay = plat->reset_recover_delay; | ||
493 | 498 | ||
494 | if (res->flags & IORESOURCE_IRQ_HIGHEDGE) | 499 | if (res->flags & IORESOURCE_IRQ_HIGHEDGE) |
495 | irq_set_irq_type(ds1wm_data->irq, IRQ_TYPE_EDGE_RISING); | 500 | irq_set_irq_type(ds1wm_data->irq, IRQ_TYPE_EDGE_RISING); |
diff --git a/include/linux/mfd/ds1wm.h b/include/linux/mfd/ds1wm.h index be469a357cbb..38a372a0e285 100644 --- a/include/linux/mfd/ds1wm.h +++ b/include/linux/mfd/ds1wm.h | |||
@@ -3,4 +3,11 @@ | |||
3 | struct ds1wm_driver_data { | 3 | struct ds1wm_driver_data { |
4 | int active_high; | 4 | int active_high; |
5 | int clock_rate; | 5 | int clock_rate; |
6 | /* in milliseconds, the amount of time to */ | ||
7 | /* sleep following a reset pulse. Zero */ | ||
8 | /* should work if your bus devices recover*/ | ||
9 | /* time respects the 1-wire spec since the*/ | ||
10 | /* ds1wm implements the precise timings of*/ | ||
11 | /* a reset pulse/presence detect sequence.*/ | ||
12 | unsigned int reset_recover_delay; | ||
6 | }; | 13 | }; |