Skip to content

fw_devlink improvements

Saravana Kannan linux-acpi linux-arm-kernel linux-devicetree linux-gpio linux-mtd linux-renesas-soc lkml 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest12 patches 28 repliesIn review
  2. v211 patches 47 repliesSuperseded
  3. v19 patches 23 repliesSuperseded

Changes in v3 from the cover letter

- Addressed most of Andy's comments in v2
- Added Colin and Sudeep's Tested-by for the series (except the imx and renesas patches)
- Added Sudeep's Acked-by for the scmi patch.
- Added Geert's Reviewed-by for the renesas patch.
- Fixed gpiolib crash reported by Naresh.
- Patch 6: Fix __fwnode_links_move_consumers() to preserve fwnode link flags.
- New Patch 12 to fix nvmem-cells issue reported by Maxim(s)/Miquel.
- Deleted some stale function doc in Patch 8

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12driver core: fw_devlink: Don't purge child fwnode's consumer linksdrivers/base/core.c+79 -180 replies
2/12driver core: fw_devlink: Improve check for fwnode with no device/driverdrivers/base/core.c+38 -20 replies
3/12soc: renesas: Move away from using OF_POPULATED for fw_devlinkdrivers/soc/renesas/rcar-sysc.c+1 -11 reply
4/12gpiolib: Clear the gpio_device's fwnode initialized flag before addingdrivers/gpio/gpiolib.c+7 -02 replies
5/12driver core: fw_devlink: Add DL_FLAG_CYCLE support to device linksdrivers/base/core.c include/linux/device.h+19 -100 replies
6/12driver core: fw_devlink: Allow marking a fwnode link as being part of a cycledrivers/base/core.c include/linux/fwnode.h+50 -110 replies
7/12driver core: fw_devlink: Consolidate device link flag computationdrivers/base/core.c include/linux/fwnode.h+15 -140 replies
8/12driver core: fw_devlink: Make cycle detection more robustdrivers/base/core.c+129 -1190 replies
9/12of: property: Simplify of_link_to_phandle()drivers/of/property.c+13 -7111 replies
10/12irqchip/irq-imx-gpcv2: Mark fwnode device as not initializeddrivers/irqchip/irq-imx-gpcv2.c drivers/soc/imx/gpcv2.c+2 -10 replies
11/12firmware: arm_scmi: Set fwnode for the scmi_devicedrivers/firmware/arm_scmi/bus.c+2 -10 replies
12/12mtd: mtdpart: Don't create platform device that'll never probedrivers/mtd/mtdpart.c+10 -01 reply

Reviews trailers per patch

3 of 12 patches have a Reviewed-by or Acked-by.

PatchColin FosterSudeep HollaGeert UytterhoevenBartosz GolaszewskiMaksim KiselevLuca WeissAndy ShevchenkoDouglas AndersonJean-Philippe BruckerDmitry Baryshkov
SeriesT-b T-b T-b T-b T-b
1/12T-b T-b
2/12T-b T-b
3/12R-b A-b
4/12T-b T-b A-b R-b
5/12T-b T-b
6/12T-b T-b
7/12T-b T-b
8/12T-b T-b
9/12T-b T-b
10/12
11/12T-b A-b T-b
12/12T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 10 reviewers.

Read the v3 thread

Cover letter [PATCH v3 00/12] fw_devlink improvements

Naresh, Tony, Abel, Geert, Dmitry, Maxim(s), Miquel, Luca, Doug, Martin, Jean-Philippe,

Can I get your Tested-by's for this v3 series please?

Vladimir,

Ccing you because DSA's and fw_devlink have known/existing problems (still in my TODOs to fix). But I want to make sure this series doesn't cause additional problems for DSA.

All,

This patch series improves fw_devlink in the following ways:

1. It no longer cares about a fwnode having a "compatible" property. It figures this out more dynamically. The only expectation is that fwnodes that are converted to devices actually get probed by a driver for the dependencies to be enforced correctly.

2. Finer grained dependency tracking. fw_devlink will now create device links from the consumer to the actual resource's device (if it has one,
Eg: gpio_device) instead of the parent supplier device. This improves things like async suspend/resume ordering, potentially remove the need for frameworks to create device links, more parallelized async probing, and better sync_state() tracking.

3. Handle hardware/software quirks where a child firmware node gets populated as a device before its parent firmware node AND actually supplies a non-optional resource to the parent firmware node's device.

4. Way more robust at cycle handling (see patch for the insane cases).

5. Stops depending on OF_POPULATED to figure out some corner cases.

6. Simplifies the work that needs to be done by the firmware specific code.

The v3 series has gone through my usual testing on my end and looks good to me.

Thanks,
Saravana

[1] - https://lore.kernel.org/lkml/[email protected]/
[2] - https://lore.kernel.org/lkml/CAGETcx-JUV1nj8wBJrTPfyvM7=Mre5j_vkVmZojeiumUGG6QZQ@mail.gmail.com/

v1 -> v2:
- Fixed Patch 1 to handle a corner case discussed in [2].
- New patch 10 to handle "fsl,imx8mq-gpc" being initialized by 2 drivers.
- New patch 11 to add fw_devlink support for SCMI devices.

v2 -> v3:
- Addressed most of Andy's comments in v2
- Added Colin and Sudeep's Tested-by for the series (except the imx and renesas patches)
- Added Sudeep's Acked-by for the scmi patch.
- Added Geert's Reviewed-by for the renesas patch.
- Fixed gpiolib crash reported by Naresh.
- Patch 6: Fix __fwnode_links_move_consumers() to preserve fwnode link flags.
- New Patch 12 to fix nvmem-cells issue reported by Maxim(s)/Miquel.
- Deleted some stale function doc in Patch 8

Cc Abel Vesa <[email protected]>
Cc Alexander Stein <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc Sudeep Holla <[email protected]>
Cc Geert Uytterhoeven <[email protected]>
Cc John Stultz <[email protected]>
Cc Doug Anderson <[email protected]>
Cc Guenter Roeck <[email protected]>
Cc Dmitry Baryshkov <[email protected]>
Cc Maxim Kiselev <[email protected]>
Cc Maxim Kochetkov <[email protected]>
Cc Miquel Raynal <[email protected]>
Cc Luca Weiss <[email protected]>
Cc Colin Foster <[email protected]>
Cc Martin Kepplinger <[email protected]>
Cc Jean-Philippe Brucker <[email protected]>
Cc Vladimir Oltean <[email protected]>

Saravana Kannan (12):
driver core: fw_devlink: Don't purge child fwnode's consumer links driver core: fw_devlink: Improve check for fwnode with no
device/driver
soc: renesas: Move away from using OF_POPULATED for fw_devlink
gpiolib: Clear the gpio_device's fwnode initialized flag before adding driver core: fw_devlink: Add DL_FLAG_CYCLE support to device links driver core: fw_devlink: Allow marking a fwnode link as being part of
a cycle
driver core: fw_devlink: Consolidate device link flag computation driver core: fw_devlink: Make cycle detection more robust
of: property: Simplify of_link_to_phandle() irqchip/irq-imx-gpcv2: Mark fwnode device as not initialized
firmware: arm_scmi: Set fwnode for the scmi_device
mtd: mtdpart: Don't create platform device that'll never probe

 drivers/base/core.c             | 449 +++++++++++++++++++++-----------
 drivers/firmware/arm_scmi/bus.c |   3 +-
 drivers/gpio/gpiolib.c          |   7 +
 drivers/irqchip/irq-imx-gpcv2.c |   1 +
 drivers/mtd/mtdpart.c           |  10 +
 drivers/of/property.c           |  84 +-----
 drivers/soc/imx/gpcv2.c         |   2 +-
 drivers/soc/renesas/rcar-sysc.c |   2 +-
 include/linux/device.h          |   1 +
 include/linux/fwnode.h          |  12 +-
 10 files changed, 344 insertions(+), 227 deletions(-)
Signature · 1 line
2.39.1.519.gcb327c4b5f-goog