From: Eddie James <eajames@linux.ibm.com>
To: linux-i2c@vger.kernel.org
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
wsa@kernel.org, peda@axentia.se, jic23@kernel.org,
lars@metafoo.de, eajames@linux.ibm.com, miltonm@us.ibm.com,
joel@jms.id.au
Subject: [PATCH 0/2] i2c: core: Add mux root adapter operations
Date: Thu, 26 May 2022 15:53:32 -0500 [thread overview]
Message-ID: <20220526205334.64114-1-eajames@linux.ibm.com> (raw)
Some I2C clients need the ability to control the root I2C bus even if the
endpoint device is behind a mux. For example, a driver for a chip that
can't handle any I2C traffic on the bus while coming out of reset
(including an I2C-driven mux switching channels) may need to lock the root
bus with the mux selection fixed for the entire time the device is in
reset.
The SI7020 is such a device. This series adds the ability to the I2C core
to lock the root adapter of a client and fix the mux channel selection
until unlocked. The patch to the SI7020 driver then uses the new functions
to do just that and make sure the chip reset is safe.
I included the IIO patch for context, I can split and resubmit to iio list
only if necessary.
Thanks to Milton for the general idea here.
Eddie James (2):
i2c: core: Add mux root adapter operations
iio: si7020: Lock root adapter to wait for reset
drivers/i2c/i2c-core-base.c | 38 ++++++++++++++++++++++++++
drivers/i2c/i2c-mux.c | 50 +++++++++++++++++++++++++++++++++++
drivers/iio/humidity/si7020.c | 16 +++++++++--
include/linux/i2c.h | 42 +++++++++++++++++++++++++++++
4 files changed, 144 insertions(+), 2 deletions(-)
--
2.27.0
next reply other threads:[~2022-05-26 20:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-26 20:53 Eddie James [this message]
2022-05-26 20:53 ` [PATCH 1/2] i2c: core: Add mux root adapter operations Eddie James
2022-05-27 16:50 ` kernel test robot
2022-06-03 8:01 ` Joel Stanley
2022-09-06 20:10 ` Eddie James
2022-05-26 20:53 ` [PATCH 2/2] iio: si7020: Lock root adapter to wait for reset Eddie James
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=20220526205334.64114-1-eajames@linux.ibm.com \
--to=eajames@linux.ibm.com \
--cc=jic23@kernel.org \
--cc=joel@jms.id.au \
--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=wsa@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;
as well as URLs for NNTP newsgroup(s).