mbox series

[0/3] pinctrl: single: support #pinctrl-cells = 2

Message ID 20200618125057.41252-1-drew@beagleboard.org (mailing list archive)
Headers show
Series pinctrl: single: support #pinctrl-cells = 2 | expand

Message

Drew Fustini June 18, 2020, 12:50 p.m. UTC
Currently, pinctrl-single only allows #pinctrl-cells = 1.

This series will allow pinctrl-single to also support #pinctrl-cells = 2

If "pinctrl-single,pins" has 3 arguments (offset, conf, mux) then
pcs_parse_one_pinctrl_entry() does an OR operation on to get the
value to store in the register.
    
To take advantage of #pinctrl-cells = 2, the AM33XX_PADCONF macro in
omap.h is modified to keep pin conf and pin mux values separate.

Drew Fustini (3):
  ARM: dts: change AM33XX_PADCONF macro separate conf and mux
  ARM: dts: am33xx-l4: change #pinctrl-cells from 1 to 2
  pinctrl: single: parse #pinctrl-cells = 2

 arch/arm/boot/dts/am33xx-l4.dtsi   |  2 +-
 drivers/pinctrl/pinctrl-single.c   | 11 +++++++++--
 include/dt-bindings/pinctrl/omap.h |  2 +-
 3 files changed, 11 insertions(+), 4 deletions(-)

Comments

Tony Lindgren June 22, 2020, 4:11 p.m. UTC | #1
* Drew Fustini <drew@beagleboard.org> [200618 05:52]:
> Currently, pinctrl-single only allows #pinctrl-cells = 1.
> 
> This series will allow pinctrl-single to also support #pinctrl-cells = 2
> 
> If "pinctrl-single,pins" has 3 arguments (offset, conf, mux) then
> pcs_parse_one_pinctrl_entry() does an OR operation on to get the
> value to store in the register.
>     
> To take advantage of #pinctrl-cells = 2, the AM33XX_PADCONF macro in
> omap.h is modified to keep pin conf and pin mux values separate.

Hmm to me it looks like the order of the patches is the
wrong way around here. Don't we need to first change
pinctrl-single.c, and then only after that update the
dts? And make sure the pinctrl-single.c change does not
break anything without changing the dts :)

Regards,

Tony
Drew Fustini June 22, 2020, 4:46 p.m. UTC | #2
On Mon, Jun 22, 2020 at 09:11:32AM -0700, Tony Lindgren wrote:
> * Drew Fustini <drew@beagleboard.org> [200618 05:52]:
> > Currently, pinctrl-single only allows #pinctrl-cells = 1.
> > 
> > This series will allow pinctrl-single to also support #pinctrl-cells = 2
> > 
> > If "pinctrl-single,pins" has 3 arguments (offset, conf, mux) then
> > pcs_parse_one_pinctrl_entry() does an OR operation on to get the
> > value to store in the register.
> >     
> > To take advantage of #pinctrl-cells = 2, the AM33XX_PADCONF macro in
> > omap.h is modified to keep pin conf and pin mux values separate.
> 
> Hmm to me it looks like the order of the patches is the
> wrong way around here. Don't we need to first change
> pinctrl-single.c, and then only after that update the
> dts? And make sure the pinctrl-single.c change does not
> break anything without changing the dts :)
> 
> Regards,
> 
> Tony

Thanks for pointing this out.

I'll submit new version where:
[PATCH 1/3] pinctrl: single: parse #pinctrl-cells = 2
[PATCH 2/3] ARM: dts: change AM33XX_PADCONF macro separate conf and mux
[PATCH 3/3] ARM: dts: am33xx-l4: change #pinctrl-cells from 1 to 2

-drew
Tony Lindgren June 22, 2020, 4:48 p.m. UTC | #3
* Drew Fustini <drew@beagleboard.org> [200622 16:47]:
> On Mon, Jun 22, 2020 at 09:11:32AM -0700, Tony Lindgren wrote:
> > * Drew Fustini <drew@beagleboard.org> [200618 05:52]:
> > > Currently, pinctrl-single only allows #pinctrl-cells = 1.
> > > 
> > > This series will allow pinctrl-single to also support #pinctrl-cells = 2
> > > 
> > > If "pinctrl-single,pins" has 3 arguments (offset, conf, mux) then
> > > pcs_parse_one_pinctrl_entry() does an OR operation on to get the
> > > value to store in the register.
> > >     
> > > To take advantage of #pinctrl-cells = 2, the AM33XX_PADCONF macro in
> > > omap.h is modified to keep pin conf and pin mux values separate.
> > 
> > Hmm to me it looks like the order of the patches is the
> > wrong way around here. Don't we need to first change
> > pinctrl-single.c, and then only after that update the
> > dts? And make sure the pinctrl-single.c change does not
> > break anything without changing the dts :)
> > 
> > Regards,
> > 
> > Tony
> 
> Thanks for pointing this out.
> 
> I'll submit new version where:
> [PATCH 1/3] pinctrl: single: parse #pinctrl-cells = 2
> [PATCH 2/3] ARM: dts: change AM33XX_PADCONF macro separate conf and mux
> [PATCH 3/3] ARM: dts: am33xx-l4: change #pinctrl-cells from 1 to 2

OK thanks. Otherwise sounds like git bisect will break for booting.

Regards,

Tony