xref: /OK3568_Linux_fs/kernel/Documentation/leds/leds-sc27xx.rst (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun.. SPDX-License-Identifier: GPL-2.0
2*4882a593Smuzhiyun
3*4882a593Smuzhiyun===================================
4*4882a593SmuzhiyunKernel driver for Spreadtrum SC27XX
5*4882a593Smuzhiyun===================================
6*4882a593Smuzhiyun
7*4882a593Smuzhiyun/sys/class/leds/<led>/hw_pattern
8*4882a593Smuzhiyun--------------------------------
9*4882a593Smuzhiyun
10*4882a593SmuzhiyunSpecify a hardware pattern for the SC27XX LED. For the SC27XX
11*4882a593SmuzhiyunLED controller, it only supports 4 stages to make a single
12*4882a593Smuzhiyunhardware pattern, which is used to configure the rise time,
13*4882a593Smuzhiyunhigh time, fall time and low time for the breathing mode.
14*4882a593Smuzhiyun
15*4882a593SmuzhiyunFor the breathing mode, the SC27XX LED only expects one brightness
16*4882a593Smuzhiyunfor the high stage. To be compatible with the hardware pattern
17*4882a593Smuzhiyunformat, we should set brightness as 0 for rise stage, fall
18*4882a593Smuzhiyunstage and low stage.
19*4882a593Smuzhiyun
20*4882a593Smuzhiyun- Min stage duration: 125 ms
21*4882a593Smuzhiyun- Max stage duration: 31875 ms
22*4882a593Smuzhiyun
23*4882a593SmuzhiyunSince the stage duration step is 125 ms, the duration should be
24*4882a593Smuzhiyuna multiplier of 125, like 125ms, 250ms, 375ms, 500ms ... 31875ms.
25*4882a593Smuzhiyun
26*4882a593SmuzhiyunThus the format of the hardware pattern values should be:
27*4882a593Smuzhiyun"0 rise_duration brightness high_duration 0 fall_duration 0 low_duration".
28