Skip to contentSkip to conversation

patch "iio: proximity: sx9500: Fix proximity value" added to staging-linus

PATCH [email protected] 1 participant 1 message Jul 13, 2015

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

iio: proximity: sx9500: Fix proximity value

to my staging git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
in the staging-linus branch.

The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)

The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.

If you have any questions about this process, please let me know.

Quoted 1 line

From fd1883f07cb434707e50c4c9a16e3ed4b3a5e74f Mon Sep 17 00:00:00 2001

From: Daniel Baluta <[email protected]>
Date: Thu, 11 Jun 2015 18:49:34 +0300
Subject: iio: proximity: sx9500: Fix proximity value

Because of the ABI confusion proximity value exposed by SX9500 was inverted.

---
 drivers/iio/proximity/sx9500.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/proximity/sx9500.c +1 -1
index fa40f6d0ca39..bd26a484abcc 100644
@@ -206,7 +206,7 @@ static int sx9500_read_proximity(struct sx9500_data *data,
 	if (ret < 0)
 		return ret;
 
-	*val = 32767 - (s16)be16_to_cpu(regval);
+	*val = be16_to_cpu(regval);
 
 	return IIO_VAL_INT;
 }
Signature · 1 line
2.4.5