pinctrl-falcon.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513
  1. /*
  2. * linux/drivers/pinctrl/pinmux-falcon.c
  3. * based on linux/drivers/pinctrl/pinmux-pxa910.c
  4. *
  5. * This program is free software; you can redistribute it and/or modify it
  6. * under the terms of the GNU General Public License version 2 as published
  7. * by the Free Software Foundation.
  8. *
  9. * Copyright (C) 2012 Thomas Langer <thomas.langer@lantiq.com>
  10. * Copyright (C) 2012 John Crispin <blogic@openwrt.org>
  11. */
  12. #include <linux/gpio.h>
  13. #include <linux/interrupt.h>
  14. #include <linux/slab.h>
  15. #include <linux/export.h>
  16. #include <linux/err.h>
  17. #include <linux/module.h>
  18. #include <linux/of.h>
  19. #include <linux/of_platform.h>
  20. #include <linux/of_address.h>
  21. #include <linux/of_gpio.h>
  22. #include <linux/platform_device.h>
  23. #include "pinctrl-lantiq.h"
  24. #include <lantiq_soc.h>
  25. /* Multiplexer Control Register */
  26. #define LTQ_PADC_MUX(x) (x * 0x4)
  27. /* Pull Up Enable Register */
  28. #define LTQ_PADC_PUEN 0x80
  29. /* Pull Down Enable Register */
  30. #define LTQ_PADC_PDEN 0x84
  31. /* Slew Rate Control Register */
  32. #define LTQ_PADC_SRC 0x88
  33. /* Drive Current Control Register */
  34. #define LTQ_PADC_DCC 0x8C
  35. /* Pad Control Availability Register */
  36. #define LTQ_PADC_AVAIL 0xF0
  37. #define pad_r32(p, reg) ltq_r32(p + reg)
  38. #define pad_w32(p, val, reg) ltq_w32(val, p + reg)
  39. #define pad_w32_mask(c, clear, set, reg) \
  40. pad_w32(c, (pad_r32(c, reg) & ~(clear)) | (set), reg)
  41. #define pad_getbit(m, r, p) (!!(ltq_r32(m + r) & (1 << p)))
  42. #define PORTS 5
  43. #define PINS 32
  44. #define PORT(x) (x / PINS)
  45. #define PORT_PIN(x) (x % PINS)
  46. #define MFP_FALCON(a, f0, f1, f2, f3) \
  47. { \
  48. .name = #a, \
  49. .pin = a, \
  50. .func = { \
  51. FALCON_MUX_##f0, \
  52. FALCON_MUX_##f1, \
  53. FALCON_MUX_##f2, \
  54. FALCON_MUX_##f3, \
  55. }, \
  56. }
  57. #define GRP_MUX(a, m, p) \
  58. { \
  59. .name = a, \
  60. .mux = FALCON_MUX_##m, \
  61. .pins = p, \
  62. .npins = ARRAY_SIZE(p), \
  63. }
  64. enum falcon_mux {
  65. FALCON_MUX_GPIO = 0,
  66. FALCON_MUX_RST,
  67. FALCON_MUX_NTR,
  68. FALCON_MUX_PPS,
  69. FALCON_MUX_MDIO,
  70. FALCON_MUX_LED,
  71. FALCON_MUX_SPI,
  72. FALCON_MUX_ASC,
  73. FALCON_MUX_I2C,
  74. FALCON_MUX_HOSTIF,
  75. FALCON_MUX_SLIC,
  76. FALCON_MUX_JTAG,
  77. FALCON_MUX_PCM,
  78. FALCON_MUX_MII,
  79. FALCON_MUX_PHY,
  80. FALCON_MUX_NONE = 0xffff,
  81. };
  82. static struct pinctrl_pin_desc falcon_pads[PORTS * PINS];
  83. static int pad_count[PORTS];
  84. static void lantiq_load_pin_desc(struct pinctrl_pin_desc *d, int bank, int len)
  85. {
  86. int base = bank * PINS;
  87. int i;
  88. for (i = 0; i < len; i++) {
  89. /* strlen("ioXYZ") + 1 = 6 */
  90. char *name = kzalloc(6, GFP_KERNEL);
  91. snprintf(name, 6, "io%d", base + i);
  92. d[i].number = base + i;
  93. d[i].name = name;
  94. }
  95. pad_count[bank] = len;
  96. }
  97. static struct ltq_mfp_pin falcon_mfp[] = {
  98. /* pin f0 f1 f2 f3 */
  99. MFP_FALCON(GPIO0, RST, GPIO, NONE, NONE),
  100. MFP_FALCON(GPIO1, GPIO, GPIO, NONE, NONE),
  101. MFP_FALCON(GPIO2, GPIO, GPIO, NONE, NONE),
  102. MFP_FALCON(GPIO3, GPIO, GPIO, NONE, NONE),
  103. MFP_FALCON(GPIO4, NTR, GPIO, NONE, NONE),
  104. MFP_FALCON(GPIO5, NTR, GPIO, PPS, NONE),
  105. MFP_FALCON(GPIO6, RST, GPIO, NONE, NONE),
  106. MFP_FALCON(GPIO7, MDIO, GPIO, NONE, NONE),
  107. MFP_FALCON(GPIO8, MDIO, GPIO, NONE, NONE),
  108. MFP_FALCON(GPIO9, LED, GPIO, NONE, NONE),
  109. MFP_FALCON(GPIO10, LED, GPIO, NONE, NONE),
  110. MFP_FALCON(GPIO11, LED, GPIO, NONE, NONE),
  111. MFP_FALCON(GPIO12, LED, GPIO, NONE, NONE),
  112. MFP_FALCON(GPIO13, LED, GPIO, NONE, NONE),
  113. MFP_FALCON(GPIO14, LED, GPIO, NONE, NONE),
  114. MFP_FALCON(GPIO32, ASC, GPIO, NONE, NONE),
  115. MFP_FALCON(GPIO33, ASC, GPIO, NONE, NONE),
  116. MFP_FALCON(GPIO34, SPI, GPIO, NONE, NONE),
  117. MFP_FALCON(GPIO35, SPI, GPIO, NONE, NONE),
  118. MFP_FALCON(GPIO36, SPI, GPIO, NONE, NONE),
  119. MFP_FALCON(GPIO37, SPI, GPIO, NONE, NONE),
  120. MFP_FALCON(GPIO38, SPI, GPIO, NONE, NONE),
  121. MFP_FALCON(GPIO39, I2C, GPIO, NONE, NONE),
  122. MFP_FALCON(GPIO40, I2C, GPIO, NONE, NONE),
  123. MFP_FALCON(GPIO41, HOSTIF, GPIO, HOSTIF, JTAG),
  124. MFP_FALCON(GPIO42, HOSTIF, GPIO, HOSTIF, NONE),
  125. MFP_FALCON(GPIO43, SLIC, GPIO, NONE, NONE),
  126. MFP_FALCON(GPIO44, SLIC, GPIO, PCM, ASC),
  127. MFP_FALCON(GPIO45, SLIC, GPIO, PCM, ASC),
  128. MFP_FALCON(GPIO64, MII, GPIO, NONE, NONE),
  129. MFP_FALCON(GPIO65, MII, GPIO, NONE, NONE),
  130. MFP_FALCON(GPIO66, MII, GPIO, NONE, NONE),
  131. MFP_FALCON(GPIO67, MII, GPIO, NONE, NONE),
  132. MFP_FALCON(GPIO68, MII, GPIO, NONE, NONE),
  133. MFP_FALCON(GPIO69, MII, GPIO, NONE, NONE),
  134. MFP_FALCON(GPIO70, MII, GPIO, NONE, NONE),
  135. MFP_FALCON(GPIO71, MII, GPIO, NONE, NONE),
  136. MFP_FALCON(GPIO72, MII, GPIO, NONE, NONE),
  137. MFP_FALCON(GPIO73, MII, GPIO, NONE, NONE),
  138. MFP_FALCON(GPIO74, MII, GPIO, NONE, NONE),
  139. MFP_FALCON(GPIO75, MII, GPIO, NONE, NONE),
  140. MFP_FALCON(GPIO76, MII, GPIO, NONE, NONE),
  141. MFP_FALCON(GPIO77, MII, GPIO, NONE, NONE),
  142. MFP_FALCON(GPIO78, MII, GPIO, NONE, NONE),
  143. MFP_FALCON(GPIO79, MII, GPIO, NONE, NONE),
  144. MFP_FALCON(GPIO80, MII, GPIO, NONE, NONE),
  145. MFP_FALCON(GPIO81, MII, GPIO, NONE, NONE),
  146. MFP_FALCON(GPIO82, MII, GPIO, NONE, NONE),
  147. MFP_FALCON(GPIO83, MII, GPIO, NONE, NONE),
  148. MFP_FALCON(GPIO84, MII, GPIO, NONE, NONE),
  149. MFP_FALCON(GPIO85, MII, GPIO, NONE, NONE),
  150. MFP_FALCON(GPIO86, MII, GPIO, NONE, NONE),
  151. MFP_FALCON(GPIO87, MII, GPIO, NONE, NONE),
  152. MFP_FALCON(GPIO88, PHY, GPIO, NONE, NONE),
  153. };
  154. static const unsigned pins_por[] = {GPIO0};
  155. static const unsigned pins_ntr[] = {GPIO4};
  156. static const unsigned pins_ntr8k[] = {GPIO5};
  157. static const unsigned pins_pps[] = {GPIO5};
  158. static const unsigned pins_hrst[] = {GPIO6};
  159. static const unsigned pins_mdio[] = {GPIO7, GPIO8};
  160. static const unsigned pins_bled[] = {GPIO9, GPIO10, GPIO11,
  161. GPIO12, GPIO13, GPIO14};
  162. static const unsigned pins_asc0[] = {GPIO32, GPIO33};
  163. static const unsigned pins_spi[] = {GPIO34, GPIO35, GPIO36};
  164. static const unsigned pins_spi_cs0[] = {GPIO37};
  165. static const unsigned pins_spi_cs1[] = {GPIO38};
  166. static const unsigned pins_i2c[] = {GPIO39, GPIO40};
  167. static const unsigned pins_jtag[] = {GPIO41};
  168. static const unsigned pins_slic[] = {GPIO43, GPIO44, GPIO45};
  169. static const unsigned pins_pcm[] = {GPIO44, GPIO45};
  170. static const unsigned pins_asc1[] = {GPIO44, GPIO45};
  171. static struct ltq_pin_group falcon_grps[] = {
  172. GRP_MUX("por", RST, pins_por),
  173. GRP_MUX("ntr", NTR, pins_ntr),
  174. GRP_MUX("ntr8k", NTR, pins_ntr8k),
  175. GRP_MUX("pps", PPS, pins_pps),
  176. GRP_MUX("hrst", RST, pins_hrst),
  177. GRP_MUX("mdio", MDIO, pins_mdio),
  178. GRP_MUX("bootled", LED, pins_bled),
  179. GRP_MUX("asc0", ASC, pins_asc0),
  180. GRP_MUX("spi", SPI, pins_spi),
  181. GRP_MUX("spi cs0", SPI, pins_spi_cs0),
  182. GRP_MUX("spi cs1", SPI, pins_spi_cs1),
  183. GRP_MUX("i2c", I2C, pins_i2c),
  184. GRP_MUX("jtag", JTAG, pins_jtag),
  185. GRP_MUX("slic", SLIC, pins_slic),
  186. GRP_MUX("pcm", PCM, pins_pcm),
  187. GRP_MUX("asc1", ASC, pins_asc1),
  188. };
  189. static const char * const ltq_rst_grps[] = {"por", "hrst"};
  190. static const char * const ltq_ntr_grps[] = {"ntr", "ntr8k", "pps"};
  191. static const char * const ltq_mdio_grps[] = {"mdio"};
  192. static const char * const ltq_bled_grps[] = {"bootled"};
  193. static const char * const ltq_asc_grps[] = {"asc0", "asc1"};
  194. static const char * const ltq_spi_grps[] = {"spi", "spi cs0", "spi cs1"};
  195. static const char * const ltq_i2c_grps[] = {"i2c"};
  196. static const char * const ltq_jtag_grps[] = {"jtag"};
  197. static const char * const ltq_slic_grps[] = {"slic"};
  198. static const char * const ltq_pcm_grps[] = {"pcm"};
  199. static struct ltq_pmx_func falcon_funcs[] = {
  200. {"rst", ARRAY_AND_SIZE(ltq_rst_grps)},
  201. {"ntr", ARRAY_AND_SIZE(ltq_ntr_grps)},
  202. {"mdio", ARRAY_AND_SIZE(ltq_mdio_grps)},
  203. {"led", ARRAY_AND_SIZE(ltq_bled_grps)},
  204. {"asc", ARRAY_AND_SIZE(ltq_asc_grps)},
  205. {"spi", ARRAY_AND_SIZE(ltq_spi_grps)},
  206. {"i2c", ARRAY_AND_SIZE(ltq_i2c_grps)},
  207. {"jtag", ARRAY_AND_SIZE(ltq_jtag_grps)},
  208. {"slic", ARRAY_AND_SIZE(ltq_slic_grps)},
  209. {"pcm", ARRAY_AND_SIZE(ltq_pcm_grps)},
  210. };
  211. /* --------- pinconf related code --------- */
  212. static int falcon_pinconf_group_get(struct pinctrl_dev *pctrldev,
  213. unsigned group, unsigned long *config)
  214. {
  215. return -ENOTSUPP;
  216. }
  217. static int falcon_pinconf_group_set(struct pinctrl_dev *pctrldev,
  218. unsigned group, unsigned long *configs,
  219. unsigned num_configs)
  220. {
  221. return -ENOTSUPP;
  222. }
  223. static int falcon_pinconf_get(struct pinctrl_dev *pctrldev,
  224. unsigned pin, unsigned long *config)
  225. {
  226. struct ltq_pinmux_info *info = pinctrl_dev_get_drvdata(pctrldev);
  227. enum ltq_pinconf_param param = LTQ_PINCONF_UNPACK_PARAM(*config);
  228. void __iomem *mem = info->membase[PORT(pin)];
  229. switch (param) {
  230. case LTQ_PINCONF_PARAM_DRIVE_CURRENT:
  231. *config = LTQ_PINCONF_PACK(param,
  232. !!pad_getbit(mem, LTQ_PADC_DCC, PORT_PIN(pin)));
  233. break;
  234. case LTQ_PINCONF_PARAM_SLEW_RATE:
  235. *config = LTQ_PINCONF_PACK(param,
  236. !!pad_getbit(mem, LTQ_PADC_SRC, PORT_PIN(pin)));
  237. break;
  238. case LTQ_PINCONF_PARAM_PULL:
  239. if (pad_getbit(mem, LTQ_PADC_PDEN, PORT_PIN(pin)))
  240. *config = LTQ_PINCONF_PACK(param, 1);
  241. else if (pad_getbit(mem, LTQ_PADC_PUEN, PORT_PIN(pin)))
  242. *config = LTQ_PINCONF_PACK(param, 2);
  243. else
  244. *config = LTQ_PINCONF_PACK(param, 0);
  245. break;
  246. default:
  247. return -ENOTSUPP;
  248. }
  249. return 0;
  250. }
  251. static int falcon_pinconf_set(struct pinctrl_dev *pctrldev,
  252. unsigned pin, unsigned long *configs,
  253. unsigned num_configs)
  254. {
  255. enum ltq_pinconf_param param;
  256. int arg;
  257. struct ltq_pinmux_info *info = pinctrl_dev_get_drvdata(pctrldev);
  258. void __iomem *mem = info->membase[PORT(pin)];
  259. u32 reg;
  260. int i;
  261. for (i = 0; i < num_configs; i++) {
  262. param = LTQ_PINCONF_UNPACK_PARAM(configs[i]);
  263. arg = LTQ_PINCONF_UNPACK_ARG(configs[i]);
  264. switch (param) {
  265. case LTQ_PINCONF_PARAM_DRIVE_CURRENT:
  266. reg = LTQ_PADC_DCC;
  267. break;
  268. case LTQ_PINCONF_PARAM_SLEW_RATE:
  269. reg = LTQ_PADC_SRC;
  270. break;
  271. case LTQ_PINCONF_PARAM_PULL:
  272. if (arg == 1)
  273. reg = LTQ_PADC_PDEN;
  274. else
  275. reg = LTQ_PADC_PUEN;
  276. break;
  277. default:
  278. pr_err("%s: Invalid config param %04x\n",
  279. pinctrl_dev_get_name(pctrldev), param);
  280. return -ENOTSUPP;
  281. }
  282. pad_w32(mem, BIT(PORT_PIN(pin)), reg);
  283. if (!(pad_r32(mem, reg) & BIT(PORT_PIN(pin))))
  284. return -ENOTSUPP;
  285. } /* for each config */
  286. return 0;
  287. }
  288. static void falcon_pinconf_dbg_show(struct pinctrl_dev *pctrldev,
  289. struct seq_file *s, unsigned offset)
  290. {
  291. unsigned long config;
  292. struct pin_desc *desc;
  293. struct ltq_pinmux_info *info = pinctrl_dev_get_drvdata(pctrldev);
  294. int port = PORT(offset);
  295. seq_printf(s, " (port %d) mux %d -- ", port,
  296. pad_r32(info->membase[port], LTQ_PADC_MUX(PORT_PIN(offset))));
  297. config = LTQ_PINCONF_PACK(LTQ_PINCONF_PARAM_PULL, 0);
  298. if (!falcon_pinconf_get(pctrldev, offset, &config))
  299. seq_printf(s, "pull %d ",
  300. (int)LTQ_PINCONF_UNPACK_ARG(config));
  301. config = LTQ_PINCONF_PACK(LTQ_PINCONF_PARAM_DRIVE_CURRENT, 0);
  302. if (!falcon_pinconf_get(pctrldev, offset, &config))
  303. seq_printf(s, "drive-current %d ",
  304. (int)LTQ_PINCONF_UNPACK_ARG(config));
  305. config = LTQ_PINCONF_PACK(LTQ_PINCONF_PARAM_SLEW_RATE, 0);
  306. if (!falcon_pinconf_get(pctrldev, offset, &config))
  307. seq_printf(s, "slew-rate %d ",
  308. (int)LTQ_PINCONF_UNPACK_ARG(config));
  309. desc = pin_desc_get(pctrldev, offset);
  310. if (desc) {
  311. if (desc->gpio_owner)
  312. seq_printf(s, " owner: %s", desc->gpio_owner);
  313. } else {
  314. seq_printf(s, " not registered");
  315. }
  316. }
  317. static void falcon_pinconf_group_dbg_show(struct pinctrl_dev *pctrldev,
  318. struct seq_file *s, unsigned selector)
  319. {
  320. }
  321. static const struct pinconf_ops falcon_pinconf_ops = {
  322. .pin_config_get = falcon_pinconf_get,
  323. .pin_config_set = falcon_pinconf_set,
  324. .pin_config_group_get = falcon_pinconf_group_get,
  325. .pin_config_group_set = falcon_pinconf_group_set,
  326. .pin_config_dbg_show = falcon_pinconf_dbg_show,
  327. .pin_config_group_dbg_show = falcon_pinconf_group_dbg_show,
  328. };
  329. static struct pinctrl_desc falcon_pctrl_desc = {
  330. .owner = THIS_MODULE,
  331. .pins = falcon_pads,
  332. .confops = &falcon_pinconf_ops,
  333. };
  334. static inline int falcon_mux_apply(struct pinctrl_dev *pctrldev,
  335. int mfp, int mux)
  336. {
  337. struct ltq_pinmux_info *info = pinctrl_dev_get_drvdata(pctrldev);
  338. int port = PORT(info->mfp[mfp].pin);
  339. if ((port >= PORTS) || (!info->membase[port]))
  340. return -ENODEV;
  341. pad_w32(info->membase[port], mux,
  342. LTQ_PADC_MUX(PORT_PIN(info->mfp[mfp].pin)));
  343. return 0;
  344. }
  345. static const struct ltq_cfg_param falcon_cfg_params[] = {
  346. {"lantiq,pull", LTQ_PINCONF_PARAM_PULL},
  347. {"lantiq,drive-current", LTQ_PINCONF_PARAM_DRIVE_CURRENT},
  348. {"lantiq,slew-rate", LTQ_PINCONF_PARAM_SLEW_RATE},
  349. };
  350. static struct ltq_pinmux_info falcon_info = {
  351. .desc = &falcon_pctrl_desc,
  352. .apply_mux = falcon_mux_apply,
  353. .params = falcon_cfg_params,
  354. .num_params = ARRAY_SIZE(falcon_cfg_params),
  355. };
  356. /* --------- register the pinctrl layer --------- */
  357. int pinctrl_falcon_get_range_size(int id)
  358. {
  359. u32 avail;
  360. if ((id >= PORTS) || (!falcon_info.membase[id]))
  361. return -EINVAL;
  362. avail = pad_r32(falcon_info.membase[id], LTQ_PADC_AVAIL);
  363. return fls(avail);
  364. }
  365. void pinctrl_falcon_add_gpio_range(struct pinctrl_gpio_range *range)
  366. {
  367. pinctrl_add_gpio_range(falcon_info.pctrl, range);
  368. }
  369. static int pinctrl_falcon_probe(struct platform_device *pdev)
  370. {
  371. struct device_node *np;
  372. int pad_count = 0;
  373. int ret = 0;
  374. /* load and remap the pad resources of the different banks */
  375. for_each_compatible_node(np, NULL, "lantiq,pad-falcon") {
  376. struct platform_device *ppdev = of_find_device_by_node(np);
  377. const __be32 *bank = of_get_property(np, "lantiq,bank", NULL);
  378. struct resource res;
  379. u32 avail;
  380. int pins;
  381. if (!of_device_is_available(np))
  382. continue;
  383. if (!ppdev) {
  384. dev_err(&pdev->dev, "failed to find pad pdev\n");
  385. continue;
  386. }
  387. if (!bank || *bank >= PORTS)
  388. continue;
  389. if (of_address_to_resource(np, 0, &res))
  390. continue;
  391. falcon_info.clk[*bank] = clk_get(&ppdev->dev, NULL);
  392. if (IS_ERR(falcon_info.clk[*bank])) {
  393. dev_err(&ppdev->dev, "failed to get clock\n");
  394. return PTR_ERR(falcon_info.clk[*bank]);
  395. }
  396. falcon_info.membase[*bank] = devm_ioremap_resource(&pdev->dev,
  397. &res);
  398. if (IS_ERR(falcon_info.membase[*bank]))
  399. return PTR_ERR(falcon_info.membase[*bank]);
  400. avail = pad_r32(falcon_info.membase[*bank],
  401. LTQ_PADC_AVAIL);
  402. pins = fls(avail);
  403. lantiq_load_pin_desc(&falcon_pads[pad_count], *bank, pins);
  404. pad_count += pins;
  405. clk_enable(falcon_info.clk[*bank]);
  406. dev_dbg(&pdev->dev, "found %s with %d pads\n",
  407. res.name, pins);
  408. }
  409. dev_dbg(&pdev->dev, "found a total of %d pads\n", pad_count);
  410. falcon_pctrl_desc.name = dev_name(&pdev->dev);
  411. falcon_pctrl_desc.npins = pad_count;
  412. falcon_info.mfp = falcon_mfp;
  413. falcon_info.num_mfp = ARRAY_SIZE(falcon_mfp);
  414. falcon_info.grps = falcon_grps;
  415. falcon_info.num_grps = ARRAY_SIZE(falcon_grps);
  416. falcon_info.funcs = falcon_funcs;
  417. falcon_info.num_funcs = ARRAY_SIZE(falcon_funcs);
  418. ret = ltq_pinctrl_register(pdev, &falcon_info);
  419. if (!ret)
  420. dev_info(&pdev->dev, "Init done\n");
  421. return ret;
  422. }
  423. static const struct of_device_id falcon_match[] = {
  424. { .compatible = "lantiq,pinctrl-falcon" },
  425. {},
  426. };
  427. MODULE_DEVICE_TABLE(of, falcon_match);
  428. static struct platform_driver pinctrl_falcon_driver = {
  429. .probe = pinctrl_falcon_probe,
  430. .driver = {
  431. .name = "pinctrl-falcon",
  432. .of_match_table = falcon_match,
  433. },
  434. };
  435. int __init pinctrl_falcon_init(void)
  436. {
  437. return platform_driver_register(&pinctrl_falcon_driver);
  438. }
  439. core_initcall_sync(pinctrl_falcon_init);