All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
To: Eddie James <eajames@linux.ibm.com>
Cc: <linux-iio@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	<krzysztof.kozlowski+dt@linaro.org>, <robh+dt@kernel.org>,
	<lars@metafoo.de>, <jic23@kernel.org>, <miltonm@us.ibm.com>,
	Peter Rosin <peda@axentia.se>, <linux-i2c@vger.kernel.org>
Subject: Re: [PATCH v2 0/2] iio: humidity: si7020: Check device property for skipping reset in probe
Date: Fri, 13 May 2022 17:45:31 +0100	[thread overview]
Message-ID: <20220513174531.00007b9b@Huawei.com> (raw)
In-Reply-To: <4fd44316-689e-1b72-d483-2c617d2a455d@linux.ibm.com>

On Thu, 12 May 2022 12:08:07 -0500
Eddie James <eajames@linux.ibm.com> wrote:

> On 5/12/22 11:48, Jonathan Cameron wrote:
> > On Thu, 12 May 2022 11:20:18 -0500
> > Eddie James <eajames@linux.ibm.com> wrote:
> >  
> >> I2C commands issued after the SI7020 is starting up or after reset
> >> can potentially upset the startup sequence. Therefore, the host
> >> needs to wait for the startup sequence to finish before issuing
> >> further i2c commands. This is impractical in cases where the SI7020
> >> is on a shared bus or behind a mux, which may switch channels at
> >> any time (generating I2C traffic). Therefore, check for a device
> >> property that indicates that the driver should skip resetting the
> >> device when probing.  
> > Why not lock the bus?  It's not ideal, but then not resetting and hence
> > potentially ending up in an unknown state isn't great either.  
> 
> 
> Agreed, but locking the bus doesn't work in the case where the chip is 
> behind a mux. The mux core driver deselects the mux immediately after 
> the transfer to reset the si7020, causing some i2c traffic, breaking the 
> si7020. So it would also be a requirement to configure the mux to idle 
> as-is... That's why I went with the optional skipping of the reset. 
> Maybe I should add the bus lock too?
> 

+Cc Peter and linux-i2c for advice as we should resolve any potential
issue with the mux side of things rather than hiding it in the driver
(if possible!)

Jonathan




> 
> Thanks,
> 
> Eddie
> 
> 
> >
> > Jonathan
> >  
> >> Changes since v1:
> >>   - Fix dt binding document
> >>
> >> Eddie James (2):
> >>    dt-bindings: iio: humidity: Add si7020 bindings
> >>    iio: humidity: si7020: Check device property for skipping reset in probe
> >>
> >>   .../bindings/iio/humidity/silabs,si7020.yaml  | 47 +++++++++++++++++++
> >>   .../devicetree/bindings/trivial-devices.yaml  |  2 -
> >>   drivers/iio/humidity/si7020.c                 | 14 +++---
> >>   3 files changed, 55 insertions(+), 8 deletions(-)
> >>   create mode 100644 Documentation/devicetree/bindings/iio/humidity/silabs,si7020.yaml
> >>  


  reply	other threads:[~2022-05-13 16:45 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-12 16:20 [PATCH v2 0/2] iio: humidity: si7020: Check device property for skipping reset in probe Eddie James
2022-05-12 16:20 ` [PATCH v2 1/2] dt-bindings: iio: humidity: Add si7020 bindings Eddie James
2022-05-12 16:51   ` Jonathan Cameron
2022-05-12 17:08     ` Eddie James
2022-05-13 16:47       ` Jonathan Cameron
2022-05-13  8:55   ` Krzysztof Kozlowski
2022-05-12 16:20 ` [PATCH v2 2/2] iio: humidity: si7020: Check device property for skipping reset in probe Eddie James
2022-05-12 16:48 ` [PATCH v2 0/2] " Jonathan Cameron
2022-05-12 17:08   ` Eddie James
2022-05-13 16:45     ` Jonathan Cameron [this message]
2022-05-13 22:48       ` Peter Rosin
2022-05-14 13:43         ` Jonathan Cameron
2022-05-14 15:02           ` Peter Rosin
2022-05-18 15:28             ` Eddie James
2022-05-18 15:51               ` Eddie James
2022-05-12 19:11   ` Eddie James
2022-05-14 13:40     ` Jonathan Cameron

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=20220513174531.00007b9b@Huawei.com \
    --to=jonathan.cameron@huawei.com \
    --cc=devicetree@vger.kernel.org \
    --cc=eajames@linux.ibm.com \
    --cc=jic23@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lars@metafoo.de \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miltonm@us.ibm.com \
    --cc=peda@axentia.se \
    --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.