Thread (12 messages) 12 messages, 5 authors, 2021-04-03

Re: [PATCH v2 2/2] iio: temperature: add driver support for ti tmp117

From: Lars-Peter Clausen <lars@metafoo.de>
Date: 2021-04-02 08:14:56
Also in: linux-iio, lkml

On 4/1/21 11:36 AM, Andy Shevchenko wrote:
[...]
quoted
+       case IIO_CHAN_INFO_SCALE:
+               /* Conversion from 10s of uC to mC
+                * as IIO reports temperature in mC
+                */
+               *val = TMP117_RESOLUTION_10UC / 10000;
+               *val2 = (TMP117_RESOLUTION_10UC % 10000) * 100;
+               return IIO_VAL_INT_PLUS_MICRO;
You use 10000 many times, can you give it an appropriate name (via #define)?
#define TENTHOUSAND 10000 ;)

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help