From: Arnd Bergmann <arnd@arndb.de>
To: linux-arm-kernel@lists.infradead.org
Cc: Andrew Lunn <andrew@lunn.ch>, Ian Campbell <ijc@hellion.org.uk>,
devicetree@vger.kernel.org, linux-input@vger.kernel.org,
Jason Cooper <jason@lakedaemon.net>,
Sebastian Hesselbarth <sebastian.hesselbarth@googlemail.com>,
Gregory Clement <gregory.clement@free-electrons.com>,
tbm@cyrius.com
Subject: Re: [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: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1389048557-16364-1-git-send-email-andrew@lunn.ch>
[not found] ` <1389174517.12612.87.camel@kazak.uk.xensource.com>
2014-01-11 21:04 ` [PATCH] ARM: Kirkwood: Add DT description of QNAP 419 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
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=andrew@lunn.ch \
--cc=devicetree@vger.kernel.org \
--cc=gregory.clement@free-electrons.com \
--cc=ijc@hellion.org.uk \
--cc=jason@lakedaemon.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-input@vger.kernel.org \
--cc=sebastian.hesselbarth@googlemail.com \
--cc=tbm@cyrius.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).