Skip to contentSkip to conversation

hex number case in dts files.

DISCUSSION David Brown 4 participants 6 messages Feb 9, 2012 – Feb 10, 2012

lore
Share & tools
lore
#0 lore raw

I've noticed an inconsistency in the case of letters in hex constants in various dts files. The ones that are actually numbers probably don't really matter, the but the node names are case sensitive strings, and in some sense do matter.

I ask because some people I've spoken with internally seem to have strong opinions about what case hex constants should be, and it'd be nice to be able to have some guideline about this. Historically, I've always seen DT hex values in lowercase.

Thanks,
David

Signature · 2 lines
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
#1 lore raw
Quoted 10 lines · David Brown

I've noticed an inconsistency in the case of letters in hex constants in various dts files. The ones that are actually numbers probably don't really matter, the but the node names are case sensitive strings, and in some sense do matter.

I ask because some people I've spoken with internally seem to have strong opinions about what case hex constants should be, and it'd be nice to be able to have some guideline about this. Historically, I've always seen DT hex values in lowercase.

Lower case should be used for dts files.

Rob

#2 lore raw
Quoted 6 lines · Rob Herring
Quoted 5 lines · David Brown

I've noticed an inconsistency in the case of letters in hex constants in various dts files. The ones that are actually numbers probably don't really matter, the but the node names are case sensitive strings, and in some sense do matter.

Quoted 7 lines
Quoted 5 lines

I ask because some people I've spoken with internally seem to have strong opinions about what case hex constants should be, and it'd be nice to be able to have some guideline about this. Historically, I've always seen DT hex values in lowercase.

Lower case should be used for dts files.

Yes, the node names should always have the hex done in lower case. I have plans to put more checks in for how reg is encoded into node names, but just need to get time.

Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
#3 lore raw
Quoted 13 lines · David Gibson
Quoted 12 lines · Rob Herring
Quoted 10 lines · David Brown

I've noticed an inconsistency in the case of letters in hex constants in various dts files. The ones that are actually numbers probably don't really matter, the but the node names are case sensitive strings, and in some sense do matter.

I ask because some people I've spoken with internally seem to have strong opinions about what case hex constants should be, and it'd be nice to be able to have some guideline about this. Historically, I've always seen DT hex values in lowercase.

Quoted 5 lines
Quoted 1 line

Lower case should be used for dts files.

Yes, the node names should always have the hex done in lower case. I have plans to put more checks in for how reg is encoded into node names, but just need to get time.

What about number of digits? Should a register at 0x42 be node at 00000042 or node at 42? Again, I'm seeing both.

Thanks,
David

Signature · 2 lines
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
#4 lore raw
Quoted 14 lines · David Brown
Quoted 13 lines · David Gibson
Quoted 12 lines · Rob Herring
Quoted 10 lines · David Brown

I've noticed an inconsistency in the case of letters in hex constants in various dts files. The ones that are actually numbers probably don't really matter, the but the node names are case sensitive strings, and in some sense do matter.

I ask because some people I've spoken with internally seem to have strong opinions about what case hex constants should be, and it'd be nice to be able to have some guideline about this. Historically, I've always seen DT hex values in lowercase.

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

Lower case should be used for dts files.

Yes, the node names should always have the hex done in lower case. I have plans to put more checks in for how reg is encoded into node names, but just need to get time.

What about number of digits? Should a register at 0x42 be node at 00000042 or node at 42? Again, I'm seeing both.

node at 42

Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
#5 lore raw
In reply to David Brown
Quoted 2 lines

What about number of digits? Should a register at 0x42 be node at 00000042 or node at 42? Again, I'm seeing both.

It depends on the binding of the parent node. Most use no leading zeroes except when representing 0 itself.

Segher