Skip to content

Commit a59ec1e

Browse files
mhennerichtorvalds
authored andcommitted
backlight: new driver for the ADP8870 backlight devices
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Cc: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 7f81c88 commit a59ec1e

5 files changed

Lines changed: 1233 additions & 0 deletions

File tree

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
What: /sys/class/backlight/<backlight>/<ambient light zone>_max
2+
What: /sys/class/backlight/<backlight>/l1_daylight_max
3+
What: /sys/class/backlight/<backlight>/l2_bright_max
4+
What: /sys/class/backlight/<backlight>/l3_office_max
5+
What: /sys/class/backlight/<backlight>/l4_indoor_max
6+
What: /sys/class/backlight/<backlight>/l5_dark_max
7+
Date: Mai 2011
8+
KernelVersion: 2.6.40
9+
Contact: device-drivers-devel@blackfin.uclinux.org
10+
Description:
11+
Control the maximum brightness for <ambient light zone>
12+
on this <backlight>. Values are between 0 and 127. This file
13+
will also show the brightness level stored for this
14+
<ambient light zone>.
15+
16+
What: /sys/class/backlight/<backlight>/<ambient light zone>_dim
17+
What: /sys/class/backlight/<backlight>/l2_bright_dim
18+
What: /sys/class/backlight/<backlight>/l3_office_dim
19+
What: /sys/class/backlight/<backlight>/l4_indoor_dim
20+
What: /sys/class/backlight/<backlight>/l5_dark_dim
21+
Date: Mai 2011
22+
KernelVersion: 2.6.40
23+
Contact: device-drivers-devel@blackfin.uclinux.org
24+
Description:
25+
Control the dim brightness for <ambient light zone>
26+
on this <backlight>. Values are between 0 and 127, typically
27+
set to 0. Full off when the backlight is disabled.
28+
This file will also show the dim brightness level stored for
29+
this <ambient light zone>.
30+
31+
What: /sys/class/backlight/<backlight>/ambient_light_level
32+
Date: Mai 2011
33+
KernelVersion: 2.6.40
34+
Contact: device-drivers-devel@blackfin.uclinux.org
35+
Description:
36+
Get conversion value of the light sensor.
37+
This value is updated every 80 ms (when the light sensor
38+
is enabled). Returns integer between 0 (dark) and
39+
8000 (max ambient brightness)
40+
41+
What: /sys/class/backlight/<backlight>/ambient_light_zone
42+
Date: Mai 2011
43+
KernelVersion: 2.6.40
44+
Contact: device-drivers-devel@blackfin.uclinux.org
45+
Description:
46+
Get/Set current ambient light zone. Reading returns
47+
integer between 1..5 (1 = daylight, 2 = bright, ..., 5 = dark).
48+
Writing a value between 1..5 forces the backlight controller
49+
to enter the corresponding ambient light zone.
50+
Writing 0 returns to normal/automatic ambient light level
51+
operation. The ambient light sensing feature on these devices
52+
is an extension to the API documented in
53+
Documentation/ABI/stable/sysfs-class-backlight.
54+
It can be enabled by writing the value stored in
55+
/sys/class/backlight/<backlight>/max_brightness to
56+
/sys/class/backlight/<backlight>/brightness.

‎drivers/video/backlight/Kconfig‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,18 @@ config BACKLIGHT_ADP8860
302302
To compile this driver as a module, choose M here: the module will
303303
be called adp8860_bl.
304304

305+
config BACKLIGHT_ADP8870
306+
tristate "Backlight Driver for ADP8870 using WLED"
307+
depends on BACKLIGHT_CLASS_DEVICE && I2C
308+
select NEW_LEDS
309+
select LEDS_CLASS
310+
help
311+
If you have a LCD backlight connected to the ADP8870,
312+
say Y here to enable this driver.
313+
314+
To compile this driver as a module, choose M here: the module will
315+
be called adp8870_bl.
316+
305317
config BACKLIGHT_88PM860X
306318
tristate "Backlight Driver for 88PM8606 using WLED"
307319
depends on MFD_88PM860X

‎drivers/video/backlight/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ obj-$(CONFIG_BACKLIGHT_WM831X) += wm831x_bl.o
3434
obj-$(CONFIG_BACKLIGHT_ADX) += adx_bl.o
3535
obj-$(CONFIG_BACKLIGHT_ADP5520) += adp5520_bl.o
3636
obj-$(CONFIG_BACKLIGHT_ADP8860) += adp8860_bl.o
37+
obj-$(CONFIG_BACKLIGHT_ADP8870) += adp8870_bl.o
3738
obj-$(CONFIG_BACKLIGHT_88PM860X) += 88pm860x_bl.o
3839
obj-$(CONFIG_BACKLIGHT_PCF50633) += pcf50633-backlight.o
3940

0 commit comments

Comments
 (0)