0001 .. SPDX-License-Identifier: GPL-2.0
0002
0003 ===================================
0004 Kernel driver for Spreadtrum SC27XX
0005 ===================================
0006
0007 /sys/class/leds/<led>/hw_pattern
0008 --------------------------------
0009
0010 Specify a hardware pattern for the SC27XX LED. For the SC27XX
0011 LED controller, it only supports 4 stages to make a single
0012 hardware pattern, which is used to configure the rise time,
0013 high time, fall time and low time for the breathing mode.
0014
0015 For the breathing mode, the SC27XX LED only expects one brightness
0016 for the high stage. To be compatible with the hardware pattern
0017 format, we should set brightness as 0 for rise stage, fall
0018 stage and low stage.
0019
0020 - Min stage duration: 125 ms
0021 - Max stage duration: 31875 ms
0022
0023 Since the stage duration step is 125 ms, the duration should be
0024 a multiplier of 125, like 125ms, 250ms, 375ms, 500ms ... 31875ms.
0025
0026 Thus the format of the hardware pattern values should be:
0027 "0 rise_duration brightness high_duration 0 fall_duration 0 low_duration".