xref: /linux/Documentation/leds/leds-sc27xx.rst (revision cdd38c5f1ce4398ec58fec95904b75824daab7b5)
1*26a07553SMauro Carvalho Chehab.. SPDX-License-Identifier: GPL-2.0
2*26a07553SMauro Carvalho Chehab
3*26a07553SMauro Carvalho Chehab===================================
4*26a07553SMauro Carvalho ChehabKernel driver for Spreadtrum SC27XX
5*26a07553SMauro Carvalho Chehab===================================
6*26a07553SMauro Carvalho Chehab
7*26a07553SMauro Carvalho Chehab/sys/class/leds/<led>/hw_pattern
8*26a07553SMauro Carvalho Chehab--------------------------------
9*26a07553SMauro Carvalho Chehab
10*26a07553SMauro Carvalho ChehabSpecify a hardware pattern for the SC27XX LED. For the SC27XX
11*26a07553SMauro Carvalho ChehabLED controller, it only supports 4 stages to make a single
12*26a07553SMauro Carvalho Chehabhardware pattern, which is used to configure the rise time,
13*26a07553SMauro Carvalho Chehabhigh time, fall time and low time for the breathing mode.
14*26a07553SMauro Carvalho Chehab
15*26a07553SMauro Carvalho ChehabFor the breathing mode, the SC27XX LED only expects one brightness
16*26a07553SMauro Carvalho Chehabfor the high stage. To be compatible with the hardware pattern
17*26a07553SMauro Carvalho Chehabformat, we should set brightness as 0 for rise stage, fall
18*26a07553SMauro Carvalho Chehabstage and low stage.
19*26a07553SMauro Carvalho Chehab
20*26a07553SMauro Carvalho Chehab- Min stage duration: 125 ms
21*26a07553SMauro Carvalho Chehab- Max stage duration: 31875 ms
22*26a07553SMauro Carvalho Chehab
23*26a07553SMauro Carvalho ChehabSince the stage duration step is 125 ms, the duration should be
24*26a07553SMauro Carvalho Chehaba multiplier of 125, like 125ms, 250ms, 375ms, 500ms ... 31875ms.
25*26a07553SMauro Carvalho Chehab
26*26a07553SMauro Carvalho ChehabThus the format of the hardware pattern values should be:
27*26a07553SMauro Carvalho Chehab"0 rise_duration brightness high_duration 0 fall_duration 0 low_duration".
28