* IIO: ak8975: Why adding OF compatible string without vendor prefix?
@ 2015-08-31 4:41 Axel Lin
2015-08-31 15:05 ` Jonathan Cameron
0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2015-08-31 4:41 UTC (permalink / raw)
To: linux-iio
Cc: Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
Peter Meerwald, Laxman Dewangan, Olof Johansson
Hi,
I just found the ak8975_of_match table has compatible string without vendor
prefix.
static const struct of_device_id ak8975_of_match[] = {
{ .compatible = "asahi-kasei,ak8975", },
{ .compatible = "ak8975", },
{ .compatible = "asahi-kasei,ak8963", },
{ .compatible = "ak8963", },
{ .compatible = "asahi-kasei,ak09911", },
{ .compatible = "ak09911", },
{ .compatible = "asahi-kasei,ak09912", },
{ .compatible = "ak09912", },
{}
};
This seems unusual, just curious why below compatible strings are required?
{ .compatible = "ak8975", },
{ .compatible = "ak8963", },
{ .compatible = "ak09911", },
{ .compatible = "ak09912", },
Regards,
Axel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: IIO: ak8975: Why adding OF compatible string without vendor prefix?
2015-08-31 4:41 IIO: ak8975: Why adding OF compatible string without vendor prefix? Axel Lin
@ 2015-08-31 15:05 ` Jonathan Cameron
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2015-08-31 15:05 UTC (permalink / raw)
To: Axel Lin, linux-iio
Cc: Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald,
Laxman Dewangan, Olof Johansson
On 31/08/15 05:41, Axel Lin wrote:
> Hi,
> I just found the ak8975_of_match table has compatible string without vendor
> prefix.
>
> static const struct of_device_id ak8975_of_match[] = {
> { .compatible = "asahi-kasei,ak8975", },
> { .compatible = "ak8975", },
> { .compatible = "asahi-kasei,ak8963", },
> { .compatible = "ak8963", },
> { .compatible = "asahi-kasei,ak09911", },
> { .compatible = "ak09911", },
> { .compatible = "asahi-kasei,ak09912", },
> { .compatible = "ak09912", },
> {}
> };
>
> This seems unusual, just curious why below compatible strings are required?
> { .compatible = "ak8975", },
> { .compatible = "ak8963", },
> { .compatible = "ak09911", },
> { .compatible = "ak09912", },
>
> Regards,
> Axel
>
This is an historical artefact. I2C (and for that matter SPI)
subsystems handled device tree registration in their cores.
Unfortunately they did it by matching against the registered
driver names and those don't include vendors.
This is still being unwound, but the upshot is that we have
boards with device trees out in the wild using the version without
a vendor string. Hence for backwards compatibility, both need
to be in the table.
Jonathan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-08-31 15:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-31 4:41 IIO: ak8975: Why adding OF compatible string without vendor prefix? Axel Lin
2015-08-31 15:05 ` Jonathan Cameron
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).