All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@the-dreams.de>
To: Russell King <rmk+kernel@armlinux.org.uk>
Cc: Peter Rosin <peda@axentia.se>, linux-i2c@vger.kernel.org
Subject: Re: [PATCH] i2c: mux: pca954x: fix i2c mux selection caching
Date: Sat, 17 Dec 2016 19:30:34 +0100	[thread overview]
Message-ID: <20161217183034.GC27020@katana> (raw)
In-Reply-To: <E1cIDpI-0005y4-SW@rmk-PC.armlinux.org.uk>

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

On Sat, Dec 17, 2016 at 12:10:56PM +0000, Russell King wrote:
> smbus functions return -ve on error, 0 on success.  However,
> __i2c_transfer() have a different return signature - -ve on error, or
> number of buffers transferred (which may be zero or greater.)
> 
> The upshot of this is that the sense of the test is reversed when using
> the mux on a bus supporting the master_xfer method: we cache the value
> and never retry if we fail to transfer any buffers, but if we succeed,
> we clear the cached value.
> 
> Fix this by making pca954x_reg_write() return a negative error code for
> all failure cases.
> 
> Fixes: 463e8f845cbf ("i2c: mux: pca954x: retry updating the mux selection on failure")
> Acked-by: Peter Rosin <peda@axentia.se>
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>

Applied to for-current, thanks!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2016-12-17 18:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-17 12:10 [PATCH] i2c: mux: pca954x: fix i2c mux selection caching Russell King
2016-12-17 18:30 ` Wolfram Sang [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-12-16 20:06 Russell King
2016-12-16 20:06 ` Russell King
2016-12-16 21:20 ` Peter Rosin
2016-12-16 21:20   ` Peter Rosin
2016-12-16 23:23   ` Russell King - ARM Linux
2016-12-16 23:23     ` Russell King - ARM Linux
2016-12-17  6:50     ` Peter Rosin
2016-12-17  6:50       ` Peter Rosin

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=20161217183034.GC27020@katana \
    --to=wsa@the-dreams.de \
    --cc=linux-i2c@vger.kernel.org \
    --cc=peda@axentia.se \
    --cc=rmk+kernel@armlinux.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.