]> 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)
commita7bb97e62a6e604e9cc71e216f11c69304bac197
tree832cafd790b27d0b8c170ba411560d439b054d51
parent4e941df1e26c2e8b74ffa08acded709e9f23c0a1
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