linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/3] i2c: mux: pca954x: allow management of device idle state via sysfs
@ 2019-02-28 11:43 Robert Shearman
  2019-02-28 11:43 ` [PATCH v4 1/3] i2c: mux: pca954x: remove support for unused platform data Robert Shearman
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Robert Shearman @ 2019-02-28 11:43 UTC (permalink / raw)
  To: Peter Rosin, Guenter Roeck
  Cc: linux-i2c, Wolfram Sang, linux-kernel, Greg Kroah-Hartman,
	Robert Shearman

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-03-13 21:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-28 11:43 [PATCH v4 0/3] i2c: mux: pca954x: allow management of device idle state via sysfs Robert Shearman
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

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).