History

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.

Brian Masney committed 7 years ago

Commit 8fbce8e1 parent 32fcb752 files · +148 −5Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/platform_data/lm3630a_bl.h+4−0
@@ -38,9 +38,11 @@ enum lm3630a_ledb_ctrl { · 37 unmodified lines
38 38
39#define LM3630A_MAX_BRIGHTNESS 25539#define LM3630A_MAX_BRIGHTNESS 255
40/*40/*
41 *@leda_label : optional led a label.
41 *@leda_init_brt : led a init brightness. 4~25542 *@leda_init_brt : led a init brightness. 4~255
42 *@leda_max_brt : led a max brightness. 4~25543 *@leda_max_brt : led a max brightness. 4~255
43 *@leda_ctrl : led a disable, enable linear, enable exponential44 *@leda_ctrl : led a disable, enable linear, enable exponential
45 *@ledb_label : optional led b label.
44 *@ledb_init_brt : led b init brightness. 4~25546 *@ledb_init_brt : led b init brightness. 4~255
45 *@ledb_max_brt : led b max brightness. 4~25547 *@ledb_max_brt : led b max brightness. 4~255
46 *@ledb_ctrl : led b disable, enable linear, enable exponential48 *@ledb_ctrl : led b disable, enable linear, enable exponential
@@ -50,10 +52,12 @@ enum lm3630a_ledb_ctrl { · 3 unmodified lines
50struct lm3630a_platform_data {52struct lm3630a_platform_data {
51 53
52 /* led a config. */54 /* led a config. */
55 const char *leda_label;
53 int leda_init_brt;56 int leda_init_brt;
54 int leda_max_brt;57 int leda_max_brt;
55 enum lm3630a_leda_ctrl leda_ctrl;58 enum lm3630a_leda_ctrl leda_ctrl;
56 /* led b config. */59 /* led b config. */
60 const char *ledb_label;
57 int ledb_init_brt;61 int ledb_init_brt;
58 int ledb_max_brt;62 int ledb_max_brt;
59 enum lm3630a_ledb_ctrl ledb_ctrl;63 enum lm3630a_ledb_ctrl ledb_ctrl;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t