Lines Matching refs:pctldev

39 	struct pinctrl_dev *pctldev;  member
45 static int uniphier_pctl_get_groups_count(struct pinctrl_dev *pctldev) in uniphier_pctl_get_groups_count() argument
47 struct uniphier_pinctrl_priv *priv = pinctrl_dev_get_drvdata(pctldev); in uniphier_pctl_get_groups_count()
52 static const char *uniphier_pctl_get_group_name(struct pinctrl_dev *pctldev, in uniphier_pctl_get_group_name() argument
55 struct uniphier_pinctrl_priv *priv = pinctrl_dev_get_drvdata(pctldev); in uniphier_pctl_get_group_name()
60 static int uniphier_pctl_get_group_pins(struct pinctrl_dev *pctldev, in uniphier_pctl_get_group_pins() argument
65 struct uniphier_pinctrl_priv *priv = pinctrl_dev_get_drvdata(pctldev); in uniphier_pctl_get_group_pins()
74 static void uniphier_pctl_pin_dbg_show(struct pinctrl_dev *pctldev, in uniphier_pctl_pin_dbg_show() argument
77 const struct pin_desc *desc = pin_desc_get(pctldev, offset); in uniphier_pctl_pin_dbg_show()
149 static int uniphier_conf_get_drvctrl_data(struct pinctrl_dev *pctldev, in uniphier_conf_get_drvctrl_data() argument
155 const struct pin_desc *desc = pin_desc_get(pctldev, pin); in uniphier_conf_get_drvctrl_data()
206 static int uniphier_conf_pin_bias_get(struct pinctrl_dev *pctldev, in uniphier_conf_pin_bias_get() argument
210 struct uniphier_pinctrl_priv *priv = pinctrl_dev_get_drvdata(pctldev); in uniphier_conf_pin_bias_get()
211 const struct pin_desc *desc = pin_desc_get(pctldev, pin); in uniphier_conf_pin_bias_get()
257 static int uniphier_conf_pin_drive_get(struct pinctrl_dev *pctldev, in uniphier_conf_pin_drive_get() argument
260 struct uniphier_pinctrl_priv *priv = pinctrl_dev_get_drvdata(pctldev); in uniphier_conf_pin_drive_get()
265 ret = uniphier_conf_get_drvctrl_data(pctldev, pin, &reg, &shift, in uniphier_conf_pin_drive_get()
283 static int uniphier_conf_pin_input_enable_get(struct pinctrl_dev *pctldev, in uniphier_conf_pin_input_enable_get() argument
286 struct uniphier_pinctrl_priv *priv = pinctrl_dev_get_drvdata(pctldev); in uniphier_conf_pin_input_enable_get()
287 const struct pin_desc *desc = pin_desc_get(pctldev, pin); in uniphier_conf_pin_input_enable_get()
309 static int uniphier_conf_pin_config_get(struct pinctrl_dev *pctldev, in uniphier_conf_pin_config_get() argument
322 ret = uniphier_conf_pin_bias_get(pctldev, pin, param); in uniphier_conf_pin_config_get()
325 ret = uniphier_conf_pin_drive_get(pctldev, pin, &arg); in uniphier_conf_pin_config_get()
329 ret = uniphier_conf_pin_input_enable_get(pctldev, pin); in uniphier_conf_pin_config_get()
343 static int uniphier_conf_pin_bias_set(struct pinctrl_dev *pctldev, in uniphier_conf_pin_bias_set() argument
347 struct uniphier_pinctrl_priv *priv = pinctrl_dev_get_drvdata(pctldev); in uniphier_conf_pin_bias_set()
348 const struct pin_desc *desc = pin_desc_get(pctldev, pin); in uniphier_conf_pin_bias_set()
360 dev_err(pctldev->dev, in uniphier_conf_pin_bias_set()
371 dev_err(pctldev->dev, in uniphier_conf_pin_bias_set()
377 dev_err(pctldev->dev, "pull-up can not be total\n"); in uniphier_conf_pin_bias_set()
385 dev_err(pctldev->dev, in uniphier_conf_pin_bias_set()
391 dev_err(pctldev->dev, "pull-down can not be total\n"); in uniphier_conf_pin_bias_set()
397 dev_err(pctldev->dev, in uniphier_conf_pin_bias_set()
418 static int uniphier_conf_pin_drive_set(struct pinctrl_dev *pctldev, in uniphier_conf_pin_drive_set() argument
421 struct uniphier_pinctrl_priv *priv = pinctrl_dev_get_drvdata(pctldev); in uniphier_conf_pin_drive_set()
422 const struct pin_desc *desc = pin_desc_get(pctldev, pin); in uniphier_conf_pin_drive_set()
427 ret = uniphier_conf_get_drvctrl_data(pctldev, pin, &reg, &shift, in uniphier_conf_pin_drive_set()
430 dev_err(pctldev->dev, "cannot set drive strength for pin %s\n", in uniphier_conf_pin_drive_set()
441 dev_err(pctldev->dev, in uniphier_conf_pin_drive_set()
456 static int uniphier_conf_pin_input_enable(struct pinctrl_dev *pctldev, in uniphier_conf_pin_input_enable() argument
459 struct uniphier_pinctrl_priv *priv = pinctrl_dev_get_drvdata(pctldev); in uniphier_conf_pin_input_enable()
460 const struct pin_desc *desc = pin_desc_get(pctldev, pin); in uniphier_conf_pin_input_enable()
485 static int uniphier_conf_pin_config_set(struct pinctrl_dev *pctldev, in uniphier_conf_pin_config_set() argument
502 ret = uniphier_conf_pin_bias_set(pctldev, pin, in uniphier_conf_pin_config_set()
506 ret = uniphier_conf_pin_drive_set(pctldev, pin, arg); in uniphier_conf_pin_config_set()
509 ret = uniphier_conf_pin_input_enable(pctldev, pin, arg); in uniphier_conf_pin_config_set()
512 dev_err(pctldev->dev, in uniphier_conf_pin_config_set()
525 static int uniphier_conf_pin_config_group_set(struct pinctrl_dev *pctldev, in uniphier_conf_pin_config_group_set() argument
530 struct uniphier_pinctrl_priv *priv = pinctrl_dev_get_drvdata(pctldev); in uniphier_conf_pin_config_group_set()
536 ret = uniphier_conf_pin_config_set(pctldev, pins[i], in uniphier_conf_pin_config_group_set()
552 static int uniphier_pmx_get_functions_count(struct pinctrl_dev *pctldev) in uniphier_pmx_get_functions_count() argument
554 struct uniphier_pinctrl_priv *priv = pinctrl_dev_get_drvdata(pctldev); in uniphier_pmx_get_functions_count()
559 static const char *uniphier_pmx_get_function_name(struct pinctrl_dev *pctldev, in uniphier_pmx_get_function_name() argument
562 struct uniphier_pinctrl_priv *priv = pinctrl_dev_get_drvdata(pctldev); in uniphier_pmx_get_function_name()
567 static int uniphier_pmx_get_function_groups(struct pinctrl_dev *pctldev, in uniphier_pmx_get_function_groups() argument
572 struct uniphier_pinctrl_priv *priv = pinctrl_dev_get_drvdata(pctldev); in uniphier_pmx_get_function_groups()
580 static int uniphier_pmx_set_one_mux(struct pinctrl_dev *pctldev, unsigned pin, in uniphier_pmx_set_one_mux() argument
583 struct uniphier_pinctrl_priv *priv = pinctrl_dev_get_drvdata(pctldev); in uniphier_pmx_set_one_mux()
589 ret = uniphier_conf_pin_input_enable(pctldev, pin, 1); in uniphier_pmx_set_one_mux()
643 static int uniphier_pmx_set_mux(struct pinctrl_dev *pctldev, in uniphier_pmx_set_mux() argument
647 struct uniphier_pinctrl_priv *priv = pinctrl_dev_get_drvdata(pctldev); in uniphier_pmx_set_mux()
654 ret = uniphier_pmx_set_one_mux(pctldev, grp->pins[i], in uniphier_pmx_set_mux()
663 static int uniphier_pmx_gpio_request_enable(struct pinctrl_dev *pctldev, in uniphier_pmx_gpio_request_enable() argument
667 struct uniphier_pinctrl_priv *priv = pinctrl_dev_get_drvdata(pctldev); in uniphier_pmx_gpio_request_enable()
688 return uniphier_pmx_set_one_mux(pctldev, offset, muxval); in uniphier_pmx_gpio_request_enable()
905 priv->pctldev = devm_pinctrl_register(dev, &priv->pctldesc, priv); in uniphier_pinctrl_probe()
906 if (IS_ERR(priv->pctldev)) { in uniphier_pinctrl_probe()
908 return PTR_ERR(priv->pctldev); in uniphier_pinctrl_probe()