diff mbox series

[1/2] arm64: dts: r8a77990-ebisu: Fix adv7482 hexadecimal register address

Message ID 20190216235854.15244-2-niklas.soderlund+renesas@ragnatech.se (mailing list archive)
State Accepted
Delegated to: Simon Horman
Headers show
Series arm64: dts: r8a77990-ebisu: small fixes for VIN | expand

Commit Message

Niklas Söderlund Feb. 16, 2019, 11:58 p.m. UTC
From: Takeshi Kihara <takeshi.kihara.df@renesas.com>

The register address used for the reg property of the adv7482 node in
other Renesas device trees are decimal not hex, change this for Ebisu to
align it with the others.

Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
[Niklas: rewrite commit message]
Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
---
 arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Kieran Bingham Feb. 17, 2019, 10:13 p.m. UTC | #1
Hi Niklas, Takeshi,

On 16/02/2019 23:58, Niklas Söderlund wrote:
> From: Takeshi Kihara <takeshi.kihara.df@renesas.com>
> 
> The register address used for the reg property of the adv7482 node in
> other Renesas device trees are decimal not hex, change this for Ebisu to
> align it with the others.
> 
> Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
> [Niklas: rewrite commit message]
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> ---
>  arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts b/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts
> index 62bdddcbbae7d9e9..23914c2b83965621 100644
> --- a/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts
> +++ b/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts
> @@ -383,7 +383,7 @@
>  		};
>  
>  		port@a {
> -			reg = <0xa>;
> +			reg = <10>;

From the discussions on this before, we converted the port number to be hex.

I really dislike that we have port@a, but reg=<10>;

However as long as the value is written by the DTC as 'ten' and
correctly interpreted as decimal this is still correct.

I guess it doesn't hurt to have a decimal representation as that will
then match the bindings port descriptions. It's a shame this can't be
the 'port@10' for comprehension though.

My only hesitation on providing either an RB/or AB tag here is whether
perhaps we should instead convert the salvator-common to use hex so that
they match that way instead?

--
Regards

Kieran

>  
>  			adv7482_txa: endpoint {
>  				clock-lanes = <0>;
>
Geert Uytterhoeven Feb. 18, 2019, 9:01 a.m. UTC | #2
Hi Kieran,

On Sun, Feb 17, 2019 at 11:13 PM Kieran Bingham
<kieran.bingham@ideasonboard.com> wrote:
> On 16/02/2019 23:58, Niklas Söderlund wrote:
> > From: Takeshi Kihara <takeshi.kihara.df@renesas.com>
> >
> > The register address used for the reg property of the adv7482 node in
> > other Renesas device trees are decimal not hex, change this for Ebisu to
> > align it with the others.
> >
> > Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
> > [Niklas: rewrite commit message]
> > Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> > ---
> >  arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts b/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts
> > index 62bdddcbbae7d9e9..23914c2b83965621 100644
> > --- a/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts
> > +++ b/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts
> > @@ -383,7 +383,7 @@
> >               };
> >
> >               port@a {
> > -                     reg = <0xa>;
> > +                     reg = <10>;
>
> From the discussions on this before, we converted the port number to be hex.
>
> I really dislike that we have port@a, but reg=<10>;
>
> However as long as the value is written by the DTC as 'ten' and
> correctly interpreted as decimal this is still correct.
>
> I guess it doesn't hurt to have a decimal representation as that will
> then match the bindings port descriptions. It's a shame this can't be
> the 'port@10' for comprehension though.
>
> My only hesitation on providing either an RB/or AB tag here is whether
> perhaps we should instead convert the salvator-common to use hex so that
> they match that way instead?

(More rationale, which may be considered bikeshedding ;-)

I believe we tend to use decimal for small numbers, and hex for large numbers.
Exceptions are values where the meaning of the individual bits is important,
and hex is thus more suitable (e.g. rohm,ddr-backup-power = <0xf>).

Gr{oetje,eeting}s,

                        Geert
Kieran Bingham Feb. 18, 2019, 11:34 a.m. UTC | #3
Hi Geert,

On 18/02/2019 09:01, Geert Uytterhoeven wrote:
> Hi Kieran,
> 
> On Sun, Feb 17, 2019 at 11:13 PM Kieran Bingham
> <kieran.bingham@ideasonboard.com> wrote:
>> On 16/02/2019 23:58, Niklas Söderlund wrote:
>>> From: Takeshi Kihara <takeshi.kihara.df@renesas.com>
>>>
>>> The register address used for the reg property of the adv7482 node in
>>> other Renesas device trees are decimal not hex, change this for Ebisu to
>>> align it with the others.
>>>
>>> Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
>>> [Niklas: rewrite commit message]
>>> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
>>> ---
>>>  arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts b/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts
>>> index 62bdddcbbae7d9e9..23914c2b83965621 100644
>>> --- a/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts
>>> +++ b/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts
>>> @@ -383,7 +383,7 @@
>>>               };
>>>
>>>               port@a {
>>> -                     reg = <0xa>;
>>> +                     reg = <10>;
>>
>> From the discussions on this before, we converted the port number to be hex.
>>
>> I really dislike that we have port@a, but reg=<10>;
>>
>> However as long as the value is written by the DTC as 'ten' and
>> correctly interpreted as decimal this is still correct.
>>
>> I guess it doesn't hurt to have a decimal representation as that will
>> then match the bindings port descriptions. It's a shame this can't be
>> the 'port@10' for comprehension though.
>>
>> My only hesitation on providing either an RB/or AB tag here is whether
>> perhaps we should instead convert the salvator-common to use hex so that
>> they match that way instead?
> 
> (More rationale, which may be considered bikeshedding ;-)

All input here is helpful :)


> I believe we tend to use decimal for small numbers, and hex for large numbers.
> Exceptions are values where the meaning of the individual bits is important,
> and hex is thus more suitable (e.g. rohm,ddr-backup-power = <0xf>).


I believe without the 0x prefix in the reg <> the value is taken as
decimal, so keeping decimal will still function correctly.

I think my issue only stems from the fact that the @N value is 'hex'
without the prefix which causes the difference.

I'll stop fussing over this. The value is interpreted correctly, and as
I said above - having a place where the port number is listed in decimal
helps to match to the bindings table. It's just not in the place I'd
like it to be - but I have no control over that.

So, lets get this patch in and at least unify the current users ...

Acked-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>


> Gr{oetje,eeting}s,
> 
>                         Geert
>
Simon Horman Feb. 25, 2019, 10:09 a.m. UTC | #4
On Mon, Feb 18, 2019 at 11:34:13AM +0000, Kieran Bingham wrote:
> Hi Geert,
> 
> On 18/02/2019 09:01, Geert Uytterhoeven wrote:
> > Hi Kieran,
> > 
> > On Sun, Feb 17, 2019 at 11:13 PM Kieran Bingham
> > <kieran.bingham@ideasonboard.com> wrote:
> >> On 16/02/2019 23:58, Niklas Söderlund wrote:
> >>> From: Takeshi Kihara <takeshi.kihara.df@renesas.com>
> >>>
> >>> The register address used for the reg property of the adv7482 node in
> >>> other Renesas device trees are decimal not hex, change this for Ebisu to
> >>> align it with the others.
> >>>
> >>> Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
> >>> [Niklas: rewrite commit message]
> >>> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> >>> ---
> >>>  arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts | 2 +-
> >>>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>>
> >>> diff --git a/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts b/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts
> >>> index 62bdddcbbae7d9e9..23914c2b83965621 100644
> >>> --- a/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts
> >>> +++ b/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts
> >>> @@ -383,7 +383,7 @@
> >>>               };
> >>>
> >>>               port@a {
> >>> -                     reg = <0xa>;
> >>> +                     reg = <10>;
> >>
> >> From the discussions on this before, we converted the port number to be hex.
> >>
> >> I really dislike that we have port@a, but reg=<10>;
> >>
> >> However as long as the value is written by the DTC as 'ten' and
> >> correctly interpreted as decimal this is still correct.
> >>
> >> I guess it doesn't hurt to have a decimal representation as that will
> >> then match the bindings port descriptions. It's a shame this can't be
> >> the 'port@10' for comprehension though.
> >>
> >> My only hesitation on providing either an RB/or AB tag here is whether
> >> perhaps we should instead convert the salvator-common to use hex so that
> >> they match that way instead?
> > 
> > (More rationale, which may be considered bikeshedding ;-)
> 
> All input here is helpful :)
> 
> 
> > I believe we tend to use decimal for small numbers, and hex for large numbers.
> > Exceptions are values where the meaning of the individual bits is important,
> > and hex is thus more suitable (e.g. rohm,ddr-backup-power = <0xf>).
> 
> 
> I believe without the 0x prefix in the reg <> the value is taken as
> decimal, so keeping decimal will still function correctly.
> 
> I think my issue only stems from the fact that the @N value is 'hex'
> without the prefix which causes the difference.
> 
> I'll stop fussing over this. The value is interpreted correctly, and as
> I said above - having a place where the port number is listed in decimal
> helps to match to the bindings table. It's just not in the place I'd
> like it to be - but I have no control over that.
> 
> So, lets get this patch in and at least unify the current users ...
> 
> Acked-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>

Thanks, applied with the subject prefix updated to

"arm64: dts: renesas: ebisu:"
Niklas Söderlund March 6, 2019, 11:47 a.m. UTC | #5
Hi Simon,

On 2019-02-25 11:09:54 +0100, Simon Horman wrote:
[snip]
> Thanks, applied with the subject prefix updated to
> 
> "arm64: dts: renesas: ebisu:"

You took patch 1/2 from this series but not 2/2. Was that intentional?
Simon Horman March 6, 2019, 1:04 p.m. UTC | #6
On Wed, Mar 06, 2019 at 12:47:36PM +0100, Niklas Söderlund wrote:
> Hi Simon,
> 
> On 2019-02-25 11:09:54 +0100, Simon Horman wrote:
> [snip]
> > Thanks, applied with the subject prefix updated to
> > 
> > "arm64: dts: renesas: ebisu:"
> 
> You took patch 1/2 from this series but not 2/2. Was that intentional?

Thanks, that was an oversight. I now have 2/2 too.
Niklas Söderlund March 6, 2019, 1:10 p.m. UTC | #7
On 2019-03-06 14:04:35 +0100, Simon Horman wrote:
> On Wed, Mar 06, 2019 at 12:47:36PM +0100, Niklas Söderlund wrote:
> > Hi Simon,
> > 
> > On 2019-02-25 11:09:54 +0100, Simon Horman wrote:
> > [snip]
> > > Thanks, applied with the subject prefix updated to
> > > 
> > > "arm64: dts: renesas: ebisu:"
> > 
> > You took patch 1/2 from this series but not 2/2. Was that intentional?
> 
> Thanks, that was an oversight. I now have 2/2 too.

Thanks!
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts b/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts
index 62bdddcbbae7d9e9..23914c2b83965621 100644
--- a/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts
+++ b/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts
@@ -383,7 +383,7 @@ 
 		};
 
 		port@a {
-			reg = <0xa>;
+			reg = <10>;
 
 			adv7482_txa: endpoint {
 				clock-lanes = <0>;