1
2
3
4
5
6
7
8
9 #include <linux/err.h>
10 #include <linux/mfd/madera/core.h>
11
12 #include "pinctrl-madera.h"
13
14
15
16
17
18
19
20
21
22
23
24 static const unsigned int cs47l92_spk1_pins[] = { 2, 3 };
25 static const unsigned int cs47l92_aif1_pins[] = { 4, 5, 6, 7 };
26 static const unsigned int cs47l92_aif2_pins[] = { 8, 9, 10, 11 };
27 static const unsigned int cs47l92_aif3_pins[] = { 12, 13, 14, 15 };
28
29 static const struct madera_pin_groups cs47l92_pin_groups[] = {
30 { "aif1", cs47l92_aif1_pins, ARRAY_SIZE(cs47l92_aif1_pins) },
31 { "aif2", cs47l92_aif2_pins, ARRAY_SIZE(cs47l92_aif2_pins) },
32 { "aif3", cs47l92_aif3_pins, ARRAY_SIZE(cs47l92_aif3_pins) },
33 { "pdmspk1", cs47l92_spk1_pins, ARRAY_SIZE(cs47l92_spk1_pins) },
34 };
35
36 const struct madera_pin_chip cs47l92_pin_chip = {
37 .n_pins = CS47L92_NUM_GPIOS,
38 .pin_groups = cs47l92_pin_groups,
39 .n_pin_groups = ARRAY_SIZE(cs47l92_pin_groups),
40 };