backlight: lm3630a: Add firmware node support
authorBrian Masney <masneyb@onstation.org>
Wed, 24 Apr 2019 09:25:05 +0000 (05:25 -0400)
committerLee Jones <lee.jones@linaro.org>
Tue, 14 May 2019 07:16:01 +0000 (08:16 +0100)
commit8fbce8efe15cd2ca7a4947bc814f890dbe4e43d7
tree9ee021208d491380dd72040077308835c68e44fc
parent32fcb75c66a0cb66db9ec4f777f864675e5aebb2
backlight: lm3630a: Add firmware node support

Add fwnode support to the lm3630a driver and optionally allow
configuring the label, default brightness level, and maximum brightness
level. The two outputs can be controlled by bank A and B independently
or bank A can control both outputs.

If the platform data was not configured, then the driver defaults to
enabling both banks. This patch changes the default value to disable
both banks before parsing the firmware node so that just a single bank
can be enabled if desired. There are no in-tree users of this driver.

Driver was tested on a LG Nexus 5 (hammerhead) phone.

Signed-off-by: Brian Masney <masneyb@onstation.org>
Reviewed-by: Dan Murphy <dmurphy@ti.com>
Acked-by: Daniel Thompson <daniel.thompson@linaro.org>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/video/backlight/lm3630a_bl.c
include/linux/platform_data/lm3630a_bl.h