Skip to contentSkip to conversation

w1_therm should not unlock bus if strong pullup is forced

PATCH Ingo Flaschberger 1 participant 1 message Jun 6, 2017

lore
Share & tools
lore
#0 lore raw

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 renamed from w1_therm.c_org +2 -2
@@ -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);