const struct pinctrl_pin_desc *pins;
};
+struct keembay_pinfunction {
+ struct pinfunction func;
+ u8 mux_mode;
+};
+
static const struct pinctrl_pin_desc keembay_pins[] = {
KEEMBAY_PIN_DESC(0, "GPIO0",
KEEMBAY_MUX(0x0, "I2S0_M0"),
}
static int keembay_add_functions(struct keembay_pinctrl *kpc,
- struct function_desc *functions)
+ struct keembay_pinfunction *functions)
{
unsigned int i;
/* Assign the groups for each function */
for (i = 0; i < kpc->nfuncs; i++) {
- struct function_desc *func = &functions[i];
+ struct keembay_pinfunction *func = &functions[i];
const char **group_names;
unsigned int grp_idx = 0;
int j;
/* Add all functions */
for (i = 0; i < kpc->nfuncs; i++)
pinmux_generic_add_pinfunction(kpc->pctrl, &functions[i].func,
- functions[i].data);
+ &functions[i].mux_mode);
return 0;
}
static int keembay_build_functions(struct keembay_pinctrl *kpc)
{
- struct function_desc *keembay_funcs, *new_funcs;
+ struct keembay_pinfunction *keembay_funcs, *new_funcs;
int i;
/*
struct keembay_mux_desc *mux;
for (mux = pdesc->drv_data; mux->name; mux++) {
- struct function_desc *fdesc;
+ struct keembay_pinfunction *fdesc;
/* Check if we already have function for this mux */
for (fdesc = keembay_funcs; fdesc->func.name; fdesc++) {
if (!fdesc->func.name) {
fdesc->func.name = mux->name;
fdesc->func.ngroups = 1;
- fdesc->data = &mux->mode;
+ fdesc->mux_mode = mux->mode;
kpc->nfuncs++;
}
}