From: Grant Likely <grant.likely@secretlab.ca>
To: Rob Herring <robherring2@gmail.com>
Cc: devicetree-discuss@lists.ozlabs.org,
linux-kernel@vger.kernel.org,
Rob Herring <rob.herring@calxeda.com>
Subject: Re: [PATCH] dt: add of_get_property_value32 helper function
Date: Thu, 23 Jun 2011 14:12:17 -0600 [thread overview]
Message-ID: <BANLkTi=5Pbg6x3rf-4Z3QxbUnaKddad3Zw@mail.gmail.com> (raw)
In-Reply-To: <1308847113-5953-1-git-send-email-robherring2@gmail.com>
On Thu, Jun 23, 2011 at 10:38 AM, Rob Herring <robherring2@gmail.com> wrote:
> From: Rob Herring <rob.herring@calxeda.com>
>
> A common use of of_get_property in driver is to just get a 32-bit integer
> value, but the interface is a bit complicated in that case. Add a helper
> function that just fills in the value.
Hey Rob,
I already asked Thomas Abraham to write a patch that does exactly
this. He's already posted his first draft to the list. His version
also covers u64 and strings, so I'm going to let him respin his
version and pick that one up.
> Grant,
>
> I noticed most callers of of_get_property don't do be32_to_cpup on the
> returned pointer. Most instances appear to be powerpc only drivers, but
> should of_get_property return ptr be __be32?
No. Not all properties contain cell values. Having of_get_property
return void* is the correct behaviour.
g.
prev parent reply other threads:[~2011-06-23 20:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-23 16:38 [PATCH] dt: add of_get_property_value32 helper function Rob Herring
2011-06-23 20:12 ` Grant Likely [this message]
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='BANLkTi=5Pbg6x3rf-4Z3QxbUnaKddad3Zw@mail.gmail.com' \
--to=grant.likely@secretlab.ca \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rob.herring@calxeda.com \
--cc=robherring2@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).