Commit Graph

8 Commits

Author SHA1 Message Date
David Wu f462f55341 video: pwm_backlight: support PWM polarity setting
The latest kernel PWM drivers enable the polarity settings. When system
run from U-Boot to kerenl, if there are differences in polarity set or
duty cycle, the PMW will re-init:
close -> set polarity and duty cycle -> enable the PWM.
The pwm_backlight would be unstable, might be screen flashing.

Change-Id: I7c026c9756e013f0ac99e43b09b633dc83268ce9
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-03-20 14:56:24 +08:00
Joseph Chen 102804eccc video: pwm_backlight: fix backlight disable fail issue
1. set duty as 0;
2. if there is not "enable-gpios", don't disable pwm;

Change-Id: Ie788da61a38a6bfce4cdc5395e522e71a599eef0
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-03-06 10:11:19 +08:00
Kever Yang ca62cda228 pwm-backlight: make power-supply as option
Some pwm backlight may not need 'power-supply', let's make it as option
in pwm-backlight driver.

Change-Id: Ie25ab972b352cd66670fdccfdee45fa1199741ed
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-02-09 12:00:22 +08:00
Kever Yang 69cea70e22 pwm-backlight: support rockchip invert level array
Some Rockchip dts use invert level array for backligh.

Change-Id: Ic6b5e22031cf570a56bb2854ed10f3e7c24029cc
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-02-08 22:00:27 +08:00
Joseph Chen 55519f2465 video: pwm backlight: add backlight_disable() implement
Change-Id: Ib574feedf431e34e5da49aae24a7ae0361945ac9
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2017-10-31 16:13:17 +08:00
Simon Glass 7cf208d73b dm: video: Update pwm_backlight to support livetree
Update this driver to support a live device tree.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Anatolij Gustschin <agust@denx.de>
Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Tested-on: Beaver, Jetson-TK1
2017-07-11 10:08:20 -06:00
Simon Glass e160f7d430 dm: core: Replace of_offset with accessor
At present devices use a simple integer offset to record the device tree
node associated with the device. In preparation for supporting a live
device tree, which uses a node pointer instead, refactor existing code to
access this field through an inline function.

Signed-off-by: Simon Glass <sjg@chromium.org>
2017-02-08 06:12:14 -07:00
Simon Glass 65fba5927c dm: backlight: Add a driver for a PWM backlight
Many backlights need to use a PWM to control the brightness. Add a driver
for this. It understands the standard device tree binding.

Signed-off-by: Simon Glass <sjg@chromium.org>
2016-01-21 20:42:36 -07:00