All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iio: humidity: hdc100x: fix IIO_TEMP channel reporting
@ 2016-05-27  2:55 Matt Ranostay
  2016-05-29 18:46 ` Jonathan Cameron
  0 siblings, 1 reply; 4+ messages in thread
From: Matt Ranostay @ 2016-05-27  2:55 UTC (permalink / raw)
  To: linux-iio; +Cc: jic23, Matt Ranostay

IIO_TEMP channel was being incorrectly reported back as Celsius when it
should have been milliCelsius.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
---
 drivers/iio/humidity/hdc100x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/humidity/hdc100x.c b/drivers/iio/humidity/hdc100x.c
index fa47676..7e73c56 100644
--- a/drivers/iio/humidity/hdc100x.c
+++ b/drivers/iio/humidity/hdc100x.c
@@ -211,7 +211,7 @@ static int hdc100x_read_raw(struct iio_dev *indio_dev,
 		return IIO_VAL_INT_PLUS_MICRO;
 	case IIO_CHAN_INFO_SCALE:
 		if (chan->type == IIO_TEMP) {
-			*val = 165;
+			*val = 165000;
 			*val2 = 65536 >> 2;
 			return IIO_VAL_FRACTIONAL;
 		} else {
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-05-30  0:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-27  2:55 [PATCH] iio: humidity: hdc100x: fix IIO_TEMP channel reporting Matt Ranostay
2016-05-29 18:46 ` Jonathan Cameron
2016-05-29 20:33   ` Alison Schofield
2016-05-29 23:59     ` Matt Ranostay

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.