Input: adxl34x - add support for adxl343
PATCH 1/1 Input: adxl34x - add support for adxl343
The 343 has identical behaviour to the 345, other than having a different ID.
Signed-off-by Steven Joruk <[email protected]>
--- drivers/input/misc/adxl34x.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/input/misc/adxl34x.c +4 -0
@@ -57,6 +57,7 @@#define ORIENT 0x3C/* R Orientation status */ /* DEVIDs */ +#define ID_ADXL343 0xFB#define ID_ADXL345 0xE5#define ID_ADXL346 0xE6
@@ -734,6 +735,9 @@ struct adxl34x *adxl34x_probe(struct device *dev, int irq, revid =AC_READ (ac,DEVID );switch (revid) { +case ID_ADXL343 : + ac->model =343 ; +break ;case ID_ADXL345 : ac->model =345 ;break ;
Signature · 1 line
2.14.1
Quoted 4 lines · Steven Joruk
The 343 has identical behaviour to the 345, other than having a different ID.
Signed-off-by Steven Joruk <[email protected]>
Applied, thank you.
Quoted 29 lines
--- drivers/input/misc/adxl34x.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/input/misc/adxl34x.c +4
-0@@ -57,6 +57,7 @@#define ORIENT 0x3C/* R Orientation status */ /* DEVIDs */ +#define ID_ADXL343 0xFB#define ID_ADXL345 0xE5#define ID_ADXL346 0xE6@@ -734,6 +735,9 @@ struct adxl34x *adxl34x_probe(struct device *dev, int irq, revid =AC_READ (ac,DEVID );switch (revid) { +case ID_ADXL343 : + ac->model =343 ; +break ;case ID_ADXL345 : ac->model =345 ;break ;Signature · 1 line
2.14.1
Signature · 1 line
Dmitry