mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
- Core Frameworks
- Remove unused/obsolete code/comments
- New Functionality
- Allow less granular brightness specification for high-res PWMs; pwm_bl
- Align brightness {inc,dec}rements with that perceived by the human-eye; pwm_bl
- Fix-ups
- Prepare for the introduction of -Wimplicit-fall-through; adp8860_bl
- Bug Fixes
- Fix uninitialised variable; pwm_bl
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAlt6gwcACgkQUa+KL4f8
d2EKfA//Vbomk1W0DtqBuyKUask0gcaunuICWtKZG5TnUOJctp7Jmno4UrCmkvHD
FDoOJcq3LoI/xfh68tEhvUHqYbFQrOPJC0K8jCszVzdACUsz1+Gw1oCgmQUPGg9r
TG9QlQZuimbqWzmH2xQquH2H6yVe+2xJZ1U6X4KPLP0OKkSwrOfm6sYrV7Qus+uw
1T77j8s9c5n+qiyAQt7vUBbwBDAhn33QMNqLU72QR6KmJ4A8VS8nyPFTZGXeX8nz
WvrpJ3wqKRHXW2Fe4YKzs4fXMIDJpjQn8Ls8vn8ESRL+Pd+UvGsLUyZ5uYG9Opht
NN7UGlSRjRdaX3NiiFH8/XS16bnQk2lsrVjOIfvaSmZbMCND2UAc7M1xkxhBG6h/
LKwi9RJiTxYswf/XgSAgMfv7Ge1CCIAZljMnDuJZmMEW49tKkAbc12tNypw/yujX
yg0ynHb1yBGUM4EbEhuhfgLx067ARXv/fuvMdfxcUlqG1RBhrpA/xw4OueILemwM
dJE9IwCRChWxgnlq2Oirnt4pPjR1k5tui4pR5qXvULm8J2PLLSrBM3WUlbcE/m0f
jxkSuEAWLvyd+dPwl1dNm9uLSho8N8TR2f921AUeyFmFbozPeSEGUiAeMCY0ly5M
IUg5caqVF3NvkKlW+lmL9Ik8Gd6j1JGEnaJE8NUKRzdu4ZLev6k=
=C/pI
-----END PGP SIGNATURE-----
Merge tag 'backlight-next-4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight
Pull backlight updates from Lee Jones:
"Core Framework:
- Remove unused/obsolete code/comments
New Functionality:
- Allow less granular brightness specification for high-res PWMs; pwm_bl
- Align brightness {inc,dec}rements with that perceived by the human-eye; pwm_bl
Fix-ups:
- Prepare for the introduction of -Wimplicit-fall-through; adp8860_bl
Bug Fixes:
- Fix uninitialised variable; pwm_bl"
* tag 'backlight-next-4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight:
backlight: pwm_bl: Fix uninitialized variable
backlight: adp8860: Mark expected switch fall-through
backlight: Remove obsolete comment for ->state
dt-bindings: pwm-backlight: Move brightness-levels to optional
backlight: pwm_bl: Compute brightness of LED linearly to human eye
dt-bindings: pwm-backlight: Add a num-interpolation-steps property
backlight: pwm_bl: Linear interpolation between brightness-levels
This commit is contained in:
commit
61c4fc1eaf
4 changed files with 247 additions and 21 deletions
|
|
@ -3,13 +3,6 @@ pwm-backlight bindings
|
|||
Required properties:
|
||||
- compatible: "pwm-backlight"
|
||||
- pwms: OF device-tree PWM specification (see PWM binding[0])
|
||||
- brightness-levels: Array of distinct brightness levels. Typically these
|
||||
are in the range from 0 to 255, but any range starting at 0 will do.
|
||||
The actual brightness level (PWM duty cycle) will be interpolated
|
||||
from these values. 0 means a 0% duty cycle (darkest/off), while the
|
||||
last value in the array represents a 100% duty cycle (brightest).
|
||||
- default-brightness-level: the default brightness level (index into the
|
||||
array defined by the "brightness-levels" property)
|
||||
- power-supply: regulator for supply voltage
|
||||
|
||||
Optional properties:
|
||||
|
|
@ -21,6 +14,19 @@ Optional properties:
|
|||
and enabling the backlight using GPIO.
|
||||
- pwm-off-delay-ms: Delay in ms between disabling the backlight using GPIO
|
||||
and setting PWM value to 0.
|
||||
- brightness-levels: Array of distinct brightness levels. Typically these
|
||||
are in the range from 0 to 255, but any range starting at
|
||||
0 will do. The actual brightness level (PWM duty cycle)
|
||||
will be interpolated from these values. 0 means a 0% duty
|
||||
cycle (darkest/off), while the last value in the array
|
||||
represents a 100% duty cycle (brightest).
|
||||
- default-brightness-level: The default brightness level (index into the
|
||||
array defined by the "brightness-levels" property).
|
||||
- num-interpolated-steps: Number of interpolated steps between each value
|
||||
of brightness-levels table. This way a high
|
||||
resolution pwm duty cycle can be used without
|
||||
having to list out every possible value in the
|
||||
brightness-level array.
|
||||
|
||||
[0]: Documentation/devicetree/bindings/pwm/pwm.txt
|
||||
[1]: Documentation/devicetree/bindings/gpio/gpio.txt
|
||||
|
|
@ -39,3 +45,17 @@ Example:
|
|||
post-pwm-on-delay-ms = <10>;
|
||||
pwm-off-delay-ms = <10>;
|
||||
};
|
||||
|
||||
Example using num-interpolation-steps:
|
||||
|
||||
backlight {
|
||||
compatible = "pwm-backlight";
|
||||
pwms = <&pwm 0 5000000>;
|
||||
|
||||
brightness-levels = <0 2048 4096 8192 16384 65535>;
|
||||
num-interpolated-steps = <2048>;
|
||||
default-brightness-level = <4096>;
|
||||
|
||||
power-supply = <&vdd_bl_reg>;
|
||||
enable-gpios = <&gpio 58 0>;
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue