Skip to content

Commit 6c979fe

Browse files
committed
Bring the driver up to date
1 parent 01a93c7 commit 6c979fe

File tree

12 files changed

+431
-160
lines changed

12 files changed

+431
-160
lines changed

app/drivers/led_strip/CMakeLists.txt

-4
This file was deleted.

app/drivers/led_strip/Kconfig

-10
This file was deleted.

app/drivers/led_strip/is31fl3743a/CMakeLists.txt

-6
This file was deleted.

app/drivers/led_strip/is31fl3743a/Kconfig

-20
This file was deleted.

app/dts/bindings/led_strip/issi,is31fl3743a.yaml

+291-12
Original file line numberDiff line numberDiff line change
@@ -28,24 +28,21 @@ properties:
2828
SW setting used to control the matrix size by turning off SWx pins
2929
as described in the datasheet.
3030
31-
cs-order:
32-
type: uint8-array
33-
required: false
34-
default: [0x02, 0x01, 0x00, 0x05, 0x04, 0x03, 0x08, 0x07, 0x06, 0x0B, 0x0A, 0x09, 0x0E, 0x0D, 0x0C, 0x11, 0x10, 0x0F]
31+
map:
32+
type: array
33+
required: true
3534
description: |
36-
Stores the configuration of CS* pins.
37-
Each 3 consecutive numbers must be R, G and B pins for a single LED.
38-
Matches the reference design from the datasheet by default.
35+
Configure how RGB pixels are mapped to individual pixel registers.
3936
40-
riset:
37+
r-ext:
4138
type: int
4239
required: true
43-
description: Riset resistor value in kiloohms.
40+
description: Rext resistor value in kiloohms.
4441

4542
led-max-current:
4643
type: int
4744
required: true
48-
description: Maximum allowed LED current in mAh. The maximum allowed by the chip is 34.
45+
description: Maximum current for each LED in mA. The chip supports up to 34mA.
4946

5047
sync:
5148
type: int
@@ -56,10 +53,292 @@ properties:
5653
required: false
5754
default: 0x00
5855
description: |
59-
Controls the SYNC function. Set to 0x11 to set the device as main or 0x10 for secondary.
56+
Controls the SYNC function. Set to 0x11 to set the device as main or 0x10 for secondary. 0x00 for 'off'.
6057
6158
sdb-gpios:
6259
type: phandle-array
63-
required: true
60+
required: false
6461
description: |
6562
GPIO pin for hardware shutdown functionality.
63+
64+
chain-length:
65+
type: int
66+
required: true
67+
description: |
68+
How many RGB LEDs are driven by the IC.
69+
70+
rgb-scaling:
71+
type: array
72+
required: true
73+
description: |
74+
Current scaling factor for R, G and B channels in the 0-255 range.
75+
This setting will adjust the brightness of the respective color pixels relative to each other
76+
by scaling the amount of current flowing through them. 255 equals lex-max-current.
77+
78+
gamma:
79+
type: array
80+
required: false
81+
description: |
82+
Gamma correction lookup values.
83+
The gamma values make the LED brightness seem more linear to human eyes.
84+
Default values match the recommendation from the IC datasheet but note that this may
85+
or may not apply for your particular LEDs.
86+
default:
87+
[
88+
0,
89+
0,
90+
0,
91+
0,
92+
1,
93+
1,
94+
1,
95+
1,
96+
2,
97+
2,
98+
2,
99+
2,
100+
3,
101+
3,
102+
3,
103+
3,
104+
4,
105+
4,
106+
4,
107+
4,
108+
5,
109+
5,
110+
5,
111+
5,
112+
6,
113+
6,
114+
6,
115+
6,
116+
7,
117+
7,
118+
7,
119+
7,
120+
8,
121+
8,
122+
8,
123+
8,
124+
10,
125+
10,
126+
10,
127+
10,
128+
12,
129+
12,
130+
12,
131+
12,
132+
14,
133+
14,
134+
14,
135+
14,
136+
16,
137+
16,
138+
16,
139+
16,
140+
18,
141+
18,
142+
18,
143+
18,
144+
20,
145+
20,
146+
20,
147+
20,
148+
22,
149+
22,
150+
22,
151+
22,
152+
24,
153+
24,
154+
24,
155+
24,
156+
26,
157+
26,
158+
26,
159+
26,
160+
29,
161+
29,
162+
29,
163+
29,
164+
32,
165+
32,
166+
32,
167+
32,
168+
35,
169+
35,
170+
35,
171+
35,
172+
38,
173+
38,
174+
38,
175+
38,
176+
41,
177+
41,
178+
41,
179+
41,
180+
44,
181+
44,
182+
44,
183+
44,
184+
47,
185+
47,
186+
47,
187+
47,
188+
50,
189+
50,
190+
50,
191+
50,
192+
53,
193+
53,
194+
53,
195+
53,
196+
57,
197+
57,
198+
57,
199+
57,
200+
61,
201+
61,
202+
61,
203+
61,
204+
65,
205+
65,
206+
65,
207+
65,
208+
69,
209+
69,
210+
69,
211+
69,
212+
73,
213+
73,
214+
73,
215+
73,
216+
77,
217+
77,
218+
77,
219+
77,
220+
81,
221+
81,
222+
81,
223+
81,
224+
85,
225+
85,
226+
85,
227+
85,
228+
89,
229+
89,
230+
89,
231+
89,
232+
94,
233+
94,
234+
94,
235+
94,
236+
99,
237+
99,
238+
99,
239+
99,
240+
104,
241+
104,
242+
104,
243+
104,
244+
109,
245+
109,
246+
109,
247+
109,
248+
114,
249+
114,
250+
114,
251+
114,
252+
119,
253+
119,
254+
119,
255+
119,
256+
124,
257+
124,
258+
124,
259+
124,
260+
129,
261+
129,
262+
129,
263+
129,
264+
134,
265+
134,
266+
134,
267+
134,
268+
140,
269+
140,
270+
140,
271+
140,
272+
146,
273+
146,
274+
146,
275+
146,
276+
152,
277+
152,
278+
152,
279+
152,
280+
158,
281+
158,
282+
158,
283+
158,
284+
164,
285+
164,
286+
164,
287+
164,
288+
170,
289+
170,
290+
170,
291+
170,
292+
176,
293+
176,
294+
176,
295+
176,
296+
182,
297+
182,
298+
182,
299+
182,
300+
188,
301+
188,
302+
188,
303+
188,
304+
195,
305+
195,
306+
195,
307+
195,
308+
202,
309+
202,
310+
202,
311+
202,
312+
209,
313+
209,
314+
209,
315+
209,
316+
216,
317+
216,
318+
216,
319+
216,
320+
223,
321+
223,
322+
223,
323+
223,
324+
230,
325+
230,
326+
230,
327+
230,
328+
237,
329+
237,
330+
237,
331+
237,
332+
244,
333+
244,
334+
244,
335+
244,
336+
251,
337+
251,
338+
251,
339+
251,
340+
255,
341+
255,
342+
255,
343+
255,
344+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/*
2+
* Copyright (c) 2024 The ZMK Contributors
3+
*
4+
* SPDX-License-Identifier: MIT
5+
*/
6+
7+
#define RGB(com, r, g, b) (com + r)(com + g)(com + b)
8+
9+
#define SW(n) ((n - 1) * 18)
10+
#define CS(n) (n - 1)

app/module/drivers/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ add_subdirectory_ifdef(CONFIG_GPIO gpio)
55
add_subdirectory_ifdef(CONFIG_KSCAN kscan)
66
add_subdirectory_ifdef(CONFIG_SENSOR sensor)
77
add_subdirectory_ifdef(CONFIG_DISPLAY display)
8+
add_subdirectory_ifdef(CONFIG_LED_STRIP led_strip)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Copyright (c) 2020 The ZMK Contributors
2+
# SPDX-License-Identifier: MIT
3+
4+
zephyr_library_amend()
5+
6+
zephyr_library_sources_ifdef(CONFIG_IS31FL3743A is31fl3743a.c)

0 commit comments

Comments
 (0)