OSDN Git Service

leds: ns2: convert to fwnode API
authorMarek Behún <kabel@kernel.org>
Sat, 26 Sep 2020 20:11:30 +0000 (22:11 +0200)
committerPavel Machek <pavel@ucw.cz>
Wed, 30 Sep 2020 17:22:58 +0000 (19:22 +0200)
commit940cca1ab5d6c3bc1f8db0c804cf7c5e0caf1853
treec25fb05943875a15dfbfbe722040deccc837962d
parent108f4664e3449828114780a05393eb8d2be7fdd0
leds: ns2: convert to fwnode API

Convert from OF api to fwnode API, so that it is possible to bind this
driver without device-tree.

The fwnode API does not expose a function to read a specific element of
an array. We therefore change the types of the ns2_led_modval structure
so that we can read the whole modval array with one fwnode call.

Signed-off-by: Marek Behún <kabel@kernel.org>
Tested-by: Simon Guinot <simon.guinot@sequanux.org>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
drivers/leds/leds-ns2.c