From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: Kirkwood: Add DT description of QNAP 419
Date: Wed, 15 Jan 2014 17:36:45 +0100 [thread overview]
Message-ID: <201401151736.46280.arnd@arndb.de> (raw)
In-Reply-To: <20140111210443.GT9681@lunn.ch>
On Saturday 11 January 2014, Andrew Lunn wrote:
> The id of -1 causes platform_device_add() to set the device name to
> plain "gpio-keys".
>
> When using DT, the device name is created by the function
> of_device_make_bus_id(). It has the following comment:
>
> * This routine will first try using either the dcr-reg or the reg property
> * value to derive a unique name. As a last resort it will use the node
> * name followed by a unique number.
>
> Since the gpio_keys node does not have a reg properties, it gets a
> unique number appended to it. We end up with the device name
> "gpio_keys.3"
>
> So as it stands, it does not appear i can make the DT system use the
> same device name as a board system.
>
> But i'm also a little bit concerned by the "unique number" and this
> ending up in /dev/input/by-path/platform-gpio_keys.3-event. Is this
> path supposed to be stable? This unique number is not stable. An
> unwitting change to the DT could cause its value to change. Do we need
> to make it stable?
>
One possibility would be to create an artificial bus in DT for all
gpio-keys devices, use #address-cells=<1> and #size-cells=<0>
for it, and give each device a unique reg property. Not sure if that
would be considered an elegant solution though.
Arnd
next prev parent reply other threads:[~2014-01-15 16:36 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-06 22:49 [PATCH] ARM: Kirkwood: Add DT description of QNAP 419 Andrew Lunn
2014-01-08 9:48 ` Ian Campbell
2014-01-08 15:59 ` Andrew Lunn
2014-01-11 21:04 ` Andrew Lunn
2014-01-15 16:36 ` Arnd Bergmann [this message]
2014-01-15 17:45 ` Andrew Lunn
2014-01-15 18:20 ` Arnd Bergmann
2014-01-14 0:39 ` Jason Cooper
2014-01-14 8:15 ` Ian Campbell
2014-01-14 0:48 ` Jason Cooper
2014-01-14 9:15 ` Andrew Lunn
2014-01-14 13:00 ` Jason Cooper
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=201401151736.46280.arnd@arndb.de \
--to=arnd@arndb.de \
--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).