Skip to content

Commit

Permalink
arm64: dts: qcom: msm8916-motorola-surnia: Add brightness control
Browse files Browse the repository at this point in the history
Signed-off-by: Bogdan Ionescu <[email protected]>
  • Loading branch information
BogdanTheGeek committed Jan 29, 2023
1 parent 02dad76 commit b848c5f
Show file tree
Hide file tree
Showing 5 changed files with 430 additions and 1 deletion.
39 changes: 38 additions & 1 deletion arch/arm64/boot/dts/qcom/msm8916-motorola-surnia.dts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,28 @@
pinctrl-1 = <&usb_id_sleep>;
pinctrl-names = "default", "sleep";
};

backlight: panel-backlight {
compatible = "led-backlight";
leds = <&wled>;
default-brightness-level = <192>;
};
};

&blsp_i2c1 {
status = "okay";

wled: bd65b60@64 {
compatible = "rohm,bd65b60";
reg = <0x64>;
linux,name = "wled:backlight";
linux,default-trigger = "bkl-trigger";
rohm,no-reset;
rohm,led1-used;
pinctrl-names = "default";
pinctrl-0 = <&backlight_reset_default>;
};

};

&blsp_i2c2 {
Expand Down Expand Up @@ -124,7 +146,7 @@
panel@0 {
compatible = "motorola,surnia-panel";
reg = <0>;

backlight = <&backlight>;
power-supply = <&pm8916_l17>;
reset-gpios = <&msmgpio 78 GPIO_ACTIVE_LOW>;

Expand Down Expand Up @@ -320,6 +342,14 @@
bias-pull-up;
};

backlight_reset_default: backlight-reset-default-state {
pins = "gpio36";
function = "gpio";
drive-strength = <2>;
bias-pull-down;
output-high;
};

gpio_keys_default: gpio-keys-default-state {
pins = "gpio107";
function = "gpio";
Expand All @@ -341,6 +371,13 @@
bias-pull-down;
};

ts_reset_default: ts-reset-default-state {
pins = "gpio20";
function = "gpio";
drive-strength = <2>;
bias-disable;
};

ts_int_default: ts-int-default-state {
pins = "gpio21";
function = "gpio";
Expand Down
11 changes: 11 additions & 0 deletions drivers/leds/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,17 @@ config LEDS_BLINKM
This option enables support for the BlinkM RGB LED connected
through I2C. Say Y to enable support for the BlinkM LED.

config LEDS_BD65B60
tristate "LED Driver for BD65B60"
depends on LEDS_CLASS
depends on I2C
help
If you have a LCD backlight connected to the ROHM BD65B60,
say Y here to enable this driver.

To compile this driver as a module, choose M here: the module will
be called leds-bd65b60.

config LEDS_POWERNV
tristate "LED support for PowerNV Platform"
depends on LEDS_CLASS
Expand Down
1 change: 1 addition & 0 deletions drivers/leds/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ obj-$(CONFIG_LEDS_TURRIS_OMNIA) += leds-turris-omnia.o
obj-$(CONFIG_LEDS_WM831X_STATUS) += leds-wm831x-status.o
obj-$(CONFIG_LEDS_WM8350) += leds-wm8350.o
obj-$(CONFIG_LEDS_WRAP) += leds-wrap.o
obj-$(CONFIG_LEDS_BD65B60) += leds-bd65b60.o

# LED SPI Drivers
obj-$(CONFIG_LEDS_CR0014114) += leds-cr0014114.o
Expand Down
Loading

0 comments on commit b848c5f

Please sign in to comment.