[PATCH 2/2] ARM: dts: AM33XX: Add lis331dlh device tree data to am335x-evm

Arnd Bergmann arnd at arndb.de
Fri Sep 14 11:29:57 EDT 2012

On Friday 14 September 2012, AnilKumar, Chimata wrote:
> Small question here, in my v2 version I have specified both
> the compatible names lis3lv02d and lis331dlh is it fine or
> only one is sufficient?
> +static struct of_device_id lis3lv02d_i2c_dt_ids[] = {
> +       { .compatible = "st,lis3lv02d" },
> +       { .compatible = "st,lis331dlh" },
> +       {}
> +};

That's ok. In most cases, people will need the data field to point to a
data structure with the differences between two chips, but not if they are
identical from the software side.
It's also fine if you just list one entry here and put both values as
"compatible" in the device tree, to signify that the device is backwards
compatible with the older variant.


More information about the linux-arm-kernel mailing list