Skip to content

introduce fwnode in the I2C subsystem

Clément Léger linux-acpi linux-devicetree linux-i2c lkml 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest9 patches 20 repliesIn review
  2. v27 patches 3 repliesSuperseded
  3. v10 of 6 patches 0 repliesSuperseded

Changes in v3 from the cover letter

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

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9of: add of_property_read_string_array_index()include/linux/of.h+22 -01 reply
2/9of: unittests: add tests for of_property_read_string_array_index()drivers/of/unittest.c+20 -01 reply
3/9device property: add index argument to property_read_string_array() callbackdrivers/acpi/property.c drivers/base/property.c drivers/base/swnode.c +2 more+28 -144 replies
4/9device property: add fwnode_property_read_string_index()drivers/base/property.c include/linux/property.h+36 -02 replies
5/9device property: add tests for fwnode_property_read_string_index()drivers/base/test/property-entry-test.c+18 -00 replies
6/9i2c: fwnode: add fwnode_find_i2c_adapter_by_node()drivers/i2c/Makefile drivers/i2c/i2c-core-fwnode.c include/linux/i2c.h+49 -05 replies
7/9i2c: of: use fwnode_get_i2c_adapter_by_node()drivers/i2c/i2c-core-of.c include/linux/i2c.h+4 -310 replies
8/9i2c: mux: pinctrl: remove CONFIG_OF dependency and use fwnode APIdrivers/i2c/muxes/Kconfig drivers/i2c/muxes/i2c-mux-pinctrl.c+12 -123 replies
9/9i2c: mux: add support for fwnodedrivers/i2c/i2c-mux.c+18 -210 replies

Reviews trailers per patch

2 of 9 patches have a Reviewed-by or Acked-by.

PatchRob Herring
1/9R-b
2/9R-b
3/9
4/9
5/9
6/9
7/9
8/9
9/9

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/9] introduce fwnode in the I2C subsystem

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/[email protected]/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
Signature · 1 line
2.34.1