* [PATCH] pinctrl: mt7622: fix probe fail by misuse the selector
@ 2018-07-12 5:50 ` sean.wang
0 siblings, 0 replies; 9+ messages in thread
From: sean.wang @ 2018-07-12 5:50 UTC (permalink / raw)
To: linus.walleij, linux-mediatek
Cc: linux-arm-kernel, linux-gpio, linux-kernel, Sean Wang, Kevin Hilman
From: Sean Wang <sean.wang@mediatek.com>
After the commit acf137951367 ("pinctrl: core: Return selector to the
pinctrl driver") and the commit 47f1242d19c3 ("pinctrl: pinmux: Return
selector to the pinctrl driver"), it's necessary to add the fixes
needed for the pin controller drivers to use the appropriate returned
selector for a negative error number returned in case of the fail at
these functions. Otherwise, the driver would have a failed probe and
that causes boot message cannot correctly output and devices fail
to acquire their own pins.
Cc: Kevin Hilman <khilman@baylibre.com>
Fixes: acf137951367 ("pinctrl: core: Return selector to the pinctrl driver")
Fixes: 47f1242d19c3 ("pinctrl: pinmux: Return selector to the pinctrl driver")
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
---
drivers/pinctrl/mediatek/pinctrl-mt7622.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pinctrl/mediatek/pinctrl-mt7622.c b/drivers/pinctrl/mediatek/pinctrl-mt7622.c
index 2411c384..6f931b8 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mt7622.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mt7622.c
@@ -1538,7 +1538,7 @@ static int mtk_build_groups(struct mtk_pinctrl *hw)
err = pinctrl_generic_add_group(hw->pctrl, group->name,
group->pins, group->num_pins,
group->data);
- if (err) {
+ if (err < 0) {
dev_err(hw->dev, "Failed to register group %s\n",
group->name);
return err;
@@ -1559,7 +1559,7 @@ static int mtk_build_functions(struct mtk_pinctrl *hw)
func->group_names,
func->num_group_names,
func->data);
- if (err) {
+ if (err < 0) {
dev_err(hw->dev, "Failed to register function %s\n",
func->name);
return err;
--
2.7.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH] pinctrl: mt7622: fix probe fail by misuse the selector
@ 2018-07-12 5:50 ` sean.wang
0 siblings, 0 replies; 9+ messages in thread
From: sean.wang @ 2018-07-12 5:50 UTC (permalink / raw)
To: linus.walleij, linux-mediatek
Cc: linux-arm-kernel, linux-gpio, linux-kernel, Sean Wang, Kevin Hilman
From: Sean Wang <sean.wang@mediatek.com>
After the commit acf137951367 ("pinctrl: core: Return selector to the
pinctrl driver") and the commit 47f1242d19c3 ("pinctrl: pinmux: Return
selector to the pinctrl driver"), it's necessary to add the fixes
needed for the pin controller drivers to use the appropriate returned
selector for a negative error number returned in case of the fail at
these functions. Otherwise, the driver would have a failed probe and
that causes boot message cannot correctly output and devices fail
to acquire their own pins.
Cc: Kevin Hilman <khilman@baylibre.com>
Fixes: acf137951367 ("pinctrl: core: Return selector to the pinctrl driver")
Fixes: 47f1242d19c3 ("pinctrl: pinmux: Return selector to the pinctrl driver")
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
---
drivers/pinctrl/mediatek/pinctrl-mt7622.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pinctrl/mediatek/pinctrl-mt7622.c b/drivers/pinctrl/mediatek/pinctrl-mt7622.c
index 2411c384..6f931b8 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mt7622.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mt7622.c
@@ -1538,7 +1538,7 @@ static int mtk_build_groups(struct mtk_pinctrl *hw)
err = pinctrl_generic_add_group(hw->pctrl, group->name,
group->pins, group->num_pins,
group->data);
- if (err) {
+ if (err < 0) {
dev_err(hw->dev, "Failed to register group %s\n",
group->name);
return err;
@@ -1559,7 +1559,7 @@ static int mtk_build_functions(struct mtk_pinctrl *hw)
func->group_names,
func->num_group_names,
func->data);
- if (err) {
+ if (err < 0) {
dev_err(hw->dev, "Failed to register function %s\n",
func->name);
return err;
--
2.7.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH] pinctrl: mt7622: fix probe fail by misuse the selector
@ 2018-07-12 5:50 ` sean.wang
0 siblings, 0 replies; 9+ messages in thread
From: sean.wang at mediatek.com @ 2018-07-12 5:50 UTC (permalink / raw)
To: linux-arm-kernel
From: Sean Wang <sean.wang@mediatek.com>
After the commit acf137951367 ("pinctrl: core: Return selector to the
pinctrl driver") and the commit 47f1242d19c3 ("pinctrl: pinmux: Return
selector to the pinctrl driver"), it's necessary to add the fixes
needed for the pin controller drivers to use the appropriate returned
selector for a negative error number returned in case of the fail at
these functions. Otherwise, the driver would have a failed probe and
that causes boot message cannot correctly output and devices fail
to acquire their own pins.
Cc: Kevin Hilman <khilman@baylibre.com>
Fixes: acf137951367 ("pinctrl: core: Return selector to the pinctrl driver")
Fixes: 47f1242d19c3 ("pinctrl: pinmux: Return selector to the pinctrl driver")
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
---
drivers/pinctrl/mediatek/pinctrl-mt7622.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pinctrl/mediatek/pinctrl-mt7622.c b/drivers/pinctrl/mediatek/pinctrl-mt7622.c
index 2411c384..6f931b8 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mt7622.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mt7622.c
@@ -1538,7 +1538,7 @@ static int mtk_build_groups(struct mtk_pinctrl *hw)
err = pinctrl_generic_add_group(hw->pctrl, group->name,
group->pins, group->num_pins,
group->data);
- if (err) {
+ if (err < 0) {
dev_err(hw->dev, "Failed to register group %s\n",
group->name);
return err;
@@ -1559,7 +1559,7 @@ static int mtk_build_functions(struct mtk_pinctrl *hw)
func->group_names,
func->num_group_names,
func->data);
- if (err) {
+ if (err < 0) {
dev_err(hw->dev, "Failed to register function %s\n",
func->name);
return err;
--
2.7.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] pinctrl: mt7622: fix probe fail by misuse the selector
2018-07-12 5:50 ` sean.wang
(?)
@ 2018-07-13 8:11 ` Linus Walleij
-1 siblings, 0 replies; 9+ messages in thread
From: Linus Walleij @ 2018-07-13 8:11 UTC (permalink / raw)
To: Sean Wang, ext Tony Lindgren
Cc: moderated list:ARM/Mediatek SoC support, Linux ARM,
open list:GPIO SUBSYSTEM, linux-kernel, Kevin Hilman
On Thu, Jul 12, 2018 at 7:50 AM <sean.wang@mediatek.com> wrote:
> From: Sean Wang <sean.wang@mediatek.com>
>
> After the commit acf137951367 ("pinctrl: core: Return selector to the
> pinctrl driver") and the commit 47f1242d19c3 ("pinctrl: pinmux: Return
> selector to the pinctrl driver"), it's necessary to add the fixes
> needed for the pin controller drivers to use the appropriate returned
> selector for a negative error number returned in case of the fail at
> these functions. Otherwise, the driver would have a failed probe and
> that causes boot message cannot correctly output and devices fail
> to acquire their own pins.
>
> Cc: Kevin Hilman <khilman@baylibre.com>
> Fixes: acf137951367 ("pinctrl: core: Return selector to the pinctrl driver")
> Fixes: 47f1242d19c3 ("pinctrl: pinmux: Return selector to the pinctrl driver")
> Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Applied on top of Tony's patches on the fixes branch.
Now there are fixes piling on top of fixes and I am starting to feel
insecure of pushing this to v4.18 and I feel like letting these
fixes go to v4.19 (it can be picked to stable from there).
Tony: do you think there could be more fallout like this?
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] pinctrl: mt7622: fix probe fail by misuse the selector
@ 2018-07-13 8:11 ` Linus Walleij
0 siblings, 0 replies; 9+ messages in thread
From: Linus Walleij @ 2018-07-13 8:11 UTC (permalink / raw)
To: Sean Wang, ext Tony Lindgren
Cc: moderated list:ARM/Mediatek SoC support, Linux ARM,
open list:GPIO SUBSYSTEM, linux-kernel, Kevin Hilman
On Thu, Jul 12, 2018 at 7:50 AM <sean.wang@mediatek.com> wrote:
> From: Sean Wang <sean.wang@mediatek.com>
>
> After the commit acf137951367 ("pinctrl: core: Return selector to the
> pinctrl driver") and the commit 47f1242d19c3 ("pinctrl: pinmux: Return
> selector to the pinctrl driver"), it's necessary to add the fixes
> needed for the pin controller drivers to use the appropriate returned
> selector for a negative error number returned in case of the fail at
> these functions. Otherwise, the driver would have a failed probe and
> that causes boot message cannot correctly output and devices fail
> to acquire their own pins.
>
> Cc: Kevin Hilman <khilman@baylibre.com>
> Fixes: acf137951367 ("pinctrl: core: Return selector to the pinctrl driver")
> Fixes: 47f1242d19c3 ("pinctrl: pinmux: Return selector to the pinctrl driver")
> Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Applied on top of Tony's patches on the fixes branch.
Now there are fixes piling on top of fixes and I am starting to feel
insecure of pushing this to v4.18 and I feel like letting these
fixes go to v4.19 (it can be picked to stable from there).
Tony: do you think there could be more fallout like this?
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] pinctrl: mt7622: fix probe fail by misuse the selector
@ 2018-07-13 8:11 ` Linus Walleij
0 siblings, 0 replies; 9+ messages in thread
From: Linus Walleij @ 2018-07-13 8:11 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Jul 12, 2018 at 7:50 AM <sean.wang@mediatek.com> wrote:
> From: Sean Wang <sean.wang@mediatek.com>
>
> After the commit acf137951367 ("pinctrl: core: Return selector to the
> pinctrl driver") and the commit 47f1242d19c3 ("pinctrl: pinmux: Return
> selector to the pinctrl driver"), it's necessary to add the fixes
> needed for the pin controller drivers to use the appropriate returned
> selector for a negative error number returned in case of the fail at
> these functions. Otherwise, the driver would have a failed probe and
> that causes boot message cannot correctly output and devices fail
> to acquire their own pins.
>
> Cc: Kevin Hilman <khilman@baylibre.com>
> Fixes: acf137951367 ("pinctrl: core: Return selector to the pinctrl driver")
> Fixes: 47f1242d19c3 ("pinctrl: pinmux: Return selector to the pinctrl driver")
> Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Applied on top of Tony's patches on the fixes branch.
Now there are fixes piling on top of fixes and I am starting to feel
insecure of pushing this to v4.18 and I feel like letting these
fixes go to v4.19 (it can be picked to stable from there).
Tony: do you think there could be more fallout like this?
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] pinctrl: mt7622: fix probe fail by misuse the selector
2018-07-13 8:11 ` Linus Walleij
(?)
@ 2018-07-13 12:46 ` Tony Lindgren
-1 siblings, 0 replies; 9+ messages in thread
From: Tony Lindgren @ 2018-07-13 12:46 UTC (permalink / raw)
To: Linus Walleij
Cc: Sean Wang, moderated list:ARM/Mediatek SoC support, Linux ARM,
open list:GPIO SUBSYSTEM, linux-kernel, Kevin Hilman,
Jacopo Mondi, Paul Cercueil
* Linus Walleij <linus.walleij@linaro.org> [180713 08:14]:
> On Thu, Jul 12, 2018 at 7:50 AM <sean.wang@mediatek.com> wrote:
>
> > From: Sean Wang <sean.wang@mediatek.com>
> >
> > After the commit acf137951367 ("pinctrl: core: Return selector to the
> > pinctrl driver") and the commit 47f1242d19c3 ("pinctrl: pinmux: Return
> > selector to the pinctrl driver"), it's necessary to add the fixes
> > needed for the pin controller drivers to use the appropriate returned
> > selector for a negative error number returned in case of the fail at
> > these functions. Otherwise, the driver would have a failed probe and
> > that causes boot message cannot correctly output and devices fail
> > to acquire their own pins.
> >
> > Cc: Kevin Hilman <khilman@baylibre.com>
> > Fixes: acf137951367 ("pinctrl: core: Return selector to the pinctrl driver")
> > Fixes: 47f1242d19c3 ("pinctrl: pinmux: Return selector to the pinctrl driver")
> > Signed-off-by: Sean Wang <sean.wang@mediatek.com>
>
> Applied on top of Tony's patches on the fixes branch.
>
> Now there are fixes piling on top of fixes and I am starting to feel
> insecure of pushing this to v4.18 and I feel like letting these
> fixes go to v4.19 (it can be picked to stable from there).
Yes might be worth waiting as we're getting close to the merge window.
> Tony: do you think there could be more fallout like this?
Based on grep -A5 pinctrl_generic_add we have also:
drivers/pinctrl/pinctrl-ingenic.c
Looks like it should check for if (err < 0). Adding Paul Cercueil
to Cc as well, Paul can you please check and patch?
Then 12f953b382bf ("pinctrl: rza1: Fix selector use for groups and
functions") seems to have fixed a similar issue for
drivers/pinctrl/pinctrl-rza1.c
Regards,
Tony
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] pinctrl: mt7622: fix probe fail by misuse the selector
@ 2018-07-13 12:46 ` Tony Lindgren
0 siblings, 0 replies; 9+ messages in thread
From: Tony Lindgren @ 2018-07-13 12:46 UTC (permalink / raw)
To: Linus Walleij
Cc: Sean Wang, moderated list:ARM/Mediatek SoC support, Linux ARM,
open list:GPIO SUBSYSTEM, linux-kernel, Kevin Hilman,
Jacopo Mondi, Paul Cercueil
* Linus Walleij <linus.walleij@linaro.org> [180713 08:14]:
> On Thu, Jul 12, 2018 at 7:50 AM <sean.wang@mediatek.com> wrote:
>
> > From: Sean Wang <sean.wang@mediatek.com>
> >
> > After the commit acf137951367 ("pinctrl: core: Return selector to the
> > pinctrl driver") and the commit 47f1242d19c3 ("pinctrl: pinmux: Return
> > selector to the pinctrl driver"), it's necessary to add the fixes
> > needed for the pin controller drivers to use the appropriate returned
> > selector for a negative error number returned in case of the fail at
> > these functions. Otherwise, the driver would have a failed probe and
> > that causes boot message cannot correctly output and devices fail
> > to acquire their own pins.
> >
> > Cc: Kevin Hilman <khilman@baylibre.com>
> > Fixes: acf137951367 ("pinctrl: core: Return selector to the pinctrl driver")
> > Fixes: 47f1242d19c3 ("pinctrl: pinmux: Return selector to the pinctrl driver")
> > Signed-off-by: Sean Wang <sean.wang@mediatek.com>
>
> Applied on top of Tony's patches on the fixes branch.
>
> Now there are fixes piling on top of fixes and I am starting to feel
> insecure of pushing this to v4.18 and I feel like letting these
> fixes go to v4.19 (it can be picked to stable from there).
Yes might be worth waiting as we're getting close to the merge window.
> Tony: do you think there could be more fallout like this?
Based on grep -A5 pinctrl_generic_add we have also:
drivers/pinctrl/pinctrl-ingenic.c
Looks like it should check for if (err < 0). Adding Paul Cercueil
to Cc as well, Paul can you please check and patch?
Then 12f953b382bf ("pinctrl: rza1: Fix selector use for groups and
functions") seems to have fixed a similar issue for
drivers/pinctrl/pinctrl-rza1.c
Regards,
Tony
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] pinctrl: mt7622: fix probe fail by misuse the selector
@ 2018-07-13 12:46 ` Tony Lindgren
0 siblings, 0 replies; 9+ messages in thread
From: Tony Lindgren @ 2018-07-13 12:46 UTC (permalink / raw)
To: linux-arm-kernel
* Linus Walleij <linus.walleij@linaro.org> [180713 08:14]:
> On Thu, Jul 12, 2018 at 7:50 AM <sean.wang@mediatek.com> wrote:
>
> > From: Sean Wang <sean.wang@mediatek.com>
> >
> > After the commit acf137951367 ("pinctrl: core: Return selector to the
> > pinctrl driver") and the commit 47f1242d19c3 ("pinctrl: pinmux: Return
> > selector to the pinctrl driver"), it's necessary to add the fixes
> > needed for the pin controller drivers to use the appropriate returned
> > selector for a negative error number returned in case of the fail at
> > these functions. Otherwise, the driver would have a failed probe and
> > that causes boot message cannot correctly output and devices fail
> > to acquire their own pins.
> >
> > Cc: Kevin Hilman <khilman@baylibre.com>
> > Fixes: acf137951367 ("pinctrl: core: Return selector to the pinctrl driver")
> > Fixes: 47f1242d19c3 ("pinctrl: pinmux: Return selector to the pinctrl driver")
> > Signed-off-by: Sean Wang <sean.wang@mediatek.com>
>
> Applied on top of Tony's patches on the fixes branch.
>
> Now there are fixes piling on top of fixes and I am starting to feel
> insecure of pushing this to v4.18 and I feel like letting these
> fixes go to v4.19 (it can be picked to stable from there).
Yes might be worth waiting as we're getting close to the merge window.
> Tony: do you think there could be more fallout like this?
Based on grep -A5 pinctrl_generic_add we have also:
drivers/pinctrl/pinctrl-ingenic.c
Looks like it should check for if (err < 0). Adding Paul Cercueil
to Cc as well, Paul can you please check and patch?
Then 12f953b382bf ("pinctrl: rza1: Fix selector use for groups and
functions") seems to have fixed a similar issue for
drivers/pinctrl/pinctrl-rza1.c
Regards,
Tony
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2018-07-13 12:46 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-12 5:50 [PATCH] pinctrl: mt7622: fix probe fail by misuse the selector sean.wang
2018-07-12 5:50 ` sean.wang at mediatek.com
2018-07-12 5:50 ` sean.wang
2018-07-13 8:11 ` Linus Walleij
2018-07-13 8:11 ` Linus Walleij
2018-07-13 8:11 ` Linus Walleij
2018-07-13 12:46 ` Tony Lindgren
2018-07-13 12:46 ` Tony Lindgren
2018-07-13 12:46 ` Tony Lindgren
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.