2008-03-28 12:51:07

by David Fries

[permalink] [raw]
Subject: [PATCH 8/35] W1: feature, w1_therm.c use strong pullup

w1_therm.c 1.3 1.4 1.10
Use the strong pullup not the sleep. Note that the pullup goes before
W1_CONVERT_TEMP not after.
+w1_next_pullup(dev, tm);
w1_write_8(dev, W1_CONVERT_TEMP);
-msleep(tm);

Signed-off-by: David Fries <[email protected]>
---
drivers/w1/slaves/w1_therm.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/w1/slaves/w1_therm.c b/drivers/w1/slaves/w1_therm.c
index fb28aca..dd26db2 100644
--- a/drivers/w1/slaves/w1_therm.c
+++ b/drivers/w1/slaves/w1_therm.c
@@ -192,10 +192,10 @@ static ssize_t w1_therm_read_bin(struct kobject *kobj,
int count = 0;
unsigned int tm = 750;

+ /* 750ms strong pullup (or delay) after the convert */
+ w1_next_pullup(dev, tm);
w1_write_8(dev, W1_CONVERT_TEMP);

- msleep(tm);
-
if (!w1_reset_select_slave(sl)) {

w1_write_8(dev, W1_READ_SCRATCHPAD);
--
1.4.4.4


Attachments:
(No filename) (877.00 B)
(No filename) (189.00 B)
Download all attachments

2008-03-30 11:30:40

by Evgeniy Polyakov

[permalink] [raw]
Subject: Re: [PATCH 8/35] W1: feature, w1_therm.c use strong pullup

On Fri, Mar 28, 2008 at 07:25:10AM -0500, David Fries ([email protected]) wrote:
> w1_therm.c 1.3 1.4 1.10
> Use the strong pullup not the sleep. Note that the pullup goes before
> W1_CONVERT_TEMP not after.
> +w1_next_pullup(dev, tm);
> w1_write_8(dev, W1_CONVERT_TEMP);
> -msleep(tm);

I'm ok with it, but believe it has to be turned off by default and be
able to be turned on by parameter.

Did you test it with multiple devices on the same bus?

--
Evgeniy Polyakov