From: Lee Jones <lee.jones@linaro.org>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
linux-input@vger.kernel.org, arnd@arndb.de,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linus.walleij@stericsson.com
Subject: Re: [PATCH 3/3] Input: bu21013_ts - Add support for Device Tree booting
Date: Thu, 29 Nov 2012 10:08:08 +0000 [thread overview]
Message-ID: <20121129100808.GW2013@gmail.com> (raw)
In-Reply-To: <20121128163105.GA28698@sirena.org.uk>
On Wed, 28 Nov 2012, Mark Brown wrote:
> On Wed, Nov 28, 2012 at 08:57:31AM +0000, Lee Jones wrote:
>
> > > I applied these 3 patches, but for DT we also need to specify compatible
> > > ID and set up of_match_table pointer.
>
> > Why do you need a compatible string?
>
> The I2C subsystem guesses at a compatible string by default but it's
> much better to explicitly set one as conflicts do arise from time to
> time (eg, Wolfson parts are called WMxxxx but the WM prefix is also used
> by at least WonderMedia).
It uses the exact device name, rather than guessing. I don't think
you're allowed to have duplicate device names in the system, or there
would be clashes at registration time.
The system is the same for platform data and DT alike.
In platform data we have:
> struct i2c_board_info mop500_i2c0_devices_stuib[] = {
> {
> .type = "bu21013_tp",
> .addr = 0x5C,
> }
> };
Where (i2c_client)client->name is populated by 'type', which should
then match 'driver.name' exactly.
And in DT we have:
bu21013_tp@0x5c {
compatible = "rhom,bu21013_tp";
reg = <0x5c>;
};
Where (i2c_client)client->name is populated by of_modalias_node(), which
uses the compatible string in the DTS(I) file and takes off the
'<vendor>,' which should then match 'driver.name' exactly.
Hence, there should be no need to have a compatible string in any i2c
driver registration information.
--
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
next prev parent reply other threads:[~2012-11-29 10:08 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1354021990-16978-1-git-send-email-lee.jones@linaro.org>
2012-11-27 13:13 ` [PATCH 1/3] Input: bu21013_ts - Request a regulator that actually exists Lee Jones
2012-11-27 13:34 ` Mark Brown
2012-11-27 14:34 ` Lee Jones
2012-11-27 13:13 ` [PATCH 2/3] Input: bu21013_ts - Move GPIO init and exit functions into the driver Lee Jones
2012-11-27 13:13 ` [PATCH 3/3] Input: bu21013_ts - Add support for Device Tree booting Lee Jones
2012-11-28 7:03 ` Dmitry Torokhov
2012-11-28 8:57 ` Lee Jones
2012-11-28 16:31 ` Mark Brown
2012-11-29 10:08 ` Lee Jones [this message]
2012-11-29 11:24 ` Mark Brown
2012-11-29 12:00 ` Lee Jones
2012-11-29 15:15 ` Mark Brown
2012-11-28 8:57 ` Lee Jones
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=20121129100808.GW2013@gmail.com \
--to=lee.jones@linaro.org \
--cc=arnd@arndb.de \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linus.walleij@stericsson.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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).