linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pinctrl: qcom: sm8250: correct sdc2_clk and ngpios
@ 2020-09-13 22:50 Dmitry Baryshkov
  2020-09-13 23:44 ` Bjorn Andersson
  0 siblings, 1 reply; 4+ messages in thread
From: Dmitry Baryshkov @ 2020-09-13 22:50 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Linus Walleij; +Cc: linux-arm-msm, linux-gpio

Correct sdc2_clk pin definition (register offset) and ngpios (SM8250 has
180 GPIO pins).

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Fixes: 4e3ec9e407ad5058003309072b37111f7b8c900a
---
 drivers/pinctrl/qcom/pinctrl-sm8250.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pinctrl/qcom/pinctrl-sm8250.c b/drivers/pinctrl/qcom/pinctrl-sm8250.c
index a660f1274b66..4f7dae61b089 100644
--- a/drivers/pinctrl/qcom/pinctrl-sm8250.c
+++ b/drivers/pinctrl/qcom/pinctrl-sm8250.c
@@ -1308,7 +1308,7 @@ static const struct msm_pingroup sm8250_groups[] = {
 	[178] = PINGROUP(178, WEST, _, _, _, _, _, _, _, _, _),
 	[179] = PINGROUP(179, WEST, _, _, _, _, _, _, _, _, _),
 	[180] = UFS_RESET(ufs_reset, 0xb8000),
-	[181] = SDC_PINGROUP(sdc2_clk, 0x7000, 14, 6),
+	[181] = SDC_PINGROUP(sdc2_clk, 0xb7000, 14, 6),
 	[182] = SDC_PINGROUP(sdc2_cmd, 0xb7000, 11, 3),
 	[183] = SDC_PINGROUP(sdc2_data, 0xb7000, 9, 0),
 };
@@ -1320,7 +1320,7 @@ static const struct msm_pinctrl_soc_data sm8250_pinctrl = {
 	.nfunctions = ARRAY_SIZE(sm8250_functions),
 	.groups = sm8250_groups,
 	.ngroups = ARRAY_SIZE(sm8250_groups),
-	.ngpios = 181,
+	.ngpios = 180,
 	.tiles = sm8250_tiles,
 	.ntiles = ARRAY_SIZE(sm8250_tiles),
 };
-- 
2.28.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] pinctrl: qcom: sm8250: correct sdc2_clk and ngpios
  2020-09-13 22:50 [PATCH] pinctrl: qcom: sm8250: correct sdc2_clk and ngpios Dmitry Baryshkov
@ 2020-09-13 23:44 ` Bjorn Andersson
  2020-09-13 23:52   ` Dmitry Baryshkov
  0 siblings, 1 reply; 4+ messages in thread
From: Bjorn Andersson @ 2020-09-13 23:44 UTC (permalink / raw)
  To: Dmitry Baryshkov; +Cc: Andy Gross, Linus Walleij, linux-arm-msm, linux-gpio

On Sun 13 Sep 17:50 CDT 2020, Dmitry Baryshkov wrote:

> Correct sdc2_clk pin definition (register offset) and ngpios (SM8250 has
> 180 GPIO pins).
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> Fixes: 4e3ec9e407ad5058003309072b37111f7b8c900a
> ---
>  drivers/pinctrl/qcom/pinctrl-sm8250.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/pinctrl/qcom/pinctrl-sm8250.c b/drivers/pinctrl/qcom/pinctrl-sm8250.c
> index a660f1274b66..4f7dae61b089 100644
> --- a/drivers/pinctrl/qcom/pinctrl-sm8250.c
> +++ b/drivers/pinctrl/qcom/pinctrl-sm8250.c
> @@ -1308,7 +1308,7 @@ static const struct msm_pingroup sm8250_groups[] = {
>  	[178] = PINGROUP(178, WEST, _, _, _, _, _, _, _, _, _),
>  	[179] = PINGROUP(179, WEST, _, _, _, _, _, _, _, _, _),
>  	[180] = UFS_RESET(ufs_reset, 0xb8000),
> -	[181] = SDC_PINGROUP(sdc2_clk, 0x7000, 14, 6),
> +	[181] = SDC_PINGROUP(sdc2_clk, 0xb7000, 14, 6),

You're right.

>  	[182] = SDC_PINGROUP(sdc2_cmd, 0xb7000, 11, 3),
>  	[183] = SDC_PINGROUP(sdc2_data, 0xb7000, 9, 0),
>  };
> @@ -1320,7 +1320,7 @@ static const struct msm_pinctrl_soc_data sm8250_pinctrl = {
>  	.nfunctions = ARRAY_SIZE(sm8250_functions),
>  	.groups = sm8250_groups,
>  	.ngroups = ARRAY_SIZE(sm8250_groups),
> -	.ngpios = 181,
> +	.ngpios = 180,

But, while it is correct that SM8250 only has 180 GPIOs, we're exposing
UFS_RESET as a gpio as well, so this should therefor be 181. Sorry for
the obfuscation here...

Regards,
Bjorn

>  	.tiles = sm8250_tiles,
>  	.ntiles = ARRAY_SIZE(sm8250_tiles),
>  };
> -- 
> 2.28.0
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] pinctrl: qcom: sm8250: correct sdc2_clk and ngpios
  2020-09-13 23:44 ` Bjorn Andersson
@ 2020-09-13 23:52   ` Dmitry Baryshkov
  2020-09-14  0:07     ` Bjorn Andersson
  0 siblings, 1 reply; 4+ messages in thread
From: Dmitry Baryshkov @ 2020-09-13 23:52 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Andy Gross, Linus Walleij,
	open list:DRM DRIVER FOR MSM ADRENO GPU, linux-gpio

Hello,

On Mon, 14 Sep 2020 at 02:44, Bjorn Andersson
<bjorn.andersson@linaro.org> wrote:
>
> On Sun 13 Sep 17:50 CDT 2020, Dmitry Baryshkov wrote:
>
> > Correct sdc2_clk pin definition (register offset) and ngpios (SM8250 has
> > 180 GPIO pins).
> >
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > Fixes: 4e3ec9e407ad5058003309072b37111f7b8c900a
> > ---
> >  drivers/pinctrl/qcom/pinctrl-sm8250.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/pinctrl/qcom/pinctrl-sm8250.c b/drivers/pinctrl/qcom/pinctrl-sm8250.c
> > index a660f1274b66..4f7dae61b089 100644
> > --- a/drivers/pinctrl/qcom/pinctrl-sm8250.c
> > +++ b/drivers/pinctrl/qcom/pinctrl-sm8250.c
> > @@ -1308,7 +1308,7 @@ static const struct msm_pingroup sm8250_groups[] = {
> >       [178] = PINGROUP(178, WEST, _, _, _, _, _, _, _, _, _),
> >       [179] = PINGROUP(179, WEST, _, _, _, _, _, _, _, _, _),
> >       [180] = UFS_RESET(ufs_reset, 0xb8000),
> > -     [181] = SDC_PINGROUP(sdc2_clk, 0x7000, 14, 6),
> > +     [181] = SDC_PINGROUP(sdc2_clk, 0xb7000, 14, 6),
>
> You're right.
>
> >       [182] = SDC_PINGROUP(sdc2_cmd, 0xb7000, 11, 3),
> >       [183] = SDC_PINGROUP(sdc2_data, 0xb7000, 9, 0),
> >  };
> > @@ -1320,7 +1320,7 @@ static const struct msm_pinctrl_soc_data sm8250_pinctrl = {
> >       .nfunctions = ARRAY_SIZE(sm8250_functions),
> >       .groups = sm8250_groups,
> >       .ngroups = ARRAY_SIZE(sm8250_groups),
> > -     .ngpios = 181,
> > +     .ngpios = 180,
>
> But, while it is correct that SM8250 only has 180 GPIOs, we're exposing
> UFS_RESET as a gpio as well, so this should therefor be 181. Sorry for
> the obfuscation here...

True. Could you please drop the second part of the patch on your own?
Or would you prefer for me to send v2?



-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] pinctrl: qcom: sm8250: correct sdc2_clk and ngpios
  2020-09-13 23:52   ` Dmitry Baryshkov
@ 2020-09-14  0:07     ` Bjorn Andersson
  0 siblings, 0 replies; 4+ messages in thread
From: Bjorn Andersson @ 2020-09-14  0:07 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Andy Gross, Linus Walleij,
	open list:DRM DRIVER FOR MSM ADRENO GPU, linux-gpio

On Sun 13 Sep 18:52 CDT 2020, Dmitry Baryshkov wrote:

> Hello,
> 
> On Mon, 14 Sep 2020 at 02:44, Bjorn Andersson
> <bjorn.andersson@linaro.org> wrote:
> >
> > On Sun 13 Sep 17:50 CDT 2020, Dmitry Baryshkov wrote:
> >
> > > Correct sdc2_clk pin definition (register offset) and ngpios (SM8250 has
> > > 180 GPIO pins).
> > >
> > > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > > Fixes: 4e3ec9e407ad5058003309072b37111f7b8c900a
> > > ---
> > >  drivers/pinctrl/qcom/pinctrl-sm8250.c | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/pinctrl/qcom/pinctrl-sm8250.c b/drivers/pinctrl/qcom/pinctrl-sm8250.c
> > > index a660f1274b66..4f7dae61b089 100644
> > > --- a/drivers/pinctrl/qcom/pinctrl-sm8250.c
> > > +++ b/drivers/pinctrl/qcom/pinctrl-sm8250.c
> > > @@ -1308,7 +1308,7 @@ static const struct msm_pingroup sm8250_groups[] = {
> > >       [178] = PINGROUP(178, WEST, _, _, _, _, _, _, _, _, _),
> > >       [179] = PINGROUP(179, WEST, _, _, _, _, _, _, _, _, _),
> > >       [180] = UFS_RESET(ufs_reset, 0xb8000),
> > > -     [181] = SDC_PINGROUP(sdc2_clk, 0x7000, 14, 6),
> > > +     [181] = SDC_PINGROUP(sdc2_clk, 0xb7000, 14, 6),
> >
> > You're right.
> >
> > >       [182] = SDC_PINGROUP(sdc2_cmd, 0xb7000, 11, 3),
> > >       [183] = SDC_PINGROUP(sdc2_data, 0xb7000, 9, 0),
> > >  };
> > > @@ -1320,7 +1320,7 @@ static const struct msm_pinctrl_soc_data sm8250_pinctrl = {
> > >       .nfunctions = ARRAY_SIZE(sm8250_functions),
> > >       .groups = sm8250_groups,
> > >       .ngroups = ARRAY_SIZE(sm8250_groups),
> > > -     .ngpios = 181,
> > > +     .ngpios = 180,
> >
> > But, while it is correct that SM8250 only has 180 GPIOs, we're exposing
> > UFS_RESET as a gpio as well, so this should therefor be 181. Sorry for
> > the obfuscation here...
> 
> True. Could you please drop the second part of the patch on your own?
> Or would you prefer for me to send v2?
> 

This goes through Linus' tree, so it would be up to him. If you want to
avoid waiting for his response go ahead and post a v2 - and I'll give
you a r-b on it.

Regards,
Bjorn

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-09-14  0:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-13 22:50 [PATCH] pinctrl: qcom: sm8250: correct sdc2_clk and ngpios Dmitry Baryshkov
2020-09-13 23:44 ` Bjorn Andersson
2020-09-13 23:52   ` Dmitry Baryshkov
2020-09-14  0:07     ` Bjorn Andersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).