Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 254746
b: refs/heads/master
c: f607e7f
h: refs/heads/master
v: v3
  • Loading branch information
Jean-François Dagenais authored and Linus Torvalds committed Jul 9, 2011
1 parent a052e6a commit 45c233d
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 453a9bf347f1e22a5bb3605ced43b2366921221d
refs/heads/master: f607e7fc5fb94d92030c4527287e9c149ddf9e65
1 change: 1 addition & 0 deletions trunk/drivers/mfd/asic3.c
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,7 @@ static void asic3_clk_disable(struct asic3 *asic, struct asic3_clk *clk)
/* MFD cells (SPI, PWM, LED, DS1WM, MMC) */
static struct ds1wm_driver_data ds1wm_pdata = {
.active_high = 1,
.reset_recover_delay = 1,
};

static struct resource ds1wm_resources[] = {
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/mfd/htc-pasic3.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ static int ds1wm_disable(struct platform_device *pdev)

static struct ds1wm_driver_data ds1wm_pdata = {
.active_high = 0,
.reset_recover_delay = 1,
};

static struct resource ds1wm_resources[] __initdata = {
Expand Down
5 changes: 5 additions & 0 deletions trunk/drivers/w1/masters/ds1wm.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ struct ds1wm_data {
/* byte to write that makes all intr disabled, */
/* considering active_state (IAS) (optimization) */
u8 int_en_reg_none;
unsigned int reset_recover_delay; /* see ds1wm.h */
};

static inline void ds1wm_write_register(struct ds1wm_data *ds1wm_data, u32 reg,
Expand Down Expand Up @@ -187,6 +188,9 @@ static int ds1wm_reset(struct ds1wm_data *ds1wm_data)
return 1;
}

if (ds1wm_data->reset_recover_delay)
msleep(ds1wm_data->reset_recover_delay);

return 0;
}

Expand Down Expand Up @@ -490,6 +494,7 @@ static int ds1wm_probe(struct platform_device *pdev)
}
ds1wm_data->irq = res->start;
ds1wm_data->int_en_reg_none = (plat->active_high ? DS1WM_INTEN_IAS : 0);
ds1wm_data->reset_recover_delay = plat->reset_recover_delay;

if (res->flags & IORESOURCE_IRQ_HIGHEDGE)
irq_set_irq_type(ds1wm_data->irq, IRQ_TYPE_EDGE_RISING);
Expand Down
7 changes: 7 additions & 0 deletions trunk/include/linux/mfd/ds1wm.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,11 @@
struct ds1wm_driver_data {
int active_high;
int clock_rate;
/* in milliseconds, the amount of time to */
/* sleep following a reset pulse. Zero */
/* should work if your bus devices recover*/
/* time respects the 1-wire spec since the*/
/* ds1wm implements the precise timings of*/
/* a reset pulse/presence detect sequence.*/
unsigned int reset_recover_delay;
};

0 comments on commit 45c233d

Please sign in to comment.