All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Shearman <robertshearman@gmail.com>
To: Peter Rosin <peda@axentia.se>, Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>
Cc: "linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Robert Shearman <robert.shearman@att.com>
Subject: Re: [PATCH 1/2] i2c: mux: pca954x: change the default to deselect after each transfer
Date: Tue, 22 Jan 2019 10:17:43 +0000	[thread overview]
Message-ID: <66870ca6-4789-57d9-ce30-2beb96efb86b@gmail.com> (raw)
In-Reply-To: <9b484cde-c20c-2078-9a55-eab27b56ef36@axentia.se>

Hi Peter,

On 22/01/2019 08:41, Peter Rosin wrote:
> Hi Robert,
> 
> Thanks, for your patches.
> 
> On 2019-01-21 17:47, Robert Shearman wrote:
>> From: Robert Shearman <robert.shearman@att.com>
>>
>> The behaviour, by default, to not deselect after each transfer is
>> not safe/correct when there is a device with an address that conflicts
>> with another device either on the parent bus, or on another pca954x
>> mux on the same parent bus.
> 
> Right. The current way might not be the safest, but the way I see it,
> this ship has sailed a long time ago. It might take quite a while
> before someone reports a regression, but when that happens and we
> need to revisit or even revert this, things will get ugly.
> 
> Also, doubling or even tripling the I2C traffic (most I2C xfers
> are small) for unsuspecting users with more normal I2C setups
> (w/o multiple muxes) just to accommodate the more complexes cases
> is arguably not the correct balance.

Ok, thanks for considering the changes. Would a device-level sysfs 
toggle or module parameter approach be more acceptable?

The use case where we are hitting this issue is on an x86_64 ACPI 
platform where we desire to use a general purpose kernel, so the 
existing devicetree and platform data toggle approaches are not ideal 
for us.

> 
>> Therefore, default to the least surprising mode, where the mux
>> channels are deselected after each transaction, which is safe in the
>> face of one or more devices hanging off the mux with addresses that
>> conflict with other devices on different muxes, or on the parent
> 
> Side note, and not that it matters since it's a NACK anyway, but
> having an address conflict with the parent bus is not allowed and is
> just bad hardware design that simply cannot work reliably, if at all.

Yes, good point.

Thanks,
Rob

      reply	other threads:[~2019-01-22 10:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-21 16:47 [PATCH 1/2] i2c: mux: pca954x: change the default to deselect after each transfer Robert Shearman
2019-01-21 16:47 ` [PATCH 2/2] dt-bindings: i2c-mux-pca954x: Invert i2c-mux-idle-disconnect property Robert Shearman
2019-01-22  8:41 ` [PATCH 1/2] i2c: mux: pca954x: change the default to deselect after each transfer Peter Rosin
2019-01-22 10:17   ` Robert Shearman [this message]

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=66870ca6-4789-57d9-ce30-2beb96efb86b@gmail.com \
    --to=robertshearman@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=peda@axentia.se \
    --cc=robert.shearman@att.com \
    --cc=robh+dt@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 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.