From: Robert Shearman <robertshearman@gmail.com>
To: Peter Rosin <peda@axentia.se>, Guenter Roeck <linux@roeck-us.net>
Cc: linux-i2c@vger.kernel.org, Wolfram Sang <wsa@the-dreams.de>,
linux-kernel@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Robert Shearman <robert.shearman@att.com>
Subject: [PATCH v4 0/3] i2c: mux: pca954x: allow management of device idle state via sysfs
Date: Thu, 28 Feb 2019 11:43:40 +0000 [thread overview]
Message-ID: <20190228114343.36443-1-robertshearman@gmail.com> (raw)
From: Robert Shearman <robert.shearman@att.com>
The behaviour, by default, to not deselect after each transfer is
unsafe when there is a device with an address that conflicts with
another device on another pca954x mux on the same parent bus, and it
may not be convenient to use devicetree to set the deselect mux,
e.g. when running on x86_64 when ACPI is used to discover most of the
device hierarchy.
Therefore, provide the ability to set the idle state behaviour using a
new sysfs file, idle_state as a complement to the method of
instantiating the device via sysfs.
Changes in v4:
- also remove variables that are redundant as a result of platform
data removal
- improve ABI file description field
Changes in v3:
- remove use of platform data to simplify the idle state by not
having per-channel idle states.
- correct some comments
- fix a style issue regarding use of READ_ONCE
Changes in v2:
- change from exposing deselect mask to idle state with more options
and less implementation specific
- fix style issues
- don't fail the create of the mux device if the device attribute
file in sysfs failed to create
Robert Shearman (3):
i2c: mux: pca954x: remove support for unused platform data
i2c: mux: pca9541: remove support for unused platform data
i2c: mux: pca954x: allow management of device idle state via sysfs
.../ABI/testing/sysfs-bus-i2c-devices-pca954x | 20 ++++
drivers/i2c/muxes/i2c-mux-pca9541.c | 8 +-
drivers/i2c/muxes/i2c-mux-pca954x.c | 106 +++++++++++++-----
include/linux/platform_data/pca954x.h | 48 --------
4 files changed, 100 insertions(+), 82 deletions(-)
create mode 100644 Documentation/ABI/testing/sysfs-bus-i2c-devices-pca954x
delete mode 100644 include/linux/platform_data/pca954x.h
--
2.20.1
next reply other threads:[~2019-02-28 11:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-28 11:43 Robert Shearman [this message]
2019-02-28 11:43 ` [PATCH v4 1/3] i2c: mux: pca954x: remove support for unused platform data Robert Shearman
2019-02-28 11:43 ` [PATCH v4 2/3] i2c: mux: pca9541: " Robert Shearman
2019-02-28 11:43 ` [PATCH v4 3/3] i2c: mux: pca954x: allow management of device idle state via sysfs Robert Shearman
2019-03-13 7:04 ` Peter Rosin
2019-03-13 15:20 ` Greg Kroah-Hartman
2019-03-13 16:36 ` Wolfram Sang
2019-03-13 21:14 ` Greg Kroah-Hartman
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=20190228114343.36443-1-robertshearman@gmail.com \
--to=robertshearman@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=peda@axentia.se \
--cc=robert.shearman@att.com \
--cc=wsa@the-dreams.de \
/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).