Skip to content

Commit d1b46f5

Browse files
committed
Merge tag 'backlight-next-6.19' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight
Pull backlight updates from Lee Jones: "Additions: - Add support for Awinic AW99706 backlight driver Fixes: - Add GPIOLIB dependency to backlight ktd2801 driver - Add devlink to LED Backlight's supplier LEDs to enforce correct removal order and prevent NULL pointer dereferences - Fix kernel-doc warnings in lp855x.h Removals: - Do not include <linux/fb.h> in backlight.h - Fix unused function warnings from suspend/resume ops in aw99706.c by switching to DEFINE_SIMPLE_DEV_PM_OPS and using pm_ptr() Bindings: - Add Awinic AW99706 backlight binding to MAINTAINERS - Add Awinic AW99706 backlight binding documentation" * tag 'backlight-next-6.19' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight: backlight: aw99706: Fix unused function warnings from suspend/resume ops backlight: lp855x: Fix lp855x.h kernel-doc warnings dt-bindings: leds: backlight: Add Awinic AW99706 backlight backlight: aw99706: Add support for Awinic AW99706 backlight backlight: led-bl: Add devlink to supplier LEDs backlight: ktd2801: Depend on GPIOLIB backlight: Do not include <linux/fb.h> in header file
2 parents 7b8653a + d3cc7cd commit d1b46f5

8 files changed

Lines changed: 603 additions & 3 deletions

File tree

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/leds/backlight/awinic,aw99706.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Awinic AW99706 6-channel WLED Backlight Driver
8+
9+
maintainers:
10+
- Junjie Cao <caojunjie650@gmail.com>
11+
12+
allOf:
13+
- $ref: common.yaml#
14+
15+
properties:
16+
compatible:
17+
const: awinic,aw99706
18+
19+
reg:
20+
maxItems: 1
21+
22+
enable-gpios:
23+
description: GPIO to use to enable/disable the backlight (HWEN pin).
24+
maxItems: 1
25+
26+
awinic,dim-mode:
27+
$ref: /schemas/types.yaml#/definitions/uint32
28+
description: >
29+
Select dimming mode of the device.
30+
0 = Bypass mode.
31+
1 = DC mode.
32+
2 = MIX mode(PWM at low brightness and DC at high brightness).
33+
3 = MIX-26k mode(MIX mode with different PWM frequency).
34+
enum: [ 0, 1, 2, 3 ]
35+
default: 1
36+
37+
awinic,sw-freq-hz:
38+
description: Boost switching frequency in Hz.
39+
enum: [ 300000, 400000, 500000, 600000, 660000, 750000, 850000, 1000000,
40+
1200000, 1330000, 1500000, 1700000 ]
41+
default: 750000
42+
43+
awinic,sw-ilmt-microamp:
44+
description: Switching current limitation in uA.
45+
enum: [ 1500000, 2000000, 2500000, 3000000 ]
46+
default: 3000000
47+
48+
awinic,iled-max-microamp:
49+
description: Maximum LED current setting in uA.
50+
minimum: 5000
51+
maximum: 50000
52+
multipleOf: 500
53+
default: 20000
54+
55+
awinic,uvlo-thres-microvolt:
56+
description: UVLO(Under Voltage Lock Out) in uV.
57+
enum: [ 2200000, 5000000 ]
58+
default: 2200000
59+
60+
awinic,ramp-ctl:
61+
$ref: /schemas/types.yaml#/definitions/uint32
62+
description: >
63+
Select ramp control and filter of the device.
64+
0 = Fade in/fade out.
65+
1 = Light filter.
66+
2 = Medium filter.
67+
3 = Heavy filter.
68+
enum: [ 0, 1, 2, 3 ]
69+
default: 2
70+
71+
required:
72+
- compatible
73+
- reg
74+
- enable-gpios
75+
76+
unevaluatedProperties: false
77+
78+
examples:
79+
- |
80+
#include <dt-bindings/gpio/gpio.h>
81+
82+
i2c {
83+
#address-cells = <1>;
84+
#size-cells = <0>;
85+
86+
backlight@76 {
87+
compatible = "awinic,aw99706";
88+
reg = <0x76>;
89+
enable-gpios = <&tlmm 88 GPIO_ACTIVE_HIGH>;
90+
default-brightness = <2047>;
91+
max-brightness = <4095>;
92+
awinic,dim-mode = <1>;
93+
awinic,sw-freq-hz = <750000>;
94+
awinic,sw-ilmt-microamp = <3000000>;
95+
awinic,uvlo-thres-microvolt = <2200000>;
96+
awinic,iled-max-microamp = <20000>;
97+
awinic,ramp-ctl = <2>;
98+
};
99+
};
100+
101+
...

MAINTAINERS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4156,6 +4156,12 @@ S: Maintained
41564156
F: Documentation/devicetree/bindings/iio/adc/avia-hx711.yaml
41574157
F: drivers/iio/adc/hx711.c
41584158

4159+
AWINIC AW99706 WLED BACKLIGHT DRIVER
4160+
M: Junjie Cao <caojunjie650@gmail.com>
4161+
S: Maintained
4162+
F: Documentation/devicetree/bindings/leds/backlight/awinic,aw99706.yaml
4163+
F: drivers/video/backlight/aw99706.c
4164+
41594165
AX.25 NETWORK LAYER
41604166
L: linux-hams@vger.kernel.org
41614167
S: Orphan

drivers/video/backlight/Kconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,14 @@ config BACKLIGHT_ATMEL_LCDC
156156
If in doubt, it's safe to enable this option; it doesn't kick
157157
in unless the board's description says it's wired that way.
158158

159+
config BACKLIGHT_AW99706
160+
tristate "Backlight Driver for Awinic AW99706"
161+
depends on I2C
162+
select REGMAP_I2C
163+
help
164+
If you have a LCD backlight connected to the WLED output of AW99706
165+
WLED output, say Y here to enable this driver.
166+
159167
config BACKLIGHT_EP93XX
160168
tristate "Cirrus EP93xx Backlight Driver"
161169
depends on FB_EP93XX
@@ -185,6 +193,7 @@ config BACKLIGHT_KTD253
185193

186194
config BACKLIGHT_KTD2801
187195
tristate "Backlight Driver for Kinetic KTD2801"
196+
depends on GPIOLIB || COMPILE_TEST
188197
select LEDS_EXPRESSWIRE
189198
help
190199
Say Y to enable the backlight driver for the Kinetic KTD2801 1-wire

drivers/video/backlight/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ obj-$(CONFIG_BACKLIGHT_ADP8870) += adp8870_bl.o
2525
obj-$(CONFIG_BACKLIGHT_APPLE) += apple_bl.o
2626
obj-$(CONFIG_BACKLIGHT_APPLE_DWI) += apple_dwi_bl.o
2727
obj-$(CONFIG_BACKLIGHT_AS3711) += as3711_bl.o
28+
obj-$(CONFIG_BACKLIGHT_AW99706) += aw99706.o
2829
obj-$(CONFIG_BACKLIGHT_BD6107) += bd6107.o
2930
obj-$(CONFIG_BACKLIGHT_CLASS_DEVICE) += backlight.o
3031
obj-$(CONFIG_BACKLIGHT_DA903X) += da903x_bl.o

0 commit comments

Comments
 (0)