From: Eddie James <eajames@linux.ibm.com>
To: linux-i2c@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org,
jic23@kernel.org, lars@metafoo.de, wsa@kernel.org,
milton@us.ibm.com, peda@axentia.se,
Eddie James <eajames@linux.ibm.com>
Subject: [RFC 0/2] i2c: core and si7020: Add adapter transfer callback
Date: Wed, 18 May 2022 15:41:17 -0500 [thread overview]
Message-ID: <20220518204119.38943-1-eajames@linux.ibm.com> (raw)
This series adds a callback function pointer to be executed after the
adapter performs a transfer. The purpose of such a callback is for a
client to execute some code while "owning" the bus entirely. Holding the
adapter lock is insufficient in the case where the client is behind a
mux, as the mux driver could perform mux selection operations on the
bus while locked. The only use case for now is the SI7020 driver. While
the SI7020 is starting up after power on or reset, any I2C commands on the
bus can potentially upset the startup sequence. Since the SI7020 may be
behind a mux, the driver needs to use the new transfer callback to sleep
while the chip starts up.
Eddie James (2):
i2c: core: Add adapter transfer callback
iio: humidity: si7020: Use core transfer callback to sleep after reset
drivers/i2c/i2c-core-base.c | 3 +++
drivers/iio/humidity/si7020.c | 12 ++++++++++--
include/linux/i2c.h | 25 +++++++++++++++++++++++++
3 files changed, 38 insertions(+), 2 deletions(-)
--
2.27.0
next reply other threads:[~2022-05-18 20:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-18 20:41 Eddie James [this message]
2022-05-18 20:41 ` [RFC 1/2] i2c: core: Add adapter transfer callback Eddie James
2022-05-20 11:42 ` Peter Rosin
2022-05-18 20:41 ` [RFC 2/2] iio: humidity: si7020: Use core transfer callback to sleep after 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=20220518204119.38943-1-eajames@linux.ibm.com \
--to=eajames@linux.ibm.com \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=milton@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 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.