Lines Matching refs:pmx
1958 struct gemini_pmx *pmx = pinctrl_dev_get_drvdata(pctldev); in gemini_get_groups_count() local
1960 if (pmx->is_3512) in gemini_get_groups_count()
1962 if (pmx->is_3516) in gemini_get_groups_count()
1970 struct gemini_pmx *pmx = pinctrl_dev_get_drvdata(pctldev); in gemini_get_group_name() local
1972 if (pmx->is_3512) in gemini_get_group_name()
1974 if (pmx->is_3516) in gemini_get_group_name()
1984 struct gemini_pmx *pmx = pinctrl_dev_get_drvdata(pctldev); in gemini_get_group_pins() local
1987 if (pmx->flash_pin && in gemini_get_group_pins()
1988 pmx->is_3512 && in gemini_get_group_pins()
1994 if (pmx->flash_pin && in gemini_get_group_pins()
1995 pmx->is_3516 && in gemini_get_group_pins()
2001 if (pmx->is_3512) { in gemini_get_group_pins()
2005 if (pmx->is_3516) { in gemini_get_group_pins()
2191 struct gemini_pmx *pmx; in gemini_pmx_set_mux() local
2198 pmx = pinctrl_dev_get_drvdata(pctldev); in gemini_pmx_set_mux()
2201 if (pmx->is_3512) in gemini_pmx_set_mux()
2203 else if (pmx->is_3516) in gemini_pmx_set_mux()
2206 dev_err(pmx->dev, "invalid SoC type\n"); in gemini_pmx_set_mux()
2210 dev_dbg(pmx->dev, in gemini_pmx_set_mux()
2214 regmap_read(pmx->map, GLOBAL_MISC_CTRL, &before); in gemini_pmx_set_mux()
2215 regmap_update_bits(pmx->map, GLOBAL_MISC_CTRL, in gemini_pmx_set_mux()
2218 regmap_read(pmx->map, GLOBAL_MISC_CTRL, &after); in gemini_pmx_set_mux()
2234 dev_err(pmx->dev, in gemini_pmx_set_mux()
2239 dev_err(pmx->dev, in gemini_pmx_set_mux()
2243 dev_dbg(pmx->dev, in gemini_pmx_set_mux()
2256 dev_err(pmx->dev, in gemini_pmx_set_mux()
2261 dev_err(pmx->dev, in gemini_pmx_set_mux()
2265 dev_dbg(pmx->dev, in gemini_pmx_set_mux()
2363 static const struct gemini_pin_conf *gemini_get_pin_conf(struct gemini_pmx *pmx, in gemini_get_pin_conf() argument
2369 for (i = 0; i < pmx->nconfs; i++) { in gemini_get_pin_conf()
2370 retconf = &pmx->confs[i]; in gemini_get_pin_conf()
2380 struct gemini_pmx *pmx = pinctrl_dev_get_drvdata(pctldev); in gemini_pinconf_get() local
2387 conf = gemini_get_pin_conf(pmx, pin); in gemini_pinconf_get()
2390 regmap_read(pmx->map, conf->reg, &val); in gemini_pinconf_get()
2405 struct gemini_pmx *pmx = pinctrl_dev_get_drvdata(pctldev); in gemini_pinconf_set() local
2420 conf = gemini_get_pin_conf(pmx, pin); in gemini_pinconf_set()
2422 dev_err(pmx->dev, in gemini_pinconf_set()
2427 dev_dbg(pmx->dev, in gemini_pinconf_set()
2430 regmap_update_bits(pmx->map, conf->reg, conf->mask, arg); in gemini_pinconf_set()
2433 dev_err(pmx->dev, "Invalid config param %04x\n", param); in gemini_pinconf_set()
2446 struct gemini_pmx *pmx = pinctrl_dev_get_drvdata(pctldev); in gemini_pinconf_group_set() local
2453 if (pmx->is_3512) in gemini_pinconf_group_set()
2455 if (pmx->is_3516) in gemini_pinconf_group_set()
2460 dev_err(pmx->dev, "pin config group \"%s\" does " in gemini_pinconf_group_set()
2486 dev_err(pmx->dev, in gemini_pinconf_group_set()
2492 regmap_update_bits(pmx->map, GLOBAL_IODRIVE, in gemini_pinconf_group_set()
2495 dev_dbg(pmx->dev, in gemini_pinconf_group_set()
2500 dev_err(pmx->dev, "invalid config param %04x\n", param); in gemini_pinconf_group_set()
2525 struct gemini_pmx *pmx; in gemini_pmx_probe() local
2535 pmx = devm_kzalloc(&pdev->dev, sizeof(*pmx), GFP_KERNEL); in gemini_pmx_probe()
2536 if (!pmx) in gemini_pmx_probe()
2539 pmx->dev = &pdev->dev; in gemini_pmx_probe()
2550 pmx->map = map; in gemini_pmx_probe()
2561 pmx->is_3512 = true; in gemini_pmx_probe()
2562 pmx->confs = gemini_confs_3512; in gemini_pmx_probe()
2563 pmx->nconfs = ARRAY_SIZE(gemini_confs_3512); in gemini_pmx_probe()
2568 pmx->is_3516 = true; in gemini_pmx_probe()
2569 pmx->confs = gemini_confs_3516; in gemini_pmx_probe()
2570 pmx->nconfs = ARRAY_SIZE(gemini_confs_3516); in gemini_pmx_probe()
2594 pmx->flash_pin = !!(val & GLOBAL_STATUS_FLPIN); in gemini_pmx_probe()
2595 dev_info(dev, "flash pin is %s\n", pmx->flash_pin ? "set" : "not set"); in gemini_pmx_probe()
2597 pmx->pctl = devm_pinctrl_register(dev, &gemini_pmx_desc, pmx); in gemini_pmx_probe()
2598 if (IS_ERR(pmx->pctl)) { in gemini_pmx_probe()
2600 return PTR_ERR(pmx->pctl); in gemini_pmx_probe()