mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Flaschberger <ingo.flaschberger@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: w1_therm should not unlock bus if strong pullup is forced
Date: Tue, 6 Jun 2017 04:27:10 +0200	[thread overview]
Message-ID: <a3d4749c-2480-b5b0-6759-e7265134ff74@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 249 bytes --]

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



[-- Attachment #2: w1_therm.diff --]
[-- Type: text/plain, Size: 549 bytes --]

--- 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);

                 reply	other threads:[~2017-06-06  2:27 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a3d4749c-2480-b5b0-6759-e7265134ff74@gmail.com \
    --to=ingo.flaschberger@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®