Skip to content

led: update LED boot/activity to new property implementation

Christian Marangi u-boot 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest8 patches 13 repliesIn review
  2. v18 patches 2 repliesSuperseded

Changes in v2 from the cover letter

- Fix handling of flat tree for phandle
- Fix test and other.dts changes

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8dm: core: implement oftree variant of parse_phandle OPsdrivers/core/of_access.c drivers/core/ofnode.c include/dm/of_access.h +1 more+244 -201 reply
2/8test: dm: fix broken dm_test_ofnode_phandle_ot and get_by_phandle_otarch/sandbox/dts/other.dts test/dm/ofnode.c+91 -161 reply
3/8dm: core: implement ofnode/tree_parse_phandle() helperdrivers/core/ofnode.c include/dm/ofnode.h+84 -01 reply
4/8test: dm: Expand dm_test_ofnode_phandle(_ot) with new ofnode/tree_parse_phandlearch/sandbox/dts/other.dts arch/sandbox/dts/test.dts test/dm/ofnode.c+54 -41 reply
5/8dm: core: implement phandle ofnode_options helperdrivers/core/ofnode.c include/dm/ofnode.h+30 -01 reply
6/8test: dm: Add test for ofnode options phandle helperarch/sandbox/dts/test.dts test/dm/ofnode.c+12 -01 reply
7/8led: update LED boot/activity to new property implementationdrivers/led/led-uclass.c+22 -80 replies
8/8test: dm: Update test for LED activity and bootarch/sandbox/dts/test.dts test/dm/led.c+15 -111 reply

Reviews trailers per patch

7 of 8 patches have a Reviewed-by or Acked-by.

PatchSimon Glass
1/8R-b
2/8R-b
3/8R-b
4/8R-b
5/8R-b
6/8R-b
7/8
8/8R-b

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

Read the v2 thread

Cover letter [PATCH v2 0/8] led: update LED boot/activity to new property implementation

This series is split in 2 part.

While adapting the LED boot and activity code to the new property accepted by Rob in dt-schema repository, a big BUG was discovered.

The reason wasn't clear at start and took me some days to figure it out.

This was triggered by adding a new phandle in the test.dts to introduce test for the new OPs.

This single addition caused the sandbox CI test to fail in the dm_test_ofnode_phandle_ot test.

This doesn't make sense as reverting the change made the CI test to correctly finish. Also moving the uboot node down after the first phandle (in test.dts the gpio one) also made the CI test to correctly finish.

A little bit of searching and debugging made me realize the parse phandle OPs didn't support other.dts at all and they were still referencing phandle index from test.dts. (more info in the related commit)

In short the test was broken all along and was working by pure luck. The first 4 patch address and fix the problem for good.

The other 4 patch expand and address the property change for LED boot/activity.

Posting in a single series as changes are trivial and just to speedup review process. (and also because the second part depends on the first)

All CI tested with azure pipeline.

Changes v2:
- Fix handling of flat tree for phandle
- Fix test and other.dts changes

Christian Marangi (8):
dm: core: implement oftree variant of parse_phandle OPs
test: dm: fix broken dm_test_ofnode_phandle_ot and get_by_phandle_ot
dm: core: implement ofnode/tree_parse_phandle() helper
test: dm: Expand dm_test_ofnode_phandle(_ot) with new
ofnode/tree_parse_phandle
dm: core: implement phandle ofnode_options helper
test: dm: Add test for ofnode options phandle helper
led: update LED boot/activity to new property implementation
test: dm: Update test for LED activity and boot

 arch/sandbox/dts/other.dts |  31 ++++++++-
 arch/sandbox/dts/test.dts  |  16 +++--
 drivers/core/of_access.c   |  61 ++++++++++++-----
 drivers/core/ofnode.c      | 124 ++++++++++++++++++++++++++++++++-
 drivers/led/led-uclass.c   |  30 +++++---
 include/dm/of_access.h     |  86 +++++++++++++++++++++++
 include/dm/ofnode.h        | 107 +++++++++++++++++++++++++++++
 test/dm/led.c              |  18 +++--
 test/dm/ofnode.c           | 136 ++++++++++++++++++++++++++++++++-----
 9 files changed, 551 insertions(+), 58 deletions(-)
Signature · 1 line
2.45.2