mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-27 13:05:03 +08:00
5b916aa755
The hw-blinking of the LED controller in the Whiskey Cove PMIC can also be used for a hw-breathing effect. As discussed during review of v2 of the submission of the new leds-cht-wcove driver, the LED subsystem already supports breathing mode on several other LED controllers using the hw_pattern interface. Implement a pattern_set callback to implement breathing mode modelled after the breathing mode supported by the SC27xx breathing light and Crane EL15203000 LED drivers. The Whiskey Cove PMIC's breathing mode is closer to the EL15203000 one then to the SC27xx one since it does not support staying high / low for a specific time, it only supports rise and fall times. As such the supported hw_pattern and the documentation for this is almost a 1:1 copy of the pattern/docs for the EL15203000 breathing mode. Suggested-by: Jacek Anaszewski <jacek.anaszewski@gmail.com> Link: https://lore.kernel.org/all/6beed61c-1fc6-6525-e873-a8978f5fbffb@gmail.com/ Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20230430195952.862527-4-hdegoede@redhat.com Signed-off-by: Lee Jones <lee@kernel.org>
39 lines
1.1 KiB
ReStructuredText
39 lines
1.1 KiB
ReStructuredText
.. SPDX-License-Identifier: GPL-2.0
|
|
|
|
===========================================================
|
|
Kernel driver for Intel Cherry Trail Whiskey Cove PMIC LEDs
|
|
===========================================================
|
|
|
|
/sys/class/leds/<led>/hw_pattern
|
|
--------------------------------
|
|
|
|
Specify a hardware pattern for the Whiskey Cove PMIC LEDs.
|
|
|
|
The only supported pattern is hardware breathing mode::
|
|
|
|
"0 2000 1 2000"
|
|
|
|
^
|
|
|
|
|
Max-| ---
|
|
| / \
|
|
| / \
|
|
| / \ /
|
|
| / \ /
|
|
Min-|- ---
|
|
|
|
|
0------2------4--> time (sec)
|
|
|
|
The rise and fall times must be the same value.
|
|
Supported values are 2000, 1000, 500 and 250 for
|
|
breathing frequencies of 1/4, 1/2, 1 and 2 Hz.
|
|
|
|
The set pattern only controls the timing. For max brightness the last
|
|
set brightness is used and the max brightness can be changed
|
|
while breathing by writing the brightness attribute.
|
|
|
|
This is just like how blinking works in the LED subsystem,
|
|
for both sw and hw blinking the brightness can also be changed
|
|
while blinking. Breathing on this hw really is just a variant
|
|
mode of blinking.
|