/* @dev: pin controller device @group: the pin group name to look up  */
static int pinctrl_group_name_to_selector(struct udevice *dev, const char *group)
/* @dev: pin controller device @group: the pin group name to look up  */
static int pinctrl_group_name_to_selector(struct udevice *dev, const char *group)
{
	const struct pinctrl_ops *ops = pinctrl_get_ops(dev);
	unsigned ngroups, selector;
	if (!ops->get_groups_count || !ops->get_group_name) {
		dev_dbg(dev, "get_groups_count or get_group_name missing\n");
		return -ENOSYS;
	}
	ngroups = ops->get_groups_count(dev);
	for (selector = 0; selector < ngroups; selector++) {
		const char *gname = ops->get_group_name(dev, selector);
		if (!strcmp(group, gname))
			return selector;
	}
	return -ENOSYS;
}