Lines Matching +full:mdio +full:- +full:gpio

1 // SPDX-License-Identifier: GPL-2.0-only
3 * linux/drivers/pinctrl/pinmux-xway.c
4 * based on linux/drivers/pinctrl/pinmux-pxa910.c
11 #include <linux/gpio/driver.h>
21 #include "pinctrl-lantiq.h"
110 /* --------- ase related code --------- */
115 MFP_XWAY(GPIO0, GPIO, EXIN, MII, TDM),
116 MFP_XWAY(GPIO1, GPIO, STP, DFE, EBU),
117 MFP_XWAY(GPIO2, GPIO, STP, DFE, EPHY),
118 MFP_XWAY(GPIO3, GPIO, STP, EPHY, EBU),
119 MFP_XWAY(GPIO4, GPIO, GPT, EPHY, MII),
120 MFP_XWAY(GPIO5, GPIO, MII, ASC, GPT),
121 MFP_XWAY(GPIO6, GPIO, MII, ASC, EXIN),
122 MFP_XWAY(GPIO7, GPIO, SPI, MII, JTAG),
123 MFP_XWAY(GPIO8, GPIO, SPI, MII, JTAG),
124 MFP_XWAY(GPIO9, GPIO, SPI, MII, JTAG),
125 MFP_XWAY(GPIO10, GPIO, SPI, MII, JTAG),
126 MFP_XWAY(GPIO11, GPIO, EBU, CGU, JTAG),
127 MFP_XWAY(GPIO12, GPIO, EBU, MII, SDIO),
128 MFP_XWAY(GPIO13, GPIO, EBU, MII, CGU),
129 MFP_XWAY(GPIO14, GPIO, EBU, SPI, CGU),
130 MFP_XWAY(GPIO15, GPIO, EBU, SPI, SDIO),
131 MFP_XWAY(GPIO16, GPIO, NONE, NONE, NONE),
132 MFP_XWAY(GPIO17, GPIO, NONE, NONE, NONE),
133 MFP_XWAY(GPIO18, GPIO, NONE, NONE, NONE),
134 MFP_XWAY(GPIO19, GPIO, EBU, MII, SDIO),
135 MFP_XWAY(GPIO20, GPIO, EBU, MII, SDIO),
136 MFP_XWAY(GPIO21, GPIO, EBU, MII, EBU2),
137 MFP_XWAY(GPIO22, GPIO, EBU, MII, CGU),
138 MFP_XWAY(GPIO23, GPIO, EBU, MII, CGU),
139 MFP_XWAY(GPIO24, GPIO, EBU, EBU2, MDIO),
140 MFP_XWAY(GPIO25, GPIO, EBU, MII, GPT),
141 MFP_XWAY(GPIO26, GPIO, EBU, MII, SDIO),
142 MFP_XWAY(GPIO27, GPIO, EBU, NONE, MDIO),
143 MFP_XWAY(GPIO28, GPIO, MII, EBU, SDIO),
144 MFP_XWAY(GPIO29, GPIO, EBU, MII, EXIN),
145 MFP_XWAY(GPIO30, GPIO, NONE, NONE, NONE),
146 MFP_XWAY(GPIO31, GPIO, NONE, NONE, NONE),
201 GRP_MUX("mdio", MDIO, ase_pins_mdio),
213 static const char * const ase_mdio_grps[] = {"mdio"};
233 {"mdio", ARRAY_AND_SIZE(ase_mdio_grps)},
238 /* --------- danube related code --------- */
243 MFP_XWAY(GPIO0, GPIO, EXIN, SDIO, TDM),
244 MFP_XWAY(GPIO1, GPIO, EXIN, CBUS, MII),
245 MFP_XWAY(GPIO2, GPIO, CGU, EXIN, MII),
246 MFP_XWAY(GPIO3, GPIO, CGU, SDIO, PCI),
247 MFP_XWAY(GPIO4, GPIO, STP, DFE, ASC),
248 MFP_XWAY(GPIO5, GPIO, STP, MII, DFE),
249 MFP_XWAY(GPIO6, GPIO, STP, GPT, ASC),
250 MFP_XWAY(GPIO7, GPIO, CGU, CBUS, MII),
251 MFP_XWAY(GPIO8, GPIO, CGU, NMI, MII),
252 MFP_XWAY(GPIO9, GPIO, ASC, SPI, MII),
253 MFP_XWAY(GPIO10, GPIO, ASC, SPI, MII),
254 MFP_XWAY(GPIO11, GPIO, ASC, CBUS, SPI),
255 MFP_XWAY(GPIO12, GPIO, ASC, CBUS, MCD),
256 MFP_XWAY(GPIO13, GPIO, EBU, SPI, MII),
257 MFP_XWAY(GPIO14, GPIO, CGU, CBUS, MII),
258 MFP_XWAY(GPIO15, GPIO, SPI, SDIO, JTAG),
259 MFP_XWAY(GPIO16, GPIO, SPI, SDIO, JTAG),
260 MFP_XWAY(GPIO17, GPIO, SPI, SDIO, JTAG),
261 MFP_XWAY(GPIO18, GPIO, SPI, SDIO, JTAG),
262 MFP_XWAY(GPIO19, GPIO, PCI, SDIO, MII),
263 MFP_XWAY(GPIO20, GPIO, JTAG, SDIO, MII),
264 MFP_XWAY(GPIO21, GPIO, PCI, EBU, GPT),
265 MFP_XWAY(GPIO22, GPIO, SPI, MCD, MII),
266 MFP_XWAY(GPIO23, GPIO, EBU, PCI, STP),
267 MFP_XWAY(GPIO24, GPIO, EBU, TDM, PCI),
268 MFP_XWAY(GPIO25, GPIO, TDM, SDIO, ASC),
269 MFP_XWAY(GPIO26, GPIO, EBU, TDM, SDIO),
270 MFP_XWAY(GPIO27, GPIO, TDM, SDIO, ASC),
271 MFP_XWAY(GPIO28, GPIO, GPT, MII, SDIO),
272 MFP_XWAY(GPIO29, GPIO, PCI, CBUS, MII),
273 MFP_XWAY(GPIO30, GPIO, PCI, CBUS, MII),
274 MFP_XWAY(GPIO31, GPIO, EBU, PCI, MII),
413 /* --------- xrx100 related code --------- */
418 MFP_XWAY(GPIO0, GPIO, EXIN, SDIO, TDM),
419 MFP_XWAY(GPIO1, GPIO, EXIN, CBUS, SIN),
420 MFP_XWAY(GPIO2, GPIO, CGU, EXIN, NONE),
421 MFP_XWAY(GPIO3, GPIO, CGU, SDIO, PCI),
422 MFP_XWAY(GPIO4, GPIO, STP, DFE, ASC),
423 MFP_XWAY(GPIO5, GPIO, STP, NONE, DFE),
424 MFP_XWAY(GPIO6, GPIO, STP, GPT, ASC),
425 MFP_XWAY(GPIO7, GPIO, CGU, CBUS, NONE),
426 MFP_XWAY(GPIO8, GPIO, CGU, NMI, NONE),
427 MFP_XWAY(GPIO9, GPIO, ASC, SPI, EXIN),
428 MFP_XWAY(GPIO10, GPIO, ASC, SPI, EXIN),
429 MFP_XWAY(GPIO11, GPIO, ASC, CBUS, SPI),
430 MFP_XWAY(GPIO12, GPIO, ASC, CBUS, MCD),
431 MFP_XWAY(GPIO13, GPIO, EBU, SPI, NONE),
432 MFP_XWAY(GPIO14, GPIO, CGU, NONE, NONE),
433 MFP_XWAY(GPIO15, GPIO, SPI, SDIO, MCD),
434 MFP_XWAY(GPIO16, GPIO, SPI, SDIO, NONE),
435 MFP_XWAY(GPIO17, GPIO, SPI, SDIO, NONE),
436 MFP_XWAY(GPIO18, GPIO, SPI, SDIO, NONE),
437 MFP_XWAY(GPIO19, GPIO, PCI, SDIO, CGU),
438 MFP_XWAY(GPIO20, GPIO, NONE, SDIO, EBU),
439 MFP_XWAY(GPIO21, GPIO, PCI, EBU, GPT),
440 MFP_XWAY(GPIO22, GPIO, SPI, NONE, EBU),
441 MFP_XWAY(GPIO23, GPIO, EBU, PCI, STP),
442 MFP_XWAY(GPIO24, GPIO, EBU, TDM, PCI),
443 MFP_XWAY(GPIO25, GPIO, TDM, SDIO, ASC),
444 MFP_XWAY(GPIO26, GPIO, EBU, TDM, SDIO),
445 MFP_XWAY(GPIO27, GPIO, TDM, SDIO, ASC),
446 MFP_XWAY(GPIO28, GPIO, GPT, NONE, SDIO),
447 MFP_XWAY(GPIO29, GPIO, PCI, CBUS, NONE),
448 MFP_XWAY(GPIO30, GPIO, PCI, CBUS, NONE),
449 MFP_XWAY(GPIO31, GPIO, EBU, PCI, NONE),
450 MFP_XWAY(GPIO32, GPIO, MII, NONE, EBU),
451 MFP_XWAY(GPIO33, GPIO, MII, NONE, EBU),
452 MFP_XWAY(GPIO34, GPIO, SIN, SSI, NONE),
453 MFP_XWAY(GPIO35, GPIO, SIN, SSI, NONE),
454 MFP_XWAY(GPIO36, GPIO, SIN, SSI, NONE),
455 MFP_XWAY(GPIO37, GPIO, PCI, NONE, NONE),
456 MFP_XWAY(GPIO38, GPIO, PCI, NONE, NONE),
457 MFP_XWAY(GPIO39, GPIO, NONE, EXIN, NONE),
458 MFP_XWAY(GPIO40, GPIO, MII, TDM, NONE),
459 MFP_XWAY(GPIO41, GPIO, MII, TDM, NONE),
460 MFP_XWAY(GPIO42, GPIO, MDIO, NONE, NONE),
461 MFP_XWAY(GPIO43, GPIO, MDIO, NONE, NONE),
462 MFP_XWAY(GPIO44, GPIO, MII, SIN, NONE),
463 MFP_XWAY(GPIO45, GPIO, MII, NONE, SIN),
464 MFP_XWAY(GPIO46, GPIO, MII, NONE, EXIN),
465 MFP_XWAY(GPIO47, GPIO, MII, NONE, SIN),
466 MFP_XWAY(GPIO48, GPIO, EBU, NONE, NONE),
467 MFP_XWAY(GPIO49, GPIO, EBU, NONE, NONE),
468 MFP_XWAY(GPIO50, GPIO, NONE, NONE, NONE),
469 MFP_XWAY(GPIO51, GPIO, NONE, NONE, NONE),
470 MFP_XWAY(GPIO52, GPIO, NONE, NONE, NONE),
471 MFP_XWAY(GPIO53, GPIO, NONE, NONE, NONE),
472 MFP_XWAY(GPIO54, GPIO, NONE, NONE, NONE),
473 MFP_XWAY(GPIO55, GPIO, NONE, NONE, NONE),
581 GRP_MUX("mdio", MDIO, xrx100_pins_mdio),
609 static const char * const xrx100_mdio_grps[] = {"mdio"};
622 {"mdio", ARRAY_AND_SIZE(xrx100_mdio_grps)},
626 /* --------- xrx200 related code --------- */
631 MFP_XWAY(GPIO0, GPIO, EXIN, SDIO, TDM),
632 MFP_XWAY(GPIO1, GPIO, EXIN, CBUS, SIN),
633 MFP_XWAY(GPIO2, GPIO, CGU, EXIN, GPHY),
634 MFP_XWAY(GPIO3, GPIO, CGU, SDIO, PCI),
635 MFP_XWAY(GPIO4, GPIO, STP, DFE, USIF),
636 MFP_XWAY(GPIO5, GPIO, STP, GPHY, DFE),
637 MFP_XWAY(GPIO6, GPIO, STP, GPT, USIF),
638 MFP_XWAY(GPIO7, GPIO, CGU, CBUS, GPHY),
639 MFP_XWAY(GPIO8, GPIO, CGU, NMI, NONE),
640 MFP_XWAY(GPIO9, GPIO, USIF, SPI, EXIN),
641 MFP_XWAY(GPIO10, GPIO, USIF, SPI, EXIN),
642 MFP_XWAY(GPIO11, GPIO, USIF, CBUS, SPI),
643 MFP_XWAY(GPIO12, GPIO, USIF, CBUS, MCD),
644 MFP_XWAY(GPIO13, GPIO, EBU, SPI, NONE),
645 MFP_XWAY(GPIO14, GPIO, CGU, CBUS, USIF),
646 MFP_XWAY(GPIO15, GPIO, SPI, SDIO, MCD),
647 MFP_XWAY(GPIO16, GPIO, SPI, SDIO, NONE),
648 MFP_XWAY(GPIO17, GPIO, SPI, SDIO, NONE),
649 MFP_XWAY(GPIO18, GPIO, SPI, SDIO, NONE),
650 MFP_XWAY(GPIO19, GPIO, PCI, SDIO, CGU),
651 MFP_XWAY(GPIO20, GPIO, NONE, SDIO, EBU),
652 MFP_XWAY(GPIO21, GPIO, PCI, EBU, GPT),
653 MFP_XWAY(GPIO22, GPIO, SPI, CGU, EBU),
654 MFP_XWAY(GPIO23, GPIO, EBU, PCI, STP),
655 MFP_XWAY(GPIO24, GPIO, EBU, TDM, PCI),
656 MFP_XWAY(GPIO25, GPIO, TDM, SDIO, USIF),
657 MFP_XWAY(GPIO26, GPIO, EBU, TDM, SDIO),
658 MFP_XWAY(GPIO27, GPIO, TDM, SDIO, USIF),
659 MFP_XWAY(GPIO28, GPIO, GPT, PCI, SDIO),
660 MFP_XWAY(GPIO29, GPIO, PCI, CBUS, EXIN),
661 MFP_XWAY(GPIO30, GPIO, PCI, CBUS, NONE),
662 MFP_XWAY(GPIO31, GPIO, EBU, PCI, NONE),
663 MFP_XWAY(GPIO32, GPIO, MII, NONE, EBU),
664 MFP_XWAY(GPIO33, GPIO, MII, NONE, EBU),
665 MFP_XWAY(GPIO34, GPIO, SIN, SSI, NONE),
666 MFP_XWAY(GPIO35, GPIO, SIN, SSI, NONE),
667 MFP_XWAY(GPIO36, GPIO, SIN, SSI, EXIN),
668 MFP_XWAY(GPIO37, GPIO, USIF, NONE, PCI),
669 MFP_XWAY(GPIO38, GPIO, PCI, USIF, NONE),
670 MFP_XWAY(GPIO39, GPIO, USIF, EXIN, NONE),
671 MFP_XWAY(GPIO40, GPIO, MII, TDM, NONE),
672 MFP_XWAY(GPIO41, GPIO, MII, TDM, NONE),
673 MFP_XWAY(GPIO42, GPIO, MDIO, NONE, NONE),
674 MFP_XWAY(GPIO43, GPIO, MDIO, NONE, NONE),
675 MFP_XWAY(GPIO44, GPIO, MII, SIN, GPHY),
676 MFP_XWAY(GPIO45, GPIO, MII, GPHY, SIN),
677 MFP_XWAY(GPIO46, GPIO, MII, NONE, EXIN),
678 MFP_XWAY(GPIO47, GPIO, MII, GPHY, SIN),
679 MFP_XWAY(GPIO48, GPIO, EBU, NONE, NONE),
680 MFP_XWAY(GPIO49, GPIO, EBU, NONE, NONE),
821 GRP_MUX("mdio", MDIO, xrx200_pins_mdio),
861 static const char * const xrx200_mdio_grps[] = {"mdio"};
877 {"mdio", ARRAY_AND_SIZE(xrx200_mdio_grps)},
882 /* --------- xrx300 related code --------- */
887 MFP_XWAY(GPIO0, GPIO, EXIN, EPHY, NONE),
888 MFP_XWAY(GPIO1, GPIO, NONE, EXIN, NONE),
890 MFP_XWAY(GPIO3, GPIO, CGU, NONE, NONE),
891 MFP_XWAY(GPIO4, GPIO, STP, DFE, NONE),
892 MFP_XWAY(GPIO5, GPIO, STP, EPHY, DFE),
893 MFP_XWAY(GPIO6, GPIO, STP, NONE, NONE),
895 MFP_XWAY(GPIO8, GPIO, CGU, GPHY, EPHY),
896 MFP_XWAY(GPIO9, GPIO, WIFI, NONE, EXIN),
897 MFP_XWAY(GPIO10, GPIO, USIF, SPI, EXIN),
898 MFP_XWAY(GPIO11, GPIO, USIF, WIFI, SPI),
900 MFP_XWAY(GPIO13, GPIO, EBU, NONE, NONE),
901 MFP_XWAY(GPIO14, GPIO, CGU, USIF, EPHY),
902 MFP_XWAY(GPIO15, GPIO, SPI, NONE, MCD),
903 MFP_XWAY(GPIO16, GPIO, SPI, EXIN, NONE),
904 MFP_XWAY(GPIO17, GPIO, SPI, NONE, NONE),
905 MFP_XWAY(GPIO18, GPIO, SPI, NONE, NONE),
906 MFP_XWAY(GPIO19, GPIO, USIF, NONE, EPHY),
910 MFP_XWAY(GPIO23, GPIO, EBU, NONE, NONE),
911 MFP_XWAY(GPIO24, GPIO, EBU, NONE, NONE),
912 MFP_XWAY(GPIO25, GPIO, TDM, NONE, NONE),
913 MFP_XWAY(GPIO26, GPIO, TDM, NONE, NONE),
914 MFP_XWAY(GPIO27, GPIO, TDM, NONE, NONE),
921 MFP_XWAY(GPIO34, GPIO, NONE, SSI, NONE),
922 MFP_XWAY(GPIO35, GPIO, NONE, SSI, NONE),
923 MFP_XWAY(GPIO36, GPIO, NONE, SSI, NONE),
929 MFP_XWAY(GPIO42, GPIO, MDIO, NONE, NONE),
930 MFP_XWAY(GPIO43, GPIO, MDIO, NONE, NONE),
935 MFP_XWAY(GPIO48, GPIO, EBU, NONE, NONE),
936 MFP_XWAY(GPIO49, GPIO, EBU, NONE, NONE),
937 MFP_XWAY(GPIO50, GPIO, EBU, NONE, NONE),
938 MFP_XWAY(GPIO51, GPIO, EBU, NONE, NONE),
939 MFP_XWAY(GPIO52, GPIO, EBU, NONE, NONE),
940 MFP_XWAY(GPIO53, GPIO, EBU, NONE, NONE),
941 MFP_XWAY(GPIO54, GPIO, EBU, NONE, NONE),
942 MFP_XWAY(GPIO55, GPIO, EBU, NONE, NONE),
943 MFP_XWAY(GPIO56, GPIO, EBU, NONE, NONE),
944 MFP_XWAY(GPIO57, GPIO, EBU, NONE, NONE),
945 MFP_XWAY(GPIO58, GPIO, EBU, TDM, NONE),
946 MFP_XWAY(GPIO59, GPIO, EBU, NONE, NONE),
947 MFP_XWAY(GPIO60, GPIO, EBU, NONE, NONE),
948 MFP_XWAY(GPIO61, GPIO, EBU, NONE, NONE),
1050 GRP_MUX("mdio", MDIO, xrx300_pins_mdio),
1078 static const char * const xrx300_mdio_grps[] = {"mdio"};
1090 {"mdio", ARRAY_AND_SIZE(xrx300_mdio_grps)},
1095 /* --------- pinconf related code --------- */
1112 !gpio_getbit(info->membase[0], reg, PORT_PIN(pin))); in xway_pinconf_get()
1120 if (!gpio_getbit(info->membase[0], reg, PORT_PIN(pin))) { in xway_pinconf_get()
1129 if (!gpio_getbit(info->membase[0], reg, PORT_PIN(pin))) in xway_pinconf_get()
1138 gpio_getbit(info->membase[0], reg, PORT_PIN(pin))); in xway_pinconf_get()
1141 dev_err(pctldev->dev, "Invalid config param %04x\n", param); in xway_pinconf_get()
1142 return -ENOTSUPP; in xway_pinconf_get()
1170 gpio_setbit(info->membase[0], in xway_pinconf_set()
1174 gpio_clearbit(info->membase[0], in xway_pinconf_set()
1185 gpio_clearbit(info->membase[0], in xway_pinconf_set()
1190 gpio_setbit(info->membase[0], reg, PORT_PIN(pin)); in xway_pinconf_set()
1197 gpio_clearbit(info->membase[0], in xway_pinconf_set()
1201 gpio_setbit(info->membase[0], in xway_pinconf_set()
1205 dev_err(pctldev->dev, in xway_pinconf_set()
1212 gpio_clearbit(info->membase[0], in xway_pinconf_set()
1216 gpio_setbit(info->membase[0], in xway_pinconf_set()
1222 dev_err(pctldev->dev, in xway_pinconf_set()
1224 return -ENOTSUPP; in xway_pinconf_set()
1239 for (i = 0; i < info->grps[selector].npins && !ret; i++) in xway_pinconf_group_set()
1241 info->grps[selector].pins[i], in xway_pinconf_group_set()
1270 gpio_setbit(info->membase[0], GPIO_ALT0(pin), PORT_PIN(pin)); in xway_mux_apply()
1272 gpio_clearbit(info->membase[0], GPIO_ALT0(pin), PORT_PIN(pin)); in xway_mux_apply()
1275 gpio_setbit(info->membase[0], alt1_reg, PORT_PIN(pin)); in xway_mux_apply()
1277 gpio_clearbit(info->membase[0], alt1_reg, PORT_PIN(pin)); in xway_mux_apply()
1284 {"lantiq,open-drain", LTQ_PINCONF_PARAM_OPEN_DRAIN},
1295 /* --------- gpio_chip related code --------- */
1298 struct ltq_pinmux_info *info = dev_get_drvdata(chip->parent); in xway_gpio_set()
1301 gpio_setbit(info->membase[0], GPIO_OUT(pin), PORT_PIN(pin)); in xway_gpio_set()
1303 gpio_clearbit(info->membase[0], GPIO_OUT(pin), PORT_PIN(pin)); in xway_gpio_set()
1308 struct ltq_pinmux_info *info = dev_get_drvdata(chip->parent); in xway_gpio_get()
1310 return !!gpio_getbit(info->membase[0], GPIO_IN(pin), PORT_PIN(pin)); in xway_gpio_get()
1315 struct ltq_pinmux_info *info = dev_get_drvdata(chip->parent); in xway_gpio_dir_in()
1317 gpio_clearbit(info->membase[0], GPIO_DIR(pin), PORT_PIN(pin)); in xway_gpio_dir_in()
1324 struct ltq_pinmux_info *info = dev_get_drvdata(chip->parent); in xway_gpio_dir_out()
1327 gpio_setbit(info->membase[0], GPIO3_OD, PORT_PIN(pin)); in xway_gpio_dir_out()
1329 gpio_setbit(info->membase[0], GPIO_OD(pin), PORT_PIN(pin)); in xway_gpio_dir_out()
1330 gpio_setbit(info->membase[0], GPIO_DIR(pin), PORT_PIN(pin)); in xway_gpio_dir_out()
1338 * Returns the mapped IRQ (external interrupt) number for a given GPIO pin.
1342 struct ltq_pinmux_info *info = dev_get_drvdata(chip->parent); in xway_gpio_to_irq()
1345 for (i = 0; i < info->num_exin; i++) in xway_gpio_to_irq()
1346 if (info->exin[i] == offset) in xway_gpio_to_irq()
1349 return -1; in xway_gpio_to_irq()
1353 .label = "gpio-xway",
1361 .base = -1,
1365 /* --------- register the pinctrl layer --------- */
1438 .name = "XWAY GPIO",
1443 { .compatible = "lantiq,ase-pinctrl", .data = &ase_pinctrl},
1444 { .compatible = "lantiq,danube-pinctrl", .data = &danube_pinctrl},
1445 { .compatible = "lantiq,xrx100-pinctrl", .data = &xrx100_pinctrl},
1446 { .compatible = "lantiq,xrx200-pinctrl", .data = &xrx200_pinctrl},
1447 { .compatible = "lantiq,xrx300-pinctrl", .data = &xrx300_pinctrl},
1462 xway_soc = device_get_match_data(&pdev->dev); in pinmux_xway_probe()
1467 xway_chip.ngpio = xway_soc->pin_count; in pinmux_xway_probe()
1470 xway_info.pads = devm_kcalloc(&pdev->dev, in pinmux_xway_probe()
1474 return -ENOMEM; in pinmux_xway_probe()
1477 char *name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "io%d", i); in pinmux_xway_probe()
1480 return -ENOMEM; in pinmux_xway_probe()
1488 xway_pctrl_desc.name = dev_name(&pdev->dev); in pinmux_xway_probe()
1493 xway_info.mfp = xway_soc->mfp; in pinmux_xway_probe()
1494 xway_info.grps = xway_soc->grps; in pinmux_xway_probe()
1495 xway_info.num_grps = xway_soc->num_grps; in pinmux_xway_probe()
1496 xway_info.funcs = xway_soc->funcs; in pinmux_xway_probe()
1497 xway_info.num_funcs = xway_soc->num_funcs; in pinmux_xway_probe()
1498 xway_info.exin = xway_soc->exin; in pinmux_xway_probe()
1499 xway_info.num_exin = xway_soc->num_exin; in pinmux_xway_probe()
1504 dev_err(&pdev->dev, "Failed to register pinctrl driver\n"); in pinmux_xway_probe()
1508 /* register the gpio chip */ in pinmux_xway_probe()
1509 xway_chip.parent = &pdev->dev; in pinmux_xway_probe()
1511 ret = devm_gpiochip_add_data(&pdev->dev, &xway_chip, NULL); in pinmux_xway_probe()
1513 dev_err(&pdev->dev, "Failed to register gpio chip\n"); in pinmux_xway_probe()
1518 * For DeviceTree-supported systems, the gpio core checks the in pinmux_xway_probe()
1519 * pinctrl's device node for the "gpio-ranges" property. in pinmux_xway_probe()
1524 * files which don't set the "gpio-ranges" property or systems that in pinmux_xway_probe()
1527 if (!of_property_read_bool(pdev->dev.of_node, "gpio-ranges")) { in pinmux_xway_probe()
1528 /* finish with registering the gpio range in pinctrl */ in pinmux_xway_probe()
1534 dev_info(&pdev->dev, "Init done\n"); in pinmux_xway_probe()
1541 .name = "pinctrl-xway",