led: gpio: Use NOP uclass driver for top-level node
authorMarek Vasut <marex@denx.de>
Fri, 22 Apr 2022 13:34:00 +0000 (15:34 +0200)
committerTom Rini <trini@konsulko.com>
Thu, 28 Apr 2022 13:26:43 +0000 (09:26 -0400)
commit01074697801bc0709ac2ca915250096311ec1b7e
treecb70616ba6e61fa923c36f2d8be7bcc551984bb7
parente3aa76644c2af14631a1fb5ba17022e0a396a6c4
led: gpio: Use NOP uclass driver for top-level node

The top level DT node of gpio-leds is not a LED itself, bind NOP uclass
driver to it, and bind different LED uclass driver to its subnodes which
represent the actual LEDs. This simplifies the probe() implementation
and fixes the bogus top-level not-an-LED in 'led list' command output:

```
=> led list
led             Error -121 <--- This is removed/fixed by this patch
green:user0     off
```

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Patrice Chotard <patrice.chotard@foss.st.com>
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
Cc: Sean Anderson <seanga2@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Steven Lawrance <steven.lawrance@softathome.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Tested-by: Patrice Chotard <patrice.chotard@foss.st.com>
drivers/led/led_gpio.c