xref: /linux/drivers/pinctrl/freescale/pinctrl-imx23.c (revision edad3b2a57082f6166b4f13445f70e8d3fc415fb)
1*edad3b2aSLinus Walleij /*
2*edad3b2aSLinus Walleij  * Copyright 2012 Freescale Semiconductor, Inc.
3*edad3b2aSLinus Walleij  *
4*edad3b2aSLinus Walleij  * The code contained herein is licensed under the GNU General Public
5*edad3b2aSLinus Walleij  * License. You may obtain a copy of the GNU General Public License
6*edad3b2aSLinus Walleij  * Version 2 or later at the following locations:
7*edad3b2aSLinus Walleij  *
8*edad3b2aSLinus Walleij  * http://www.opensource.org/licenses/gpl-license.html
9*edad3b2aSLinus Walleij  * http://www.gnu.org/copyleft/gpl.html
10*edad3b2aSLinus Walleij  */
11*edad3b2aSLinus Walleij 
12*edad3b2aSLinus Walleij #include <linux/init.h>
13*edad3b2aSLinus Walleij #include <linux/module.h>
14*edad3b2aSLinus Walleij #include <linux/of_device.h>
15*edad3b2aSLinus Walleij #include <linux/pinctrl/pinctrl.h>
16*edad3b2aSLinus Walleij #include "pinctrl-mxs.h"
17*edad3b2aSLinus Walleij 
18*edad3b2aSLinus Walleij enum imx23_pin_enum {
19*edad3b2aSLinus Walleij 	GPMI_D00	= PINID(0, 0),
20*edad3b2aSLinus Walleij 	GPMI_D01	= PINID(0, 1),
21*edad3b2aSLinus Walleij 	GPMI_D02	= PINID(0, 2),
22*edad3b2aSLinus Walleij 	GPMI_D03	= PINID(0, 3),
23*edad3b2aSLinus Walleij 	GPMI_D04	= PINID(0, 4),
24*edad3b2aSLinus Walleij 	GPMI_D05	= PINID(0, 5),
25*edad3b2aSLinus Walleij 	GPMI_D06	= PINID(0, 6),
26*edad3b2aSLinus Walleij 	GPMI_D07	= PINID(0, 7),
27*edad3b2aSLinus Walleij 	GPMI_D08	= PINID(0, 8),
28*edad3b2aSLinus Walleij 	GPMI_D09	= PINID(0, 9),
29*edad3b2aSLinus Walleij 	GPMI_D10	= PINID(0, 10),
30*edad3b2aSLinus Walleij 	GPMI_D11	= PINID(0, 11),
31*edad3b2aSLinus Walleij 	GPMI_D12	= PINID(0, 12),
32*edad3b2aSLinus Walleij 	GPMI_D13	= PINID(0, 13),
33*edad3b2aSLinus Walleij 	GPMI_D14	= PINID(0, 14),
34*edad3b2aSLinus Walleij 	GPMI_D15	= PINID(0, 15),
35*edad3b2aSLinus Walleij 	GPMI_CLE	= PINID(0, 16),
36*edad3b2aSLinus Walleij 	GPMI_ALE	= PINID(0, 17),
37*edad3b2aSLinus Walleij 	GPMI_CE2N	= PINID(0, 18),
38*edad3b2aSLinus Walleij 	GPMI_RDY0	= PINID(0, 19),
39*edad3b2aSLinus Walleij 	GPMI_RDY1	= PINID(0, 20),
40*edad3b2aSLinus Walleij 	GPMI_RDY2	= PINID(0, 21),
41*edad3b2aSLinus Walleij 	GPMI_RDY3	= PINID(0, 22),
42*edad3b2aSLinus Walleij 	GPMI_WPN	= PINID(0, 23),
43*edad3b2aSLinus Walleij 	GPMI_WRN	= PINID(0, 24),
44*edad3b2aSLinus Walleij 	GPMI_RDN	= PINID(0, 25),
45*edad3b2aSLinus Walleij 	AUART1_CTS	= PINID(0, 26),
46*edad3b2aSLinus Walleij 	AUART1_RTS	= PINID(0, 27),
47*edad3b2aSLinus Walleij 	AUART1_RX	= PINID(0, 28),
48*edad3b2aSLinus Walleij 	AUART1_TX	= PINID(0, 29),
49*edad3b2aSLinus Walleij 	I2C_SCL		= PINID(0, 30),
50*edad3b2aSLinus Walleij 	I2C_SDA		= PINID(0, 31),
51*edad3b2aSLinus Walleij 	LCD_D00		= PINID(1, 0),
52*edad3b2aSLinus Walleij 	LCD_D01		= PINID(1, 1),
53*edad3b2aSLinus Walleij 	LCD_D02		= PINID(1, 2),
54*edad3b2aSLinus Walleij 	LCD_D03		= PINID(1, 3),
55*edad3b2aSLinus Walleij 	LCD_D04		= PINID(1, 4),
56*edad3b2aSLinus Walleij 	LCD_D05		= PINID(1, 5),
57*edad3b2aSLinus Walleij 	LCD_D06		= PINID(1, 6),
58*edad3b2aSLinus Walleij 	LCD_D07		= PINID(1, 7),
59*edad3b2aSLinus Walleij 	LCD_D08		= PINID(1, 8),
60*edad3b2aSLinus Walleij 	LCD_D09		= PINID(1, 9),
61*edad3b2aSLinus Walleij 	LCD_D10		= PINID(1, 10),
62*edad3b2aSLinus Walleij 	LCD_D11		= PINID(1, 11),
63*edad3b2aSLinus Walleij 	LCD_D12		= PINID(1, 12),
64*edad3b2aSLinus Walleij 	LCD_D13		= PINID(1, 13),
65*edad3b2aSLinus Walleij 	LCD_D14		= PINID(1, 14),
66*edad3b2aSLinus Walleij 	LCD_D15		= PINID(1, 15),
67*edad3b2aSLinus Walleij 	LCD_D16		= PINID(1, 16),
68*edad3b2aSLinus Walleij 	LCD_D17		= PINID(1, 17),
69*edad3b2aSLinus Walleij 	LCD_RESET	= PINID(1, 18),
70*edad3b2aSLinus Walleij 	LCD_RS		= PINID(1, 19),
71*edad3b2aSLinus Walleij 	LCD_WR		= PINID(1, 20),
72*edad3b2aSLinus Walleij 	LCD_CS		= PINID(1, 21),
73*edad3b2aSLinus Walleij 	LCD_DOTCK	= PINID(1, 22),
74*edad3b2aSLinus Walleij 	LCD_ENABLE	= PINID(1, 23),
75*edad3b2aSLinus Walleij 	LCD_HSYNC	= PINID(1, 24),
76*edad3b2aSLinus Walleij 	LCD_VSYNC	= PINID(1, 25),
77*edad3b2aSLinus Walleij 	PWM0		= PINID(1, 26),
78*edad3b2aSLinus Walleij 	PWM1		= PINID(1, 27),
79*edad3b2aSLinus Walleij 	PWM2		= PINID(1, 28),
80*edad3b2aSLinus Walleij 	PWM3		= PINID(1, 29),
81*edad3b2aSLinus Walleij 	PWM4		= PINID(1, 30),
82*edad3b2aSLinus Walleij 	SSP1_CMD	= PINID(2, 0),
83*edad3b2aSLinus Walleij 	SSP1_DETECT	= PINID(2, 1),
84*edad3b2aSLinus Walleij 	SSP1_DATA0	= PINID(2, 2),
85*edad3b2aSLinus Walleij 	SSP1_DATA1	= PINID(2, 3),
86*edad3b2aSLinus Walleij 	SSP1_DATA2	= PINID(2, 4),
87*edad3b2aSLinus Walleij 	SSP1_DATA3	= PINID(2, 5),
88*edad3b2aSLinus Walleij 	SSP1_SCK	= PINID(2, 6),
89*edad3b2aSLinus Walleij 	ROTARYA		= PINID(2, 7),
90*edad3b2aSLinus Walleij 	ROTARYB		= PINID(2, 8),
91*edad3b2aSLinus Walleij 	EMI_A00		= PINID(2, 9),
92*edad3b2aSLinus Walleij 	EMI_A01		= PINID(2, 10),
93*edad3b2aSLinus Walleij 	EMI_A02		= PINID(2, 11),
94*edad3b2aSLinus Walleij 	EMI_A03		= PINID(2, 12),
95*edad3b2aSLinus Walleij 	EMI_A04		= PINID(2, 13),
96*edad3b2aSLinus Walleij 	EMI_A05		= PINID(2, 14),
97*edad3b2aSLinus Walleij 	EMI_A06		= PINID(2, 15),
98*edad3b2aSLinus Walleij 	EMI_A07		= PINID(2, 16),
99*edad3b2aSLinus Walleij 	EMI_A08		= PINID(2, 17),
100*edad3b2aSLinus Walleij 	EMI_A09		= PINID(2, 18),
101*edad3b2aSLinus Walleij 	EMI_A10		= PINID(2, 19),
102*edad3b2aSLinus Walleij 	EMI_A11		= PINID(2, 20),
103*edad3b2aSLinus Walleij 	EMI_A12		= PINID(2, 21),
104*edad3b2aSLinus Walleij 	EMI_BA0		= PINID(2, 22),
105*edad3b2aSLinus Walleij 	EMI_BA1		= PINID(2, 23),
106*edad3b2aSLinus Walleij 	EMI_CASN	= PINID(2, 24),
107*edad3b2aSLinus Walleij 	EMI_CE0N	= PINID(2, 25),
108*edad3b2aSLinus Walleij 	EMI_CE1N	= PINID(2, 26),
109*edad3b2aSLinus Walleij 	GPMI_CE1N	= PINID(2, 27),
110*edad3b2aSLinus Walleij 	GPMI_CE0N	= PINID(2, 28),
111*edad3b2aSLinus Walleij 	EMI_CKE		= PINID(2, 29),
112*edad3b2aSLinus Walleij 	EMI_RASN	= PINID(2, 30),
113*edad3b2aSLinus Walleij 	EMI_WEN		= PINID(2, 31),
114*edad3b2aSLinus Walleij 	EMI_D00		= PINID(3, 0),
115*edad3b2aSLinus Walleij 	EMI_D01		= PINID(3, 1),
116*edad3b2aSLinus Walleij 	EMI_D02		= PINID(3, 2),
117*edad3b2aSLinus Walleij 	EMI_D03		= PINID(3, 3),
118*edad3b2aSLinus Walleij 	EMI_D04		= PINID(3, 4),
119*edad3b2aSLinus Walleij 	EMI_D05		= PINID(3, 5),
120*edad3b2aSLinus Walleij 	EMI_D06		= PINID(3, 6),
121*edad3b2aSLinus Walleij 	EMI_D07		= PINID(3, 7),
122*edad3b2aSLinus Walleij 	EMI_D08		= PINID(3, 8),
123*edad3b2aSLinus Walleij 	EMI_D09		= PINID(3, 9),
124*edad3b2aSLinus Walleij 	EMI_D10		= PINID(3, 10),
125*edad3b2aSLinus Walleij 	EMI_D11		= PINID(3, 11),
126*edad3b2aSLinus Walleij 	EMI_D12		= PINID(3, 12),
127*edad3b2aSLinus Walleij 	EMI_D13		= PINID(3, 13),
128*edad3b2aSLinus Walleij 	EMI_D14		= PINID(3, 14),
129*edad3b2aSLinus Walleij 	EMI_D15		= PINID(3, 15),
130*edad3b2aSLinus Walleij 	EMI_DQM0	= PINID(3, 16),
131*edad3b2aSLinus Walleij 	EMI_DQM1	= PINID(3, 17),
132*edad3b2aSLinus Walleij 	EMI_DQS0	= PINID(3, 18),
133*edad3b2aSLinus Walleij 	EMI_DQS1	= PINID(3, 19),
134*edad3b2aSLinus Walleij 	EMI_CLK		= PINID(3, 20),
135*edad3b2aSLinus Walleij 	EMI_CLKN	= PINID(3, 21),
136*edad3b2aSLinus Walleij };
137*edad3b2aSLinus Walleij 
138*edad3b2aSLinus Walleij static const struct pinctrl_pin_desc imx23_pins[] = {
139*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(GPMI_D00),
140*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(GPMI_D01),
141*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(GPMI_D02),
142*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(GPMI_D03),
143*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(GPMI_D04),
144*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(GPMI_D05),
145*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(GPMI_D06),
146*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(GPMI_D07),
147*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(GPMI_D08),
148*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(GPMI_D09),
149*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(GPMI_D10),
150*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(GPMI_D11),
151*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(GPMI_D12),
152*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(GPMI_D13),
153*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(GPMI_D14),
154*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(GPMI_D15),
155*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(GPMI_CLE),
156*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(GPMI_ALE),
157*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(GPMI_CE2N),
158*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(GPMI_RDY0),
159*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(GPMI_RDY1),
160*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(GPMI_RDY2),
161*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(GPMI_RDY3),
162*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(GPMI_WPN),
163*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(GPMI_WRN),
164*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(GPMI_RDN),
165*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(AUART1_CTS),
166*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(AUART1_RTS),
167*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(AUART1_RX),
168*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(AUART1_TX),
169*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(I2C_SCL),
170*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(I2C_SDA),
171*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_D00),
172*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_D01),
173*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_D02),
174*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_D03),
175*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_D04),
176*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_D05),
177*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_D06),
178*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_D07),
179*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_D08),
180*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_D09),
181*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_D10),
182*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_D11),
183*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_D12),
184*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_D13),
185*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_D14),
186*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_D15),
187*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_D16),
188*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_D17),
189*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_RESET),
190*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_RS),
191*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_WR),
192*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_CS),
193*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_DOTCK),
194*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_ENABLE),
195*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_HSYNC),
196*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_VSYNC),
197*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(PWM0),
198*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(PWM1),
199*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(PWM2),
200*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(PWM3),
201*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(PWM4),
202*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(SSP1_CMD),
203*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(SSP1_DETECT),
204*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(SSP1_DATA0),
205*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(SSP1_DATA1),
206*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(SSP1_DATA2),
207*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(SSP1_DATA3),
208*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(SSP1_SCK),
209*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(ROTARYA),
210*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(ROTARYB),
211*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_A00),
212*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_A01),
213*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_A02),
214*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_A03),
215*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_A04),
216*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_A05),
217*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_A06),
218*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_A07),
219*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_A08),
220*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_A09),
221*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_A10),
222*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_A11),
223*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_A12),
224*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_BA0),
225*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_BA1),
226*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_CASN),
227*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_CE0N),
228*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_CE1N),
229*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(GPMI_CE1N),
230*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(GPMI_CE0N),
231*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_CKE),
232*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_RASN),
233*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_WEN),
234*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_D00),
235*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_D01),
236*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_D02),
237*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_D03),
238*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_D04),
239*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_D05),
240*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_D06),
241*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_D07),
242*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_D08),
243*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_D09),
244*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_D10),
245*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_D11),
246*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_D12),
247*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_D13),
248*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_D14),
249*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_D15),
250*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_DQM0),
251*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_DQM1),
252*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_DQS0),
253*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_DQS1),
254*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_CLK),
255*edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_CLKN),
256*edad3b2aSLinus Walleij };
257*edad3b2aSLinus Walleij 
258*edad3b2aSLinus Walleij static struct mxs_regs imx23_regs = {
259*edad3b2aSLinus Walleij 	.muxsel = 0x100,
260*edad3b2aSLinus Walleij 	.drive = 0x200,
261*edad3b2aSLinus Walleij 	.pull = 0x400,
262*edad3b2aSLinus Walleij };
263*edad3b2aSLinus Walleij 
264*edad3b2aSLinus Walleij static struct mxs_pinctrl_soc_data imx23_pinctrl_data = {
265*edad3b2aSLinus Walleij 	.regs = &imx23_regs,
266*edad3b2aSLinus Walleij 	.pins = imx23_pins,
267*edad3b2aSLinus Walleij 	.npins = ARRAY_SIZE(imx23_pins),
268*edad3b2aSLinus Walleij };
269*edad3b2aSLinus Walleij 
270*edad3b2aSLinus Walleij static int imx23_pinctrl_probe(struct platform_device *pdev)
271*edad3b2aSLinus Walleij {
272*edad3b2aSLinus Walleij 	return mxs_pinctrl_probe(pdev, &imx23_pinctrl_data);
273*edad3b2aSLinus Walleij }
274*edad3b2aSLinus Walleij 
275*edad3b2aSLinus Walleij static const struct of_device_id imx23_pinctrl_of_match[] = {
276*edad3b2aSLinus Walleij 	{ .compatible = "fsl,imx23-pinctrl", },
277*edad3b2aSLinus Walleij 	{ /* sentinel */ }
278*edad3b2aSLinus Walleij };
279*edad3b2aSLinus Walleij MODULE_DEVICE_TABLE(of, imx23_pinctrl_of_match);
280*edad3b2aSLinus Walleij 
281*edad3b2aSLinus Walleij static struct platform_driver imx23_pinctrl_driver = {
282*edad3b2aSLinus Walleij 	.driver = {
283*edad3b2aSLinus Walleij 		.name = "imx23-pinctrl",
284*edad3b2aSLinus Walleij 		.owner = THIS_MODULE,
285*edad3b2aSLinus Walleij 		.of_match_table = imx23_pinctrl_of_match,
286*edad3b2aSLinus Walleij 	},
287*edad3b2aSLinus Walleij 	.probe = imx23_pinctrl_probe,
288*edad3b2aSLinus Walleij 	.remove = mxs_pinctrl_remove,
289*edad3b2aSLinus Walleij };
290*edad3b2aSLinus Walleij 
291*edad3b2aSLinus Walleij static int __init imx23_pinctrl_init(void)
292*edad3b2aSLinus Walleij {
293*edad3b2aSLinus Walleij 	return platform_driver_register(&imx23_pinctrl_driver);
294*edad3b2aSLinus Walleij }
295*edad3b2aSLinus Walleij postcore_initcall(imx23_pinctrl_init);
296*edad3b2aSLinus Walleij 
297*edad3b2aSLinus Walleij static void __exit imx23_pinctrl_exit(void)
298*edad3b2aSLinus Walleij {
299*edad3b2aSLinus Walleij 	platform_driver_unregister(&imx23_pinctrl_driver);
300*edad3b2aSLinus Walleij }
301*edad3b2aSLinus Walleij module_exit(imx23_pinctrl_exit);
302*edad3b2aSLinus Walleij 
303*edad3b2aSLinus Walleij MODULE_AUTHOR("Shawn Guo <shawn.guo@linaro.org>");
304*edad3b2aSLinus Walleij MODULE_DESCRIPTION("Freescale i.MX23 pinctrl driver");
305*edad3b2aSLinus Walleij MODULE_LICENSE("GPL v2");
306