Lines Matching refs:pctldev
449 static unsigned int atmel_pin_config_read(struct pinctrl_dev *pctldev, in atmel_pin_config_read() argument
452 struct atmel_pioctrl *atmel_pioctrl = pinctrl_dev_get_drvdata(pctldev); in atmel_pin_config_read()
465 static void atmel_pin_config_write(struct pinctrl_dev *pctldev, in atmel_pin_config_write() argument
468 struct atmel_pioctrl *atmel_pioctrl = pinctrl_dev_get_drvdata(pctldev); in atmel_pin_config_write()
480 static int atmel_pctl_get_groups_count(struct pinctrl_dev *pctldev) in atmel_pctl_get_groups_count() argument
482 struct atmel_pioctrl *atmel_pioctrl = pinctrl_dev_get_drvdata(pctldev); in atmel_pctl_get_groups_count()
487 static const char *atmel_pctl_get_group_name(struct pinctrl_dev *pctldev, in atmel_pctl_get_group_name() argument
490 struct atmel_pioctrl *atmel_pioctrl = pinctrl_dev_get_drvdata(pctldev); in atmel_pctl_get_group_name()
495 static int atmel_pctl_get_group_pins(struct pinctrl_dev *pctldev, in atmel_pctl_get_group_pins() argument
500 struct atmel_pioctrl *atmel_pioctrl = pinctrl_dev_get_drvdata(pctldev); in atmel_pctl_get_group_pins()
509 atmel_pctl_find_group_by_pin(struct pinctrl_dev *pctldev, unsigned int pin) in atmel_pctl_find_group_by_pin() argument
511 struct atmel_pioctrl *atmel_pioctrl = pinctrl_dev_get_drvdata(pctldev); in atmel_pctl_find_group_by_pin()
524 static int atmel_pctl_xlate_pinfunc(struct pinctrl_dev *pctldev, in atmel_pctl_xlate_pinfunc() argument
529 struct atmel_pioctrl *atmel_pioctrl = pinctrl_dev_get_drvdata(pctldev); in atmel_pctl_xlate_pinfunc()
541 grp = atmel_pctl_find_group_by_pin(pctldev, pin_id); in atmel_pctl_xlate_pinfunc()
557 static int atmel_pctl_dt_subnode_to_map(struct pinctrl_dev *pctldev, in atmel_pctl_dt_subnode_to_map() argument
573 ret = pinconf_generic_parse_dt_config(np, pctldev, &configs, in atmel_pctl_dt_subnode_to_map()
576 dev_err(pctldev->dev, "%pOF: could not parse node property\n", in atmel_pctl_dt_subnode_to_map()
583 dev_err(pctldev->dev, "no pins found in node %pOF\n", np); in atmel_pctl_dt_subnode_to_map()
596 ret = pinctrl_utils_reserve_map(pctldev, map, reserved_maps, num_maps, in atmel_pctl_dt_subnode_to_map()
608 ret = atmel_pctl_xlate_pinfunc(pctldev, np, pinfunc, &group, in atmel_pctl_dt_subnode_to_map()
613 pinctrl_utils_add_map_mux(pctldev, map, reserved_maps, num_maps, in atmel_pctl_dt_subnode_to_map()
617 ret = pinctrl_utils_add_map_configs(pctldev, map, in atmel_pctl_dt_subnode_to_map()
631 static int atmel_pctl_dt_node_to_map(struct pinctrl_dev *pctldev, in atmel_pctl_dt_node_to_map() argument
649 ret = atmel_pctl_dt_subnode_to_map(pctldev, np_config, map, in atmel_pctl_dt_node_to_map()
653 ret = atmel_pctl_dt_subnode_to_map(pctldev, np, map, in atmel_pctl_dt_node_to_map()
663 pinctrl_utils_free_map(pctldev, *map, *num_maps); in atmel_pctl_dt_node_to_map()
664 dev_err(pctldev->dev, "can't create maps for node %pOF\n", in atmel_pctl_dt_node_to_map()
679 static int atmel_pmx_get_functions_count(struct pinctrl_dev *pctldev) in atmel_pmx_get_functions_count() argument
684 static const char *atmel_pmx_get_function_name(struct pinctrl_dev *pctldev, in atmel_pmx_get_function_name() argument
690 static int atmel_pmx_get_function_groups(struct pinctrl_dev *pctldev, in atmel_pmx_get_function_groups() argument
695 struct atmel_pioctrl *atmel_pioctrl = pinctrl_dev_get_drvdata(pctldev); in atmel_pmx_get_function_groups()
703 static int atmel_pmx_set_mux(struct pinctrl_dev *pctldev, in atmel_pmx_set_mux() argument
707 struct atmel_pioctrl *atmel_pioctrl = pinctrl_dev_get_drvdata(pctldev); in atmel_pmx_set_mux()
711 dev_dbg(pctldev->dev, "enable function %s group %s\n", in atmel_pmx_set_mux()
715 conf = atmel_pin_config_read(pctldev, pin); in atmel_pmx_set_mux()
718 dev_dbg(pctldev->dev, "pin: %u, conf: 0x%08x\n", pin, conf); in atmel_pmx_set_mux()
719 atmel_pin_config_write(pctldev, pin, conf); in atmel_pmx_set_mux()
731 static int atmel_conf_pin_config_group_get(struct pinctrl_dev *pctldev, in atmel_conf_pin_config_group_get() argument
735 struct atmel_pioctrl *atmel_pioctrl = pinctrl_dev_get_drvdata(pctldev); in atmel_conf_pin_config_group_get()
741 res = atmel_pin_config_read(pctldev, pin_id); in atmel_conf_pin_config_group_get()
791 static int atmel_conf_pin_config_group_set(struct pinctrl_dev *pctldev, in atmel_conf_pin_config_group_set() argument
796 struct atmel_pioctrl *atmel_pioctrl = pinctrl_dev_get_drvdata(pctldev); in atmel_conf_pin_config_group_set()
802 conf = atmel_pin_config_read(pctldev, pin_id); in atmel_conf_pin_config_group_set()
812 dev_dbg(pctldev->dev, "%s: pin=%u, config=0x%lx\n", in atmel_conf_pin_config_group_set()
888 dev_warn(pctldev->dev, "drive strength not updated (incorrect value)\n"); in atmel_conf_pin_config_group_set()
892 dev_warn(pctldev->dev, in atmel_conf_pin_config_group_set()
899 dev_dbg(pctldev->dev, "%s: reg=0x%08x\n", __func__, conf); in atmel_conf_pin_config_group_set()
900 atmel_pin_config_write(pctldev, pin_id, conf); in atmel_conf_pin_config_group_set()
905 static void atmel_conf_pin_config_dbg_show(struct pinctrl_dev *pctldev, in atmel_conf_pin_config_dbg_show() argument
909 struct atmel_pioctrl *atmel_pioctrl = pinctrl_dev_get_drvdata(pctldev); in atmel_conf_pin_config_dbg_show()
920 conf = atmel_pin_config_read(pctldev, pin_id); in atmel_conf_pin_config_dbg_show()