rza1_pctl 544 drivers/pinctrl/pinctrl-rza1.c struct rza1_pinctrl *rza1_pctl) rza1_pctl 547 drivers/pinctrl/pinctrl-rza1.c const struct rza1_pinmux_conf *pmx_conf = rza1_pctl->data; rza1_pctl 676 drivers/pinctrl/pinctrl-rza1.c static int rza1_pin_mux_single(struct rza1_pinctrl *rza1_pctl, rza1_pctl 679 drivers/pinctrl/pinctrl-rza1.c struct rza1_port *port = &rza1_pctl->ports[mux_conf->port]; rza1_pctl 689 drivers/pinctrl/pinctrl-rza1.c rza1_pctl); rza1_pctl 888 drivers/pinctrl/pinctrl-rza1.c static int rza1_parse_pinmux_node(struct rza1_pinctrl *rza1_pctl, rza1_pctl 893 drivers/pinctrl/pinctrl-rza1.c struct pinctrl_dev *pctldev = rza1_pctl->pctl; rza1_pctl 905 drivers/pinctrl/pinctrl-rza1.c dev_dbg(rza1_pctl->dev, "Missing %s property\n", prop_name); rza1_pctl 917 drivers/pinctrl/pinctrl-rza1.c dev_err(rza1_pctl->dev, rza1_pctl 960 drivers/pinctrl/pinctrl-rza1.c dev_err(rza1_pctl->dev, rza1_pctl 987 drivers/pinctrl/pinctrl-rza1.c struct rza1_pinctrl *rza1_pctl = pinctrl_dev_get_drvdata(pctldev); rza1_pctl 998 drivers/pinctrl/pinctrl-rza1.c dev_err(rza1_pctl->dev, "invalid pinmux node structure\n"); rza1_pctl 1008 drivers/pinctrl/pinctrl-rza1.c mux_confs = devm_kcalloc(rza1_pctl->dev, npins, sizeof(*mux_confs), rza1_pctl 1010 drivers/pinctrl/pinctrl-rza1.c grpins = devm_kcalloc(rza1_pctl->dev, npins, sizeof(*grpins), rza1_pctl 1012 drivers/pinctrl/pinctrl-rza1.c fngrps = devm_kzalloc(rza1_pctl->dev, sizeof(*fngrps), GFP_KERNEL); rza1_pctl 1025 drivers/pinctrl/pinctrl-rza1.c ret = rza1_parse_pinmux_node(rza1_pctl, np, mux_conf, grpin); rza1_pctl 1028 drivers/pinctrl/pinctrl-rza1.c ret = rza1_parse_pinmux_node(rza1_pctl, child, mux_conf, rza1_pctl 1045 drivers/pinctrl/pinctrl-rza1.c mutex_lock(&rza1_pctl->mutex); rza1_pctl 1049 drivers/pinctrl/pinctrl-rza1.c mutex_unlock(&rza1_pctl->mutex); rza1_pctl 1060 drivers/pinctrl/pinctrl-rza1.c dev_info(rza1_pctl->dev, "Parsed function and group %s with %d pins\n", rza1_pctl 1075 drivers/pinctrl/pinctrl-rza1.c mutex_unlock(&rza1_pctl->mutex); rza1_pctl 1084 drivers/pinctrl/pinctrl-rza1.c mutex_unlock(&rza1_pctl->mutex); rza1_pctl 1086 drivers/pinctrl/pinctrl-rza1.c dev_info(rza1_pctl->dev, "Unable to parse function and group %s\n", rza1_pctl 1120 drivers/pinctrl/pinctrl-rza1.c struct rza1_pinctrl *rza1_pctl = pinctrl_dev_get_drvdata(pctldev); rza1_pctl 1138 drivers/pinctrl/pinctrl-rza1.c ret = rza1_pin_mux_single(rza1_pctl, &mux_confs[i]); rza1_pctl 1184 drivers/pinctrl/pinctrl-rza1.c static int rza1_parse_gpiochip(struct rza1_pinctrl *rza1_pctl, rza1_pctl 1197 drivers/pinctrl/pinctrl-rza1.c dev_err(rza1_pctl->dev, "Unable to parse %s list property\n", rza1_pctl 1209 drivers/pinctrl/pinctrl-rza1.c dev_err(rza1_pctl->dev, rza1_pctl 1216 drivers/pinctrl/pinctrl-rza1.c chip->label = devm_kasprintf(rza1_pctl->dev, GFP_KERNEL, "%pOFn", rza1_pctl 1223 drivers/pinctrl/pinctrl-rza1.c chip->parent = rza1_pctl->dev; rza1_pctl 1231 drivers/pinctrl/pinctrl-rza1.c ret = devm_gpiochip_add_data(rza1_pctl->dev, chip, rza1_pctl 1232 drivers/pinctrl/pinctrl-rza1.c &rza1_pctl->ports[gpioport]); rza1_pctl 1236 drivers/pinctrl/pinctrl-rza1.c pinctrl_add_gpio_range(rza1_pctl->pctl, range); rza1_pctl 1238 drivers/pinctrl/pinctrl-rza1.c dev_info(rza1_pctl->dev, "Parsed gpiochip %s with %d pins\n", rza1_pctl 1249 drivers/pinctrl/pinctrl-rza1.c static int rza1_gpio_register(struct rza1_pinctrl *rza1_pctl) rza1_pctl 1251 drivers/pinctrl/pinctrl-rza1.c struct device_node *np = rza1_pctl->dev->of_node; rza1_pctl 1261 drivers/pinctrl/pinctrl-rza1.c dev_dbg(rza1_pctl->dev, "No gpiochip registered\n"); rza1_pctl 1265 drivers/pinctrl/pinctrl-rza1.c gpio_chips = devm_kcalloc(rza1_pctl->dev, ngpiochips, rza1_pctl 1267 drivers/pinctrl/pinctrl-rza1.c gpio_ranges = devm_kcalloc(rza1_pctl->dev, ngpiochips, rza1_pctl 1277 drivers/pinctrl/pinctrl-rza1.c ret = rza1_parse_gpiochip(rza1_pctl, child, &gpio_chips[i], rza1_pctl 1287 drivers/pinctrl/pinctrl-rza1.c dev_info(rza1_pctl->dev, "Registered %u gpio controllers\n", i); rza1_pctl 1298 drivers/pinctrl/pinctrl-rza1.c static int rza1_pinctrl_register(struct rza1_pinctrl *rza1_pctl) rza1_pctl 1305 drivers/pinctrl/pinctrl-rza1.c pins = devm_kcalloc(rza1_pctl->dev, RZA1_NPINS, sizeof(*pins), rza1_pctl 1307 drivers/pinctrl/pinctrl-rza1.c ports = devm_kcalloc(rza1_pctl->dev, RZA1_NPORTS, sizeof(*ports), rza1_pctl 1312 drivers/pinctrl/pinctrl-rza1.c rza1_pctl->pins = pins; rza1_pctl 1313 drivers/pinctrl/pinctrl-rza1.c rza1_pctl->desc.pins = pins; rza1_pctl 1314 drivers/pinctrl/pinctrl-rza1.c rza1_pctl->desc.npins = RZA1_NPINS; rza1_pctl 1315 drivers/pinctrl/pinctrl-rza1.c rza1_pctl->ports = ports; rza1_pctl 1322 drivers/pinctrl/pinctrl-rza1.c pins[i].name = devm_kasprintf(rza1_pctl->dev, GFP_KERNEL, rza1_pctl 1335 drivers/pinctrl/pinctrl-rza1.c ports[port_id].base = rza1_pctl->base; rza1_pctl 1341 drivers/pinctrl/pinctrl-rza1.c ret = devm_pinctrl_register_and_init(rza1_pctl->dev, &rza1_pctl->desc, rza1_pctl 1342 drivers/pinctrl/pinctrl-rza1.c rza1_pctl, &rza1_pctl->pctl); rza1_pctl 1344 drivers/pinctrl/pinctrl-rza1.c dev_err(rza1_pctl->dev, rza1_pctl 1349 drivers/pinctrl/pinctrl-rza1.c ret = pinctrl_enable(rza1_pctl->pctl); rza1_pctl 1351 drivers/pinctrl/pinctrl-rza1.c dev_err(rza1_pctl->dev, rza1_pctl 1356 drivers/pinctrl/pinctrl-rza1.c ret = rza1_gpio_register(rza1_pctl); rza1_pctl 1358 drivers/pinctrl/pinctrl-rza1.c dev_err(rza1_pctl->dev, "RZ/A1 GPIO registration failed\n"); rza1_pctl 1367 drivers/pinctrl/pinctrl-rza1.c struct rza1_pinctrl *rza1_pctl; rza1_pctl 1370 drivers/pinctrl/pinctrl-rza1.c rza1_pctl = devm_kzalloc(&pdev->dev, sizeof(*rza1_pctl), GFP_KERNEL); rza1_pctl 1371 drivers/pinctrl/pinctrl-rza1.c if (!rza1_pctl) rza1_pctl 1374 drivers/pinctrl/pinctrl-rza1.c rza1_pctl->dev = &pdev->dev; rza1_pctl 1376 drivers/pinctrl/pinctrl-rza1.c rza1_pctl->base = devm_platform_ioremap_resource(pdev, 0); rza1_pctl 1377 drivers/pinctrl/pinctrl-rza1.c if (IS_ERR(rza1_pctl->base)) rza1_pctl 1378 drivers/pinctrl/pinctrl-rza1.c return PTR_ERR(rza1_pctl->base); rza1_pctl 1380 drivers/pinctrl/pinctrl-rza1.c mutex_init(&rza1_pctl->mutex); rza1_pctl 1382 drivers/pinctrl/pinctrl-rza1.c platform_set_drvdata(pdev, rza1_pctl); rza1_pctl 1384 drivers/pinctrl/pinctrl-rza1.c rza1_pctl->desc.name = DRIVER_NAME; rza1_pctl 1385 drivers/pinctrl/pinctrl-rza1.c rza1_pctl->desc.pctlops = &rza1_pinctrl_ops; rza1_pctl 1386 drivers/pinctrl/pinctrl-rza1.c rza1_pctl->desc.pmxops = &rza1_pinmux_ops; rza1_pctl 1387 drivers/pinctrl/pinctrl-rza1.c rza1_pctl->desc.owner = THIS_MODULE; rza1_pctl 1388 drivers/pinctrl/pinctrl-rza1.c rza1_pctl->data = of_device_get_match_data(&pdev->dev); rza1_pctl 1390 drivers/pinctrl/pinctrl-rza1.c ret = rza1_pinctrl_register(rza1_pctl);