File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,9 +34,16 @@ currently supported. The driver also doesn't support reduced
3434precision (which would also reduce the conversion time).
3535
3636The module parameter strong_pullup can be set to 0 to disable the
37- strong pullup or 1 to enable. If enabled the 5V strong pullup will be
38- enabled when the conversion is taking place provided the master driver
39- must support the strong pullup (or it falls back to a pullup
37+ strong pullup, 1 to enable autodetection or 2 to force strong pullup.
38+ In case of autodetection, the driver will use the "READ POWER SUPPLY"
39+ command to check if there are pariste powered devices on the bus.
40+ If so, it will activate the master's strong pullup.
41+ In case the detection of parasite devices using this command fails
42+ (seems to be the case with some DS18S20) the strong pullup can
43+ be force-enabled.
44+ If the strong pullup is enabled, the master's strong pullup will be
45+ driven when the conversion is taking place, provided the master driver
46+ does support the strong pullup (or it falls back to a pullup
4047resistor). The DS18b20 temperature sensor specification lists a
4148maximum current draw of 1.5mA and that a 5k pullup resistor is not
4249sufficient. The strong pullup is designed to provide the additional
Original file line number Diff line number Diff line change @@ -41,6 +41,14 @@ MODULE_DESCRIPTION("Driver for 1-wire Dallas network protocol, temperature famil
4141 * If it was disabled a parasite powered device might not get the require
4242 * current to do a temperature conversion. If it is enabled parasite powered
4343 * devices have a better chance of getting the current required.
44+ * In case the parasite power-detection is not working (seems to be the case
45+ * for some DS18S20) the strong pullup can also be forced, regardless of the
46+ * power state of the devices.
47+ *
48+ * Summary of options:
49+ * - strong_pullup = 0 Disable strong pullup completely
50+ * - strong_pullup = 1 Enable automatic strong pullup detection
51+ * - strong_pullup = 2 Force strong pullup
4452 */
4553static int w1_strong_pullup = 1 ;
4654module_param_named (strong_pullup , w1_strong_pullup , int , 0 );
@@ -197,7 +205,8 @@ static ssize_t w1_therm_read(struct device *device,
197205 continue ;
198206
199207 /* 750ms strong pullup (or delay) after the convert */
200- if (!external_power && w1_strong_pullup )
208+ if (w1_strong_pullup == 2 ||
209+ (!external_power && w1_strong_pullup ))
201210 w1_next_pullup (dev , tm );
202211
203212 w1_write_8 (dev , W1_CONVERT_TEMP );
You can’t perform that action at this time.
0 commit comments