linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/9] introduce fwnode in the I2C subsystem
@ 2022-03-25 11:31 Clément Léger
  2022-03-25 11:31 ` [PATCH v3 1/9] of: add of_property_read_string_array_index() Clément Léger
                   ` (9 more replies)
  0 siblings, 10 replies; 30+ messages in thread
From: Clément Léger @ 2022-03-25 11:31 UTC (permalink / raw)
  To: Andy Shevchenko, Daniel Scally, Heikki Krogerus, Sakari Ailus,
	Greg Kroah-Hartman, Rafael J . Wysocki, Wolfram Sang,
	Peter Rosin, Rob Herring, Frank Rowand, Len Brown
  Cc: Hans de Goede, Thomas Petazzoni, Alexandre Belloni,
	Allan Nielsen, linux-kernel, linux-acpi, linux-i2c, devicetree,
	Clément Léger

In order to allow the I2C subsystem to be usable with fwnode, add
some functions to retrieve an i2c_adapter from a fwnode and use
these functions in both i2c mux and sfp. ACPI and device-tree are
handled to allow these modifications to work with both descriptions.
I2C mux support has also been modified to support fwnode based
descriptions.

This series is a subset of the one that was first submitted as a larger
series to add swnode support [1]. In this one, it will be focused on
fwnode support only since it seems to have reach a consensus that
adding fwnode to subsystems makes sense.

[1] https://lore.kernel.org/netdev/YhPSkz8+BIcdb72R@smile.fi.intel.com/T/

---------------

Changes in V3:
 - Add index parameter to property_read_string_array()
 - Implement support for devbice-tree and software nodes
 - Restrict index support for ACPI to 0
 - Add unittests for of_property_read_string_array_index()
 - Add unittests for fwnode_property_read_string_index()

Changes in V2:
 - Remove sfp modifications
 - Add property_read_string_index fwnode_operation callback
 - Implement .property_read_string_index for of and swnode
 - Renamed np variable to fwnode

Clément Léger (9):
  of: add of_property_read_string_array_index()
  of: unittests: add tests for of_property_read_string_array_index()
  device property: add index argument to property_read_string_array()
    callback
  device property: add fwnode_property_read_string_index()
  device property: add tests for fwnode_property_read_string_index()
  i2c: fwnode: add fwnode_find_i2c_adapter_by_node()
  i2c: of: use fwnode_get_i2c_adapter_by_node()
  i2c: mux: pinctrl: remove CONFIG_OF dependency and use fwnode API
  i2c: mux: add support for fwnode

 drivers/acpi/property.c                 |  5 ++-
 drivers/base/property.c                 | 37 ++++++++++++++++++--
 drivers/base/swnode.c                   | 21 ++++++++----
 drivers/base/test/property-entry-test.c | 18 ++++++++++
 drivers/i2c/Makefile                    |  1 +
 drivers/i2c/i2c-core-fwnode.c           | 45 +++++++++++++++++++++++++
 drivers/i2c/i2c-core-of.c               | 30 -----------------
 drivers/i2c/i2c-mux.c                   | 39 ++++++++++-----------
 drivers/i2c/muxes/Kconfig               |  1 -
 drivers/i2c/muxes/i2c-mux-pinctrl.c     | 23 +++++++------
 drivers/of/property.c                   |  5 +--
 drivers/of/unittest.c                   | 20 +++++++++++
 include/linux/fwnode.h                  |  7 ++--
 include/linux/i2c.h                     |  8 ++++-
 include/linux/of.h                      | 22 ++++++++++++
 include/linux/property.h                |  3 ++
 16 files changed, 207 insertions(+), 78 deletions(-)
 create mode 100644 drivers/i2c/i2c-core-fwnode.c

-- 
2.34.1


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

end of thread, other threads:[~2022-05-16  8:36 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-25 11:31 [PATCH v3 0/9] introduce fwnode in the I2C subsystem Clément Léger
2022-03-25 11:31 ` [PATCH v3 1/9] of: add of_property_read_string_array_index() Clément Léger
2022-03-29 23:32   ` Rob Herring
2022-03-25 11:31 ` [PATCH v3 2/9] of: unittests: add tests for of_property_read_string_array_index() Clément Léger
2022-03-29 23:32   ` Rob Herring
2022-03-25 11:31 ` [PATCH v3 3/9] device property: add index argument to property_read_string_array() callback Clément Léger
2022-03-25 14:30   ` Andy Shevchenko
2022-03-28 14:28     ` Clément Léger
2022-04-05 13:22       ` Rafael J. Wysocki
2022-04-05 13:27         ` Clément Léger
2022-03-25 11:31 ` [PATCH v3 4/9] device property: add fwnode_property_read_string_index() Clément Léger
2022-03-25 14:33   ` Andy Shevchenko
2022-03-25 15:10     ` Clément Léger
2022-03-25 11:31 ` [PATCH v3 5/9] device property: add tests for fwnode_property_read_string_index() Clément Léger
2022-03-25 11:31 ` [PATCH v3 6/9] i2c: fwnode: add fwnode_find_i2c_adapter_by_node() Clément Léger
2022-03-25 14:35   ` Andy Shevchenko
2022-03-25 15:09     ` Clément Léger
2022-03-25 15:56       ` Andy Shevchenko
2022-03-25 16:04         ` Clément Léger
2022-03-25 16:29           ` Andy Shevchenko
2022-03-25 11:31 ` [PATCH v3 7/9] i2c: of: use fwnode_get_i2c_adapter_by_node() Clément Léger
2022-03-25 11:31 ` [PATCH v3 8/9] i2c: mux: pinctrl: remove CONFIG_OF dependency and use fwnode API Clément Léger
2022-03-25 14:38   ` Andy Shevchenko
2022-03-25 16:48   ` Peter Rosin
2022-03-31  9:40     ` Clément Léger
2022-03-25 11:31 ` [PATCH v3 9/9] i2c: mux: add support for fwnode Clément Léger
2022-05-14 14:47 ` [PATCH v3 0/9] introduce fwnode in the I2C subsystem Wolfram Sang
2022-05-15 21:34   ` Peter Rosin
2022-05-16  7:34     ` Clément Léger
2022-05-16  8:36       ` Wolfram Sang

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