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>
This commit is contained in:
@@ -38,9 +38,11 @@ enum lm3630a_ledb_ctrl {
|
||||
|
||||
#define LM3630A_MAX_BRIGHTNESS 255
|
||||
/*
|
||||
*@leda_label : optional led a label.
|
||||
*@leda_init_brt : led a init brightness. 4~255
|
||||
*@leda_max_brt : led a max brightness. 4~255
|
||||
*@leda_ctrl : led a disable, enable linear, enable exponential
|
||||
*@ledb_label : optional led b label.
|
||||
*@ledb_init_brt : led b init brightness. 4~255
|
||||
*@ledb_max_brt : led b max brightness. 4~255
|
||||
*@ledb_ctrl : led b disable, enable linear, enable exponential
|
||||
@@ -50,10 +52,12 @@ enum lm3630a_ledb_ctrl {
|
||||
struct lm3630a_platform_data {
|
||||
|
||||
/* led a config. */
|
||||
const char *leda_label;
|
||||
int leda_init_brt;
|
||||
int leda_max_brt;
|
||||
enum lm3630a_leda_ctrl leda_ctrl;
|
||||
/* led b config. */
|
||||
const char *ledb_label;
|
||||
int ledb_init_brt;
|
||||
int ledb_max_brt;
|
||||
enum lm3630a_ledb_ctrl ledb_ctrl;
|
||||
|
Reference in New Issue
Block a user