Input: adxl34x - add support for adxl343

Started by Steven Joruk on Sep 16, 2017 · 2 messages from 2 authors · Last reply Sep 20, 2017

Subsystems (3)

Maintainers (3)

STALE3353d

open the first message on its own page

Message details and related content
The 343 has identical behaviour to the 345, other than having a
different ID.

Signed-off-by: Steven Joruk <redacted>
---
 drivers/input/misc/adxl34x.c | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/drivers/input/misc/adxl34x.c b/drivers/input/misc/adxl34x.c
index 2b2d02f408bb..fe76878c5c76 100644
--- a/drivers/input/misc/adxl34x.c
+++ b/drivers/input/misc/adxl34x.c
@@ -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;
-- 
2.14.1
Message details and related content
On Sat, Sep 16, 2017 at 12:05:17PM +0100, Steven Joruk wrote:
The 343 has identical behaviour to the 345, other than having a
different ID.

Signed-off-by: Steven Joruk <redacted>
Applied, thank you.
quoted hunk
---
 drivers/input/misc/adxl34x.c | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/drivers/input/misc/adxl34x.c b/drivers/input/misc/adxl34x.c
index 2b2d02f408bb..fe76878c5c76 100644
--- a/drivers/input/misc/adxl34x.c
+++ b/drivers/input/misc/adxl34x.c
@@ -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;
-- 
2.14.1
-- 
Dmitry
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help