From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] of: Add a reg-names property to name reg entries
Date: Wed, 26 Oct 2011 14:23:32 +0200 [thread overview]
Message-ID: <20111026122332.GM4429@atomide.com> (raw)
In-Reply-To: <FD4B90D7-4B26-42C2-8CF9-7AA9971BCBEB@kernel.crashing.org>
* Segher Boessenkool <segher@kernel.crashing.org> [111026 05:22]:
> >>>>What problem does any of this solve? The device binding for the
> >>>>"mcasp" device will have to describe the possible "reg-names", and
> >>>>what those mean; but the binding already has to describe its "reg"
> >>>>property anyway.
> >>>
> >>>What this solve is the ability to use the
> >>>platform_get_resource_byname directly to retrieve the proper
> >>>register base address.
> >>
> >>You do not have to put it in the device tree for that, the device
> >>driver can implement this itself if it cares.
> >
> >???
> >
> >The driver is the user of that name, so it has to be populated
> >before into the resource during device creation.
>
> It can be as simple as
>
> #define FOO_REG_INDEX 0
> #define BAR_REG_INDEX 1
>
> but you can use C strings if you want to.
Fox pin muxing, we really want to use the actual signal names in
the drivers. The define example above would means mapping the defines
multiple times depending which packaging you're using.
There can be several packages for each SoC, where the pins wired up
whichever way. For example, for a serial driver to use UART RX pin,
the driver can just request a signal called "uart_tx", which is the
actual hardware name for the signal inside the SoC.
Using the signal names also makes it easier to make drivers to support
the same device IP blocks across multiple SoC as the signal name most
likely is the same as what the device IP block is using.
Regards,
Tony
next prev parent reply other threads:[~2011-10-26 12:23 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-24 15:54 [PATCH] of: Add a reg-names property to name reg entries Benoit Cousson
2011-10-24 22:19 ` Grant Likely
2011-10-24 22:56 ` Cousson, Benoit
2011-10-25 4:49 ` Grant Likely
2011-10-25 8:26 ` Tony Lindgren
2011-10-25 10:29 ` Segher Boessenkool
2011-10-25 13:40 ` Cousson, Benoit
2011-10-25 14:17 ` Segher Boessenkool
2011-10-25 16:10 ` Cousson, Benoit
2011-10-26 3:57 ` Segher Boessenkool
2011-10-26 12:23 ` Tony Lindgren [this message]
2011-10-26 17:40 ` Cousson, Benoit
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=20111026122332.GM4429@atomide.com \
--to=tony@atomide.com \
--cc=linux-arm-kernel@lists.infradead.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 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).