leds: pwm: add support for default-state device property
authorDenis Osterland-Heim <Denis.Osterland@diehl.com>
Tue, 8 Jun 2021 06:35:54 +0000 (08:35 +0200)
committerPavel Machek <pavel@ucw.cz>
Wed, 18 Aug 2021 06:27:31 +0000 (08:27 +0200)
commit3d3d65bd27645830a6f23af29d0f9ebe5cc8bcb2
tree4a62c84f7b32b57d79349369193c92769c1fac20
parent791bc41163c51f870972d6c6b82d971ce951096c
leds: pwm: add support for default-state device property

This patch adds support for "default-state" devicetree property, which
allows to defer pwm init to first use of led.

This allows to configure the PWM early in bootloader to let the LED
blink until an application in Linux userspace sets something different.

Signed-off-by: Denis Osterland-Heim <Denis.Osterland@diehl.com>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
drivers/leds/leds-pwm.c