Input: adxl34x - add OF match support
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Thu, 21 May 2015 23:07:37 +0000 (16:07 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 21 May 2015 23:58:02 +0000 (16:58 -0700)
commit3a38958d2477b718d1011fb88c24c4f264ee9700
tree832cafd790b27d0b8c170ba411560d439b054d51
parente465bf6fc55d5ce21fb45a75c3fa613505e6be20
Input: adxl34x - add OF match support

The I2C subsystem can match devices without explicit OF support based on
the part of their compatible property after the comma. However, this
mechanism uses the first compatible value only. For adxl34x OF device
nodes the compatible property will contain the more specific
"adi,adxl345" or "adi,adxl346" value first. This prevents the device
node from being matched with the adxl34x driver.

Fix this by adding an OF match table with an "adi,adxl345" compatible
entry. There's no need to add the "adi,adxl346" entry as the ADXL346 is
backward-compatible with the ADXL345 with differences handled by runtime
detection of the device model.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/misc/adxl34x-i2c.c