w1_therm should not unlock bus if strong pullup is forced

From: Ingo Flaschberger
Date: Mon Jun 05 2017 - 22:27:56 EST


Hi,

If strong pullup is forced (=2) a strong pullup is placed for 750ms.
Is also external power detected the bus will be unlocked and a additional 750ms sleep is performed.
This 2nd sleep should be avoided.

Kind regards,
Ingo Flaschberger


--- w1_therm.c_org 2017-06-06 04:05:48.028105363 +0200
+++ w1_therm.c 2017-06-06 04:05:36.883914878 +0200
@@ -245,7 +245,7 @@

w1_write_8(dev, W1_COPY_SCRATCHPAD);

- if (external_power) {
+ if (external_power && w1_strong_pullup != 2) {
mutex_unlock(&dev->bus_mutex);

sleep_rem = msleep_interruptible(tm);
@@ -473,7 +473,7 @@

w1_write_8(dev, W1_CONVERT_TEMP);

- if (external_power) {
+ if (external_power && w1_strong_pullup != 2) {
mutex_unlock(&dev->bus_mutex);

sleep_rem = msleep_interruptible(tm);