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>
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>
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>
Some Rockchip dts use invert level array for backligh.
Change-Id: Ic6b5e22031cf570a56bb2854ed10f3e7c24029cc
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
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
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>
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>