lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 29 Nov 2012 10:08:08 +0000
From:	Lee Jones <lee.jones@...aro.org>
To:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
Cc:	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	linux-input@...r.kernel.org, arnd@...db.de,
	linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	linus.walleij@...ricsson.com
Subject: Re: [PATCH 3/3] Input: bu21013_ts - Add support for Device Tree
 booting

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@...c {
        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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ