]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitb7d95e753ae7eda6beac2d6ca272442121e1eab8
tree832cafd790b27d0b8c170ba411560d439b054d51
parentc23c7ffea4705b2e92b39d89272ac72cf2dd6207
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