.pin_config_config_dbg_show = pinconf_generic_dump_config,
};
-static bool is_func_exist(struct eqbr_pmx_func *funcs, const char *name,
- unsigned int nr_funcs, unsigned int *idx)
+static bool is_func_exist(struct pinfunction *funcs, const char *name,
+ unsigned int nr_funcs, unsigned int *idx)
{
int i;
return false;
}
-static int funcs_utils(struct device *dev, struct eqbr_pmx_func *funcs,
+static int funcs_utils(struct device *dev, struct pinfunction *funcs,
unsigned int *nr_funcs, funcs_util_ops op)
{
struct device_node *node = dev->of_node;
struct device_node *np;
struct property *prop;
const char *fn_name;
+ const char **groups;
unsigned int fid;
int i, j;
case OP_COUNT_NR_FUNC_GRPS:
if (is_func_exist(funcs, fn_name, *nr_funcs, &fid))
- funcs[fid].nr_groups++;
+ funcs[fid].ngroups++;
break;
case OP_ADD_FUNC_GRPS:
if (is_func_exist(funcs, fn_name, *nr_funcs, &fid)) {
- for (j = 0; j < funcs[fid].nr_groups; j++)
- if (!funcs[fid].groups[j])
+ groups = (const char **)funcs[fid].groups;
+ for (j = 0; j < funcs[fid].ngroups; j++)
+ if (!groups[j])
break;
- funcs[fid].groups[j] = prop->value;
+ groups[j] = prop->value;
}
break;
static int eqbr_build_functions(struct eqbr_pinctrl_drv_data *drvdata)
{
struct device *dev = drvdata->dev;
- struct eqbr_pmx_func *funcs = NULL;
+ struct pinfunction *funcs = NULL;
unsigned int nr_funcs = 0;
int i, ret;
return ret;
for (i = 0; i < nr_funcs; i++) {
- if (!funcs[i].nr_groups)
+ if (!funcs[i].ngroups)
continue;
- funcs[i].groups = devm_kcalloc(dev, funcs[i].nr_groups,
+ funcs[i].groups = devm_kcalloc(dev, funcs[i].ngroups,
sizeof(*(funcs[i].groups)),
GFP_KERNEL);
if (!funcs[i].groups)
ret = pinmux_generic_add_function(drvdata->pctl_dev,
funcs[i].name,
funcs[i].groups,
- funcs[i].nr_groups,
+ funcs[i].ngroups,
drvdata);
if (ret < 0) {
dev_err(dev, "Failed to register function %s\n",