Skip to content

Commit 28c1caa

Browse files
XBurstlinusw
authored andcommitted
pinctrl: Ingenic: Improve the code.
1.Rename the original "dmicx" ABIs to "dmic-ifx", since these devices have only one DMIC module which has multiple input interfaces. The original naming is easy to make users mistakenly think that the device has multiple dmic modules. Currently, in the mainline, no other devicetree out there is using the "sfc" ABI, so we should be able to replace it safely. 2.Rename the original "ssix-ce0" ABIs to "ssix-ce", since the X2000 have only one ce pin. The original naming is easy to make users mistakenly think that the device has multiple ce pins. Currently, in the mainline, no other devicetree out there is using the "ssix-ce0" ABIs, so we should be able to replace it safely. 3.Split the original "sfc" ABI into "sfc-data", "sfc-ce", "sfc-clk" to increase the flexibility when configuring the pins. Currently, in the mainline, no other devicetree out there is using the "sfc" ABI, so we should be able to replace it safely. 4.There is more than one compatible string in the match table, so renaming "ingenic_xxxx_of_match[]" to "ingenic_xxxx_of_matches" is more reasonable, and remove the unnecessary commas in "ingenic_gpio_of_matches[]" to reduce code size as much as possible. Signed-off-by: 周琰杰 (Zhou Yanjie) <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
1 parent 5fa9d19 commit 28c1caa

File tree

1 file changed

+89
-66
lines changed

1 file changed

+89
-66
lines changed

drivers/pinctrl/pinctrl-ingenic.c

Lines changed: 89 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1827,7 +1827,9 @@ static int x1000_uart1_data_d_pins[] = { 0x62, 0x63, };
18271827
static int x1000_uart1_hwflow_pins[] = { 0x64, 0x65, };
18281828
static int x1000_uart2_data_a_pins[] = { 0x02, 0x03, };
18291829
static int x1000_uart2_data_d_pins[] = { 0x65, 0x64, };
1830-
static int x1000_sfc_pins[] = { 0x1d, 0x1c, 0x1e, 0x1f, 0x1a, 0x1b, };
1830+
static int x1000_sfc_data_pins[] = { 0x1d, 0x1c, 0x1e, 0x1f, };
1831+
static int x1000_sfc_clk_pins[] = { 0x1a, };
1832+
static int x1000_sfc_ce_pins[] = { 0x1b, };
18311833
static int x1000_ssi_dt_a_22_pins[] = { 0x16, };
18321834
static int x1000_ssi_dt_a_29_pins[] = { 0x1d, };
18331835
static int x1000_ssi_dt_d_pins[] = { 0x62, };
@@ -1871,8 +1873,8 @@ static int x1000_i2s_data_tx_pins[] = { 0x24, };
18711873
static int x1000_i2s_data_rx_pins[] = { 0x23, };
18721874
static int x1000_i2s_clk_txrx_pins[] = { 0x21, 0x22, };
18731875
static int x1000_i2s_sysclk_pins[] = { 0x20, };
1874-
static int x1000_dmic0_pins[] = { 0x35, 0x36, };
1875-
static int x1000_dmic1_pins[] = { 0x25, };
1876+
static int x1000_dmic_if0_pins[] = { 0x35, 0x36, };
1877+
static int x1000_dmic_if1_pins[] = { 0x25, };
18761878
static int x1000_cim_pins[] = {
18771879
0x08, 0x09, 0x0a, 0x0b,
18781880
0x13, 0x12, 0x11, 0x10, 0x0f, 0x0e, 0x0d, 0x0c,
@@ -1901,7 +1903,9 @@ static const struct group_desc x1000_groups[] = {
19011903
INGENIC_PIN_GROUP("uart1-hwflow", x1000_uart1_hwflow, 1),
19021904
INGENIC_PIN_GROUP("uart2-data-a", x1000_uart2_data_a, 2),
19031905
INGENIC_PIN_GROUP("uart2-data-d", x1000_uart2_data_d, 0),
1904-
INGENIC_PIN_GROUP("sfc", x1000_sfc, 1),
1906+
INGENIC_PIN_GROUP("sfc-data", x1000_sfc_data, 1),
1907+
INGENIC_PIN_GROUP("sfc-clk", x1000_sfc_clk, 1),
1908+
INGENIC_PIN_GROUP("sfc-ce", x1000_sfc_ce, 1),
19051909
INGENIC_PIN_GROUP("ssi-dt-a-22", x1000_ssi_dt_a_22, 2),
19061910
INGENIC_PIN_GROUP("ssi-dt-a-29", x1000_ssi_dt_a_29, 2),
19071911
INGENIC_PIN_GROUP("ssi-dt-d", x1000_ssi_dt_d, 0),
@@ -1938,8 +1942,8 @@ static const struct group_desc x1000_groups[] = {
19381942
INGENIC_PIN_GROUP("i2s-data-rx", x1000_i2s_data_rx, 1),
19391943
INGENIC_PIN_GROUP("i2s-clk-txrx", x1000_i2s_clk_txrx, 1),
19401944
INGENIC_PIN_GROUP("i2s-sysclk", x1000_i2s_sysclk, 1),
1941-
INGENIC_PIN_GROUP("dmic0", x1000_dmic0, 0),
1942-
INGENIC_PIN_GROUP("dmic1", x1000_dmic1, 1),
1945+
INGENIC_PIN_GROUP("dmic-if0", x1000_dmic_if0, 0),
1946+
INGENIC_PIN_GROUP("dmic-if1", x1000_dmic_if1, 1),
19431947
INGENIC_PIN_GROUP("cim-data", x1000_cim, 2),
19441948
INGENIC_PIN_GROUP("lcd-8bit", x1000_lcd_8bit, 1),
19451949
INGENIC_PIN_GROUP("lcd-16bit", x1000_lcd_16bit, 1),
@@ -1956,7 +1960,7 @@ static const char *x1000_uart1_groups[] = {
19561960
"uart1-data-a", "uart1-data-d", "uart1-hwflow",
19571961
};
19581962
static const char *x1000_uart2_groups[] = { "uart2-data-a", "uart2-data-d", };
1959-
static const char *x1000_sfc_groups[] = { "sfc", };
1963+
static const char *x1000_sfc_groups[] = { "sfc-data", "sfc-clk", "sfc-ce", };
19601964
static const char *x1000_ssi_groups[] = {
19611965
"ssi-dt-a-22", "ssi-dt-a-29", "ssi-dt-d",
19621966
"ssi-dr-a-23", "ssi-dr-a-28", "ssi-dr-d",
@@ -1983,7 +1987,7 @@ static const char *x1000_i2c2_groups[] = { "i2c2-data", };
19831987
static const char *x1000_i2s_groups[] = {
19841988
"i2s-data-tx", "i2s-data-rx", "i2s-clk-txrx", "i2s-sysclk",
19851989
};
1986-
static const char *x1000_dmic_groups[] = { "dmic0", "dmic1", };
1990+
static const char *x1000_dmic_groups[] = { "dmic-if0", "dmic-if1", };
19871991
static const char *x1000_cim_groups[] = { "cim-data", };
19881992
static const char *x1000_lcd_groups[] = { "lcd-8bit", "lcd-16bit", };
19891993
static const char *x1000_pwm0_groups[] = { "pwm0", };
@@ -2048,8 +2052,8 @@ static int x1500_i2s_data_tx_pins[] = { 0x24, };
20482052
static int x1500_i2s_data_rx_pins[] = { 0x23, };
20492053
static int x1500_i2s_clk_txrx_pins[] = { 0x21, 0x22, };
20502054
static int x1500_i2s_sysclk_pins[] = { 0x20, };
2051-
static int x1500_dmic0_pins[] = { 0x35, 0x36, };
2052-
static int x1500_dmic1_pins[] = { 0x25, };
2055+
static int x1500_dmic_if0_pins[] = { 0x35, 0x36, };
2056+
static int x1500_dmic_if1_pins[] = { 0x25, };
20532057
static int x1500_cim_pins[] = {
20542058
0x08, 0x09, 0x0a, 0x0b,
20552059
0x13, 0x12, 0x11, 0x10, 0x0f, 0x0e, 0x0d, 0x0c,
@@ -2068,7 +2072,9 @@ static const struct group_desc x1500_groups[] = {
20682072
INGENIC_PIN_GROUP("uart1-hwflow", x1500_uart1_hwflow, 1),
20692073
INGENIC_PIN_GROUP("uart2-data-a", x1500_uart2_data_a, 2),
20702074
INGENIC_PIN_GROUP("uart2-data-d", x1500_uart2_data_d, 0),
2071-
INGENIC_PIN_GROUP("sfc", x1000_sfc, 1),
2075+
INGENIC_PIN_GROUP("sfc-data", x1000_sfc_data, 1),
2076+
INGENIC_PIN_GROUP("sfc-clk", x1000_sfc_clk, 1),
2077+
INGENIC_PIN_GROUP("sfc-ce", x1000_sfc_ce, 1),
20722078
INGENIC_PIN_GROUP("mmc-1bit", x1500_mmc_1bit, 1),
20732079
INGENIC_PIN_GROUP("mmc-4bit", x1500_mmc_4bit, 1),
20742080
INGENIC_PIN_GROUP("i2c0-data", x1500_i2c0, 0),
@@ -2079,8 +2085,8 @@ static const struct group_desc x1500_groups[] = {
20792085
INGENIC_PIN_GROUP("i2s-data-rx", x1500_i2s_data_rx, 1),
20802086
INGENIC_PIN_GROUP("i2s-clk-txrx", x1500_i2s_clk_txrx, 1),
20812087
INGENIC_PIN_GROUP("i2s-sysclk", x1500_i2s_sysclk, 1),
2082-
INGENIC_PIN_GROUP("dmic0", x1500_dmic0, 0),
2083-
INGENIC_PIN_GROUP("dmic1", x1500_dmic1, 1),
2088+
INGENIC_PIN_GROUP("dmic-if0", x1500_dmic_if0, 0),
2089+
INGENIC_PIN_GROUP("dmic-if1", x1500_dmic_if1, 1),
20842090
INGENIC_PIN_GROUP("cim-data", x1500_cim, 2),
20852091
INGENIC_PIN_GROUP("pwm0", x1500_pwm_pwm0, 0),
20862092
INGENIC_PIN_GROUP("pwm1", x1500_pwm_pwm1, 1),
@@ -2101,7 +2107,7 @@ static const char *x1500_i2c2_groups[] = { "i2c2-data", };
21012107
static const char *x1500_i2s_groups[] = {
21022108
"i2s-data-tx", "i2s-data-rx", "i2s-clk-txrx", "i2s-sysclk",
21032109
};
2104-
static const char *x1500_dmic_groups[] = { "dmic0", "dmic1", };
2110+
static const char *x1500_dmic_groups[] = { "dmic-if0", "dmic-if1", };
21052111
static const char *x1500_cim_groups[] = { "cim-data", };
21062112
static const char *x1500_pwm0_groups[] = { "pwm0", };
21072113
static const char *x1500_pwm1_groups[] = { "pwm1", };
@@ -2151,7 +2157,9 @@ static const u32 x1830_pull_downs[4] = {
21512157
static int x1830_uart0_data_pins[] = { 0x33, 0x36, };
21522158
static int x1830_uart0_hwflow_pins[] = { 0x34, 0x35, };
21532159
static int x1830_uart1_data_pins[] = { 0x38, 0x37, };
2154-
static int x1830_sfc_pins[] = { 0x17, 0x18, 0x1a, 0x19, 0x1b, 0x1c, };
2160+
static int x1830_sfc_data_pins[] = { 0x17, 0x18, 0x1a, 0x19, };
2161+
static int x1830_sfc_clk_pins[] = { 0x1b, };
2162+
static int x1830_sfc_ce_pins[] = { 0x1c, };
21552163
static int x1830_ssi0_dt_pins[] = { 0x4c, };
21562164
static int x1830_ssi0_dr_pins[] = { 0x4b, };
21572165
static int x1830_ssi0_clk_pins[] = { 0x4f, };
@@ -2182,8 +2190,8 @@ static int x1830_i2s_data_rx_pins[] = { 0x54, };
21822190
static int x1830_i2s_clk_txrx_pins[] = { 0x58, 0x52, };
21832191
static int x1830_i2s_clk_rx_pins[] = { 0x56, 0x55, };
21842192
static int x1830_i2s_sysclk_pins[] = { 0x57, };
2185-
static int x1830_dmic0_pins[] = { 0x48, 0x59, };
2186-
static int x1830_dmic1_pins[] = { 0x5a, };
2193+
static int x1830_dmic_if0_pins[] = { 0x48, 0x59, };
2194+
static int x1830_dmic_if1_pins[] = { 0x5a, };
21872195
static int x1830_lcd_tft_8bit_pins[] = {
21882196
0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
21892197
0x68, 0x73, 0x72, 0x69,
@@ -2223,7 +2231,9 @@ static const struct group_desc x1830_groups[] = {
22232231
INGENIC_PIN_GROUP("uart0-data", x1830_uart0_data, 0),
22242232
INGENIC_PIN_GROUP("uart0-hwflow", x1830_uart0_hwflow, 0),
22252233
INGENIC_PIN_GROUP("uart1-data", x1830_uart1_data, 0),
2226-
INGENIC_PIN_GROUP("sfc", x1830_sfc, 1),
2234+
INGENIC_PIN_GROUP("sfc-data", x1830_sfc_data, 1),
2235+
INGENIC_PIN_GROUP("sfc-clk", x1830_sfc_clk, 1),
2236+
INGENIC_PIN_GROUP("sfc-ce", x1830_sfc_ce, 1),
22272237
INGENIC_PIN_GROUP("ssi0-dt", x1830_ssi0_dt, 0),
22282238
INGENIC_PIN_GROUP("ssi0-dr", x1830_ssi0_dr, 0),
22292239
INGENIC_PIN_GROUP("ssi0-clk", x1830_ssi0_clk, 0),
@@ -2254,8 +2264,8 @@ static const struct group_desc x1830_groups[] = {
22542264
INGENIC_PIN_GROUP("i2s-clk-txrx", x1830_i2s_clk_txrx, 0),
22552265
INGENIC_PIN_GROUP("i2s-clk-rx", x1830_i2s_clk_rx, 0),
22562266
INGENIC_PIN_GROUP("i2s-sysclk", x1830_i2s_sysclk, 0),
2257-
INGENIC_PIN_GROUP("dmic0", x1830_dmic0, 2),
2258-
INGENIC_PIN_GROUP("dmic1", x1830_dmic1, 2),
2267+
INGENIC_PIN_GROUP("dmic-if0", x1830_dmic_if0, 2),
2268+
INGENIC_PIN_GROUP("dmic-if1", x1830_dmic_if1, 2),
22592269
INGENIC_PIN_GROUP("lcd-tft-8bit", x1830_lcd_tft_8bit, 0),
22602270
INGENIC_PIN_GROUP("lcd-tft-24bit", x1830_lcd_tft_24bit, 0),
22612271
INGENIC_PIN_GROUP("lcd-slcd-8bit", x1830_lcd_slcd_8bit, 1),
@@ -2281,7 +2291,7 @@ static const struct group_desc x1830_groups[] = {
22812291

22822292
static const char *x1830_uart0_groups[] = { "uart0-data", "uart0-hwflow", };
22832293
static const char *x1830_uart1_groups[] = { "uart1-data", };
2284-
static const char *x1830_sfc_groups[] = { "sfc", };
2294+
static const char *x1830_sfc_groups[] = { "sfc-data", "sfc-clk", "sfc-ce", };
22852295
static const char *x1830_ssi0_groups[] = {
22862296
"ssi0-dt", "ssi0-dr", "ssi0-clk", "ssi0-gpc", "ssi0-ce0", "ssi0-ce1",
22872297
};
@@ -2301,7 +2311,7 @@ static const char *x1830_i2c2_groups[] = { "i2c2-data", };
23012311
static const char *x1830_i2s_groups[] = {
23022312
"i2s-data-tx", "i2s-data-rx", "i2s-clk-txrx", "i2s-clk-rx", "i2s-sysclk",
23032313
};
2304-
static const char *x1830_dmic_groups[] = { "dmic0", "dmic1", };
2314+
static const char *x1830_dmic_groups[] = { "dmic-if0", "dmic-if1", };
23052315
static const char *x1830_lcd_groups[] = {
23062316
"lcd-tft-8bit", "lcd-tft-24bit", "lcd-slcd-8bit", "lcd-slcd-16bit",
23072317
};
@@ -2381,17 +2391,21 @@ static int x2000_uart7_data_a_pins[] = { 0x08, 0x09, };
23812391
static int x2000_uart7_data_c_pins[] = { 0x41, 0x42, };
23822392
static int x2000_uart8_data_pins[] = { 0x3c, 0x3d, };
23832393
static int x2000_uart9_data_pins[] = { 0x3e, 0x3f, };
2384-
static int x2000_sfc0_d_pins[] = { 0x73, 0x74, 0x75, 0x76, 0x71, 0x72, };
2385-
static int x2000_sfc0_e_pins[] = { 0x92, 0x93, 0x94, 0x95, 0x90, 0x91, };
2386-
static int x2000_sfc1_pins[] = { 0x77, 0x78, 0x79, 0x7a, };
2394+
static int x2000_sfc_data_if0_d_pins[] = { 0x73, 0x74, 0x75, 0x76, };
2395+
static int x2000_sfc_data_if0_e_pins[] = { 0x92, 0x93, 0x94, 0x95, };
2396+
static int x2000_sfc_data_if1_pins[] = { 0x77, 0x78, 0x79, 0x7a, };
2397+
static int x2000_sfc_clk_d_pins[] = { 0x71, };
2398+
static int x2000_sfc_clk_e_pins[] = { 0x90, };
2399+
static int x2000_sfc_ce_d_pins[] = { 0x72, };
2400+
static int x2000_sfc_ce_e_pins[] = { 0x91, };
23872401
static int x2000_ssi0_dt_b_pins[] = { 0x3e, };
23882402
static int x2000_ssi0_dt_d_pins[] = { 0x69, };
23892403
static int x2000_ssi0_dr_b_pins[] = { 0x3d, };
23902404
static int x2000_ssi0_dr_d_pins[] = { 0x6a, };
23912405
static int x2000_ssi0_clk_b_pins[] = { 0x3f, };
23922406
static int x2000_ssi0_clk_d_pins[] = { 0x68, };
2393-
static int x2000_ssi0_ce0_b_pins[] = { 0x3c, };
2394-
static int x2000_ssi0_ce0_d_pins[] = { 0x6d, };
2407+
static int x2000_ssi0_ce_b_pins[] = { 0x3c, };
2408+
static int x2000_ssi0_ce_d_pins[] = { 0x6d, };
23952409
static int x2000_ssi1_dt_c_pins[] = { 0x4b, };
23962410
static int x2000_ssi1_dt_d_pins[] = { 0x72, };
23972411
static int x2000_ssi1_dt_e_pins[] = { 0x91, };
@@ -2401,9 +2415,9 @@ static int x2000_ssi1_dr_e_pins[] = { 0x92, };
24012415
static int x2000_ssi1_clk_c_pins[] = { 0x4c, };
24022416
static int x2000_ssi1_clk_d_pins[] = { 0x71, };
24032417
static int x2000_ssi1_clk_e_pins[] = { 0x90, };
2404-
static int x2000_ssi1_ce0_c_pins[] = { 0x49, };
2405-
static int x2000_ssi1_ce0_d_pins[] = { 0x76, };
2406-
static int x2000_ssi1_ce0_e_pins[] = { 0x95, };
2418+
static int x2000_ssi1_ce_c_pins[] = { 0x49, };
2419+
static int x2000_ssi1_ce_d_pins[] = { 0x76, };
2420+
static int x2000_ssi1_ce_e_pins[] = { 0x95, };
24072421
static int x2000_mmc0_1bit_pins[] = { 0x71, 0x72, 0x73, };
24082422
static int x2000_mmc0_4bit_pins[] = { 0x74, 0x75, 0x75, };
24092423
static int x2000_mmc0_8bit_pins[] = { 0x77, 0x78, 0x79, 0x7a, };
@@ -2455,10 +2469,10 @@ static int x2000_i2s3_data_tx2_pins[] = { 0x05, };
24552469
static int x2000_i2s3_data_tx3_pins[] = { 0x06, };
24562470
static int x2000_i2s3_clk_tx_pins[] = { 0x10, 0x02, };
24572471
static int x2000_i2s3_sysclk_tx_pins[] = { 0x00, };
2458-
static int x2000_dmic0_pins[] = { 0x54, 0x55, };
2459-
static int x2000_dmic1_pins[] = { 0x56, };
2460-
static int x2000_dmic2_pins[] = { 0x57, };
2461-
static int x2000_dmic3_pins[] = { 0x58, };
2472+
static int x2000_dmic_if0_pins[] = { 0x54, 0x55, };
2473+
static int x2000_dmic_if1_pins[] = { 0x56, };
2474+
static int x2000_dmic_if2_pins[] = { 0x57, };
2475+
static int x2000_dmic_if3_pins[] = { 0x58, };
24622476
static int x2000_cim_8bit_pins[] = {
24632477
0x0e, 0x0c, 0x0d, 0x4f,
24642478
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
@@ -2545,17 +2559,21 @@ static const struct group_desc x2000_groups[] = {
25452559
INGENIC_PIN_GROUP("uart7-data-c", x2000_uart7_data_c, 3),
25462560
INGENIC_PIN_GROUP("uart8-data", x2000_uart8_data, 3),
25472561
INGENIC_PIN_GROUP("uart9-data", x2000_uart9_data, 3),
2548-
INGENIC_PIN_GROUP("sfc0-d", x2000_sfc0_d, 1),
2549-
INGENIC_PIN_GROUP("sfc0-e", x2000_sfc0_e, 0),
2550-
INGENIC_PIN_GROUP("sfc1", x2000_sfc1, 1),
2562+
INGENIC_PIN_GROUP("sfc-data-if0-d", x2000_sfc_data_if0_d, 1),
2563+
INGENIC_PIN_GROUP("sfc-data-if0-e", x2000_sfc_data_if0_e, 0),
2564+
INGENIC_PIN_GROUP("sfc-data-if1", x2000_sfc_data_if1, 1),
2565+
INGENIC_PIN_GROUP("sfc-clk-d", x2000_sfc_clk_d, 1),
2566+
INGENIC_PIN_GROUP("sfc-clk-e", x2000_sfc_clk_e, 0),
2567+
INGENIC_PIN_GROUP("sfc-ce-d", x2000_sfc_ce_d, 1),
2568+
INGENIC_PIN_GROUP("sfc-ce-e", x2000_sfc_ce_e, 0),
25512569
INGENIC_PIN_GROUP("ssi0-dt-b", x2000_ssi0_dt_b, 1),
25522570
INGENIC_PIN_GROUP("ssi0-dt-d", x2000_ssi0_dt_d, 1),
25532571
INGENIC_PIN_GROUP("ssi0-dr-b", x2000_ssi0_dr_b, 1),
25542572
INGENIC_PIN_GROUP("ssi0-dr-d", x2000_ssi0_dr_d, 1),
25552573
INGENIC_PIN_GROUP("ssi0-clk-b", x2000_ssi0_clk_b, 1),
25562574
INGENIC_PIN_GROUP("ssi0-clk-d", x2000_ssi0_clk_d, 1),
2557-
INGENIC_PIN_GROUP("ssi0-ce0-b", x2000_ssi0_ce0_b, 1),
2558-
INGENIC_PIN_GROUP("ssi0-ce0-d", x2000_ssi0_ce0_d, 1),
2575+
INGENIC_PIN_GROUP("ssi0-ce-b", x2000_ssi0_ce_b, 1),
2576+
INGENIC_PIN_GROUP("ssi0-ce-d", x2000_ssi0_ce_d, 1),
25592577
INGENIC_PIN_GROUP("ssi1-dt-c", x2000_ssi1_dt_c, 2),
25602578
INGENIC_PIN_GROUP("ssi1-dt-d", x2000_ssi1_dt_d, 2),
25612579
INGENIC_PIN_GROUP("ssi1-dt-e", x2000_ssi1_dt_e, 1),
@@ -2565,9 +2583,9 @@ static const struct group_desc x2000_groups[] = {
25652583
INGENIC_PIN_GROUP("ssi1-clk-c", x2000_ssi1_clk_c, 2),
25662584
INGENIC_PIN_GROUP("ssi1-clk-d", x2000_ssi1_clk_d, 2),
25672585
INGENIC_PIN_GROUP("ssi1-clk-e", x2000_ssi1_clk_e, 1),
2568-
INGENIC_PIN_GROUP("ssi1-ce0-c", x2000_ssi1_ce0_c, 2),
2569-
INGENIC_PIN_GROUP("ssi1-ce0-d", x2000_ssi1_ce0_d, 2),
2570-
INGENIC_PIN_GROUP("ssi1-ce0-e", x2000_ssi1_ce0_e, 1),
2586+
INGENIC_PIN_GROUP("ssi1-ce-c", x2000_ssi1_ce_c, 2),
2587+
INGENIC_PIN_GROUP("ssi1-ce-d", x2000_ssi1_ce_d, 2),
2588+
INGENIC_PIN_GROUP("ssi1-ce-e", x2000_ssi1_ce_e, 1),
25712589
INGENIC_PIN_GROUP("mmc0-1bit", x2000_mmc0_1bit, 0),
25722590
INGENIC_PIN_GROUP("mmc0-4bit", x2000_mmc0_4bit, 0),
25732591
INGENIC_PIN_GROUP("mmc0-8bit", x2000_mmc0_8bit, 0),
@@ -2612,10 +2630,10 @@ static const struct group_desc x2000_groups[] = {
26122630
INGENIC_PIN_GROUP("i2s3-data-tx3", x2000_i2s3_data_tx3, 2),
26132631
INGENIC_PIN_GROUP("i2s3-clk-tx", x2000_i2s3_clk_tx, 2),
26142632
INGENIC_PIN_GROUP("i2s3-sysclk-tx", x2000_i2s3_sysclk_tx, 2),
2615-
INGENIC_PIN_GROUP("dmic0", x2000_dmic0, 0),
2616-
INGENIC_PIN_GROUP("dmic1", x2000_dmic1, 0),
2617-
INGENIC_PIN_GROUP("dmic2", x2000_dmic2, 0),
2618-
INGENIC_PIN_GROUP("dmic3", x2000_dmic3, 0),
2633+
INGENIC_PIN_GROUP("dmic-if0", x2000_dmic_if0, 0),
2634+
INGENIC_PIN_GROUP("dmic-if1", x2000_dmic_if1, 0),
2635+
INGENIC_PIN_GROUP("dmic-if2", x2000_dmic_if2, 0),
2636+
INGENIC_PIN_GROUP("dmic-if3", x2000_dmic_if3, 0),
26192637
INGENIC_PIN_GROUP_FUNCS("cim-data-8bit", x2000_cim_8bit,
26202638
x2000_cim_8bit_funcs),
26212639
INGENIC_PIN_GROUP("cim-data-12bit", x2000_cim_12bit, 0),
@@ -2670,18 +2688,21 @@ static const char *x2000_uart6_groups[] = { "uart6-data-a", "uart6-data-c", };
26702688
static const char *x2000_uart7_groups[] = { "uart7-data-a", "uart7-data-c", };
26712689
static const char *x2000_uart8_groups[] = { "uart8-data", };
26722690
static const char *x2000_uart9_groups[] = { "uart9-data", };
2673-
static const char *x2000_sfc_groups[] = { "sfc0-d", "sfc0-e", "sfc1", };
2691+
static const char *x2000_sfc_groups[] = {
2692+
"sfc-data-if0-d", "sfc-data-if0-e", "sfc-data-if1",
2693+
"sfc-clk-d", "sfc-clk-e", "sfc-ce-d", "sfc-ce-e",
2694+
};
26742695
static const char *x2000_ssi0_groups[] = {
26752696
"ssi0-dt-b", "ssi0-dt-d",
26762697
"ssi0-dr-b", "ssi0-dr-d",
26772698
"ssi0-clk-b", "ssi0-clk-d",
2678-
"ssi0-ce0-b", "ssi0-ce0-d",
2699+
"ssi0-ce-b", "ssi0-ce-d",
26792700
};
26802701
static const char *x2000_ssi1_groups[] = {
26812702
"ssi1-dt-c", "ssi1-dt-d", "ssi1-dt-e",
26822703
"ssi1-dr-c", "ssi1-dr-d", "ssi1-dr-e",
26832704
"ssi1-clk-c", "ssi1-clk-d", "ssi1-clk-e",
2684-
"ssi1-ce0-c", "ssi1-ce0-d", "ssi1-ce0-e",
2705+
"ssi1-ce-c", "ssi1-ce-d", "ssi1-ce-e",
26852706
};
26862707
static const char *x2000_mmc0_groups[] = { "mmc0-1bit", "mmc0-4bit", "mmc0-8bit", };
26872708
static const char *x2000_mmc1_groups[] = { "mmc1-1bit", "mmc1-4bit", };
@@ -2711,7 +2732,9 @@ static const char *x2000_i2s3_groups[] = {
27112732
"i2s3-data-tx0", "i2s3-data-tx1", "i2s3-data-tx2", "i2s3-data-tx3",
27122733
"i2s3-clk-tx", "i2s3-sysclk-tx",
27132734
};
2714-
static const char *x2000_dmic_groups[] = { "dmic0", "dmic1", "dmic2", "dmic3", };
2735+
static const char *x2000_dmic_groups[] = {
2736+
"dmic-if0", "dmic-if1", "dmic-if2", "dmic-if3",
2737+
};
27152738
static const char *x2000_cim_groups[] = { "cim-data-8bit", "cim-data-12bit", };
27162739
static const char *x2000_lcd_groups[] = {
27172740
"lcd-tft-8bit", "lcd-tft-16bit", "lcd-tft-18bit", "lcd-tft-24bit",
@@ -3654,19 +3677,19 @@ static const struct regmap_config ingenic_pinctrl_regmap_config = {
36543677
.reg_stride = 4,
36553678
};
36563679

3657-
static const struct of_device_id ingenic_gpio_of_match[] __initconst = {
3658-
{ .compatible = "ingenic,jz4730-gpio", },
3659-
{ .compatible = "ingenic,jz4740-gpio", },
3660-
{ .compatible = "ingenic,jz4725b-gpio", },
3661-
{ .compatible = "ingenic,jz4750-gpio", },
3662-
{ .compatible = "ingenic,jz4755-gpio", },
3663-
{ .compatible = "ingenic,jz4760-gpio", },
3664-
{ .compatible = "ingenic,jz4770-gpio", },
3665-
{ .compatible = "ingenic,jz4775-gpio", },
3666-
{ .compatible = "ingenic,jz4780-gpio", },
3667-
{ .compatible = "ingenic,x1000-gpio", },
3668-
{ .compatible = "ingenic,x1830-gpio", },
3669-
{ .compatible = "ingenic,x2000-gpio", },
3680+
static const struct of_device_id ingenic_gpio_of_matches[] __initconst = {
3681+
{ .compatible = "ingenic,jz4730-gpio" },
3682+
{ .compatible = "ingenic,jz4740-gpio" },
3683+
{ .compatible = "ingenic,jz4725b-gpio" },
3684+
{ .compatible = "ingenic,jz4750-gpio" },
3685+
{ .compatible = "ingenic,jz4755-gpio" },
3686+
{ .compatible = "ingenic,jz4760-gpio" },
3687+
{ .compatible = "ingenic,jz4770-gpio" },
3688+
{ .compatible = "ingenic,jz4775-gpio" },
3689+
{ .compatible = "ingenic,jz4780-gpio" },
3690+
{ .compatible = "ingenic,x1000-gpio" },
3691+
{ .compatible = "ingenic,x1830-gpio" },
3692+
{ .compatible = "ingenic,x2000-gpio" },
36703693
{},
36713694
};
36723695

@@ -3843,7 +3866,7 @@ static int __init ingenic_pinctrl_probe(struct platform_device *pdev)
38433866
dev_set_drvdata(dev, jzpc->map);
38443867

38453868
for_each_child_of_node(dev->of_node, node) {
3846-
if (of_match_node(ingenic_gpio_of_match, node)) {
3869+
if (of_match_node(ingenic_gpio_of_matches, node)) {
38473870
err = ingenic_gpio_probe(jzpc, node);
38483871
if (err) {
38493872
of_node_put(node);
@@ -3857,7 +3880,7 @@ static int __init ingenic_pinctrl_probe(struct platform_device *pdev)
38573880

38583881
#define IF_ENABLED(cfg, ptr) PTR_IF(IS_ENABLED(cfg), (ptr))
38593882

3860-
static const struct of_device_id ingenic_pinctrl_of_match[] = {
3883+
static const struct of_device_id ingenic_pinctrl_of_matches[] = {
38613884
{
38623885
.compatible = "ingenic,jz4730-pinctrl",
38633886
.data = IF_ENABLED(CONFIG_MACH_JZ4730, &jz4730_chip_info)
@@ -3928,7 +3951,7 @@ static const struct of_device_id ingenic_pinctrl_of_match[] = {
39283951
static struct platform_driver ingenic_pinctrl_driver = {
39293952
.driver = {
39303953
.name = "pinctrl-ingenic",
3931-
.of_match_table = ingenic_pinctrl_of_match,
3954+
.of_match_table = ingenic_pinctrl_of_matches,
39323955
},
39333956
};
39343957

0 commit comments

Comments
 (0)