* [PATCH] Allow kxtj9 accelerometer driver to work on kxtf9
@ 2012-01-14 0:56 Alexander Tarasikov
0 siblings, 0 replies; only message in thread
From: Alexander Tarasikov @ 2012-01-14 0:56 UTC (permalink / raw)
To: linux-input; +Cc: Alexander Tarasikov
Kionix kxtj9 is a pin- and register-compatible replacement
for the kxtf9 accelerometer. This patch makes the kxtj9 driver
probe routine accept kxtf9. This has been tested briefly on
a kxtf9 accelerometer and seems to report correct results.
Signed-off-by: Alexander Tarasikov <alexander.tarasikov@gmail.com>
---
drivers/input/misc/kxtj9.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/drivers/input/misc/kxtj9.c b/drivers/input/misc/kxtj9.c
index 783597a..c54fe18 100644
--- a/drivers/input/misc/kxtj9.c
+++ b/drivers/input/misc/kxtj9.c
@@ -487,7 +487,10 @@ static int __devinit kxtj9_verify(struct kxtj9_data *tj9)
goto out;
}
- retval = retval != 0x06 ? -EIO : 0;
+ if (retval == 0x6 || retval == 0x1)
+ retval = 0;
+ else
+ retval = -EIO;
out:
kxtj9_device_power_off(tj9);
--
1.7.7.3
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-01-14 0:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-14 0:56 [PATCH] Allow kxtj9 accelerometer driver to work on kxtf9 Alexander Tarasikov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).