From: Timur Tabi <timur@freescale.com>
To: <devicetree-discuss@lists.ozlabs.org>, <linuxppc-dev@lists.ozlabs.org>
Subject: Endianness of multi-bit 'gpios' property?
Date: Tue, 7 Aug 2012 15:39:22 -0500 [thread overview]
Message-ID: <50217CFA.7040708@freescale.com> (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.
--
Timur Tabi
Linux kernel developer at Freescale
WARNING: multiple messages have this Message-ID (diff)
From: Timur Tabi <timur-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
To: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
Subject: Endianness of multi-bit 'gpios' property?
Date: Tue, 7 Aug 2012 15:39:22 -0500 [thread overview]
Message-ID: <50217CFA.7040708@freescale.com> (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.
--
Timur Tabi
Linux kernel developer at Freescale
next reply other threads:[~2012-08-07 20:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-07 20:39 Timur Tabi [this message]
2012-08-07 20:39 ` Endianness of multi-bit 'gpios' property? Timur Tabi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50217CFA.7040708@freescale.com \
--to=timur@freescale.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=linuxppc-dev@lists.ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.