Commit 4739b1b1 authored by Drew Fustini's avatar Drew Fustini Committed by Linus Walleij

pinctrl: single: set function name when adding function

pcs_add_function() fails to set the function name in struct pcs_function
when adding a new function.  As a result this line in pcs_set_mux():

        dev_dbg(pcs->dev, "enabling %s function%i\n",
                func->name, fselector);

prints "(null)" for the function:

pinctrl-single 44e10800.pinmux: enabling (null) function0
pinctrl-single 44e10800.pinmux: enabling (null) function1
pinctrl-single 44e10800.pinmux: enabling (null) function2
pinctrl-single 44e10800.pinmux: enabling (null) function3

With this fix, the output is now:

pinctrl-single 44e10800.pinmux: enabling pinmux-uart0-pins function0
pinctrl-single 44e10800.pinmux: enabling pinmux-mmc0-pins function1
pinctrl-single 44e10800.pinmux: enabling pinmux-i2c0-pins function2
pinctrl-single 44e10800.pinmux: enabling pinmux-mmc0-pins function3

Cc: Jason Kridner <jkridner@beagleboard.org>
Cc: Robert Nelson <robertcnelson@beagleboard.org>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: default avatarDrew Fustini <drew@beagleboard.org>
Acked-by: default avatarTony Lindgren <tony@atomide.com>
Link: https://lore.kernel.org/r/20210125203542.51513-1-drew@beagleboard.orgSigned-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 97423113
...@@ -777,6 +777,7 @@ static int pcs_add_function(struct pcs_device *pcs, ...@@ -777,6 +777,7 @@ static int pcs_add_function(struct pcs_device *pcs,
function->vals = vals; function->vals = vals;
function->nvals = nvals; function->nvals = nvals;
function->name = name;
selector = pinmux_generic_add_function(pcs->pctl, name, selector = pinmux_generic_add_function(pcs->pctl, name,
pgnames, npgnames, pgnames, npgnames,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment