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 <redacted>
---
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