diff options
author | Quentin Schulz <quentin.schulz@cherry.de> | 2024-10-02 14:03:03 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2024-10-02 16:12:00 +0200 |
commit | 30e830b8b952e550344224546f8cd83c5c49a5bf (patch) | |
tree | 7a5771cdb626eb9d941a079c032b99d375f84a12 /drivers/pinctrl | |
parent | pinctrl: aw9523: use enable for regulator (diff) | |
download | linux-30e830b8b952e550344224546f8cd83c5c49a5bf.tar.xz linux-30e830b8b952e550344224546f8cd83c5c49a5bf.zip |
pinctrl: rockchip: improve error message for incorrect rockchip,pins property
If one improperly writes a rockchip,pins property, the pinctrl driver
basically just states that one in the myriad of pinctrl nodes is
improper but does not tell you which one.
Instead, let's print the full name of the Device Tree node that is
improper as well as provide more context on what the expected content
is.
Note that this should be rather unnecessary if one reads the output of
the dtbs_check as it would be highlighted as an error.
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/20241002-pinctrl-rockchip-error-modulo-4-v1-1-4addb4e5732a@cherry.de
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r-- | drivers/pinctrl/pinctrl-rockchip.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c index 5c1bc4d5b662..04e85a6037c9 100644 --- a/drivers/pinctrl/pinctrl-rockchip.c +++ b/drivers/pinctrl/pinctrl-rockchip.c @@ -3227,7 +3227,9 @@ static int rockchip_pinctrl_parse_groups(struct device_node *np, /* we do not check return since it's safe node passed down */ size /= sizeof(*list); if (!size || size % 4) - return dev_err_probe(dev, -EINVAL, "wrong pins number or pins and configs should be by 4\n"); + return dev_err_probe(dev, -EINVAL, + "%pOF: rockchip,pins: expected one or more of <bank pin mux CONFIG>, got %d args instead\n", + np, size); grp->npins = size / 4; |