Skip to contentSkip to conversation

Endianness of multi-bit 'gpios' property?

DISCUSSION Timur Tabi 1 participant 1 message Aug 7, 2012

lore
Share & tools
lore

Timur Tabi

author
#0 lore raw

When a 'gpios' property defines multiple GPIO pins, is there any kind of expectation on the endian order of those pins? For example, take this:

	gpios = <&gpio0 0 0
		 &gpio0 1 0>;

If I write a value of "2" to this GPIO pair, should I expect a value of 1 to be written to pin 0 and a value of 0 written to pin 1 (i.e. big-endian), or the other way around?

I'm seeing some code that interprets the bits as big-endian, and some code that interprets it as little-endian.

Signature · 2 lines
Timur Tabi
Linux kernel developer at Freescale