f12b941e74dc14a5fe8b43e65753a183ee2b3ba6
[openwrt/staging/blocktrron.git] /
1 From 563fcd6475931c5c8c652a4dd548256314cc87ed Mon Sep 17 00:00:00 2001
2 From: Lorenzo Bianconi <lorenzo@kernel.org>
3 Date: Fri, 22 Aug 2025 14:14:18 +0200
4 Subject: [PATCH] pinctrl: airoha: Fix return value in pinconf callbacks
5
6 Pinctrl stack requires ENOTSUPP error code if the parameter is not
7 supported by the pinctrl driver. Fix the returned error code in pinconf
8 callbacks if the operation is not supported.
9
10 Fixes: 1c8ace2d0725 ("pinctrl: airoha: Add support for EN7581 SoC")
11 Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
12 Link: https://lore.kernel.org/20250822-airoha-pinconf-err-val-fix-v1-1-87b4f264ced2@kernel.org
13 Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
14 ---
15 drivers/pinctrl/mediatek/pinctrl-airoha.c | 8 ++++----
16 1 file changed, 4 insertions(+), 4 deletions(-)
17
18 --- a/drivers/pinctrl/mediatek/pinctrl-airoha.c
19 +++ b/drivers/pinctrl/mediatek/pinctrl-airoha.c
20 @@ -2696,7 +2696,7 @@ static int airoha_pinconf_get(struct pin
21 arg = 1;
22 break;
23 default:
24 - return -EOPNOTSUPP;
25 + return -ENOTSUPP;
26 }
27
28 *config = pinconf_to_config_packed(param, arg);
29 @@ -2790,7 +2790,7 @@ static int airoha_pinconf_set(struct pin
30 break;
31 }
32 default:
33 - return -EOPNOTSUPP;
34 + return -ENOTSUPP;
35 }
36 }
37
38 @@ -2807,10 +2807,10 @@ static int airoha_pinconf_group_get(stru
39 if (airoha_pinconf_get(pctrl_dev,
40 airoha_pinctrl_groups[group].pins[i],
41 config))
42 - return -EOPNOTSUPP;
43 + return -ENOTSUPP;
44
45 if (i && cur_config != *config)
46 - return -EOPNOTSUPP;
47 + return -ENOTSUPP;
48
49 cur_config = *config;
50 }