lkml.org 
[lkml]   [2021]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2 2/2] iio: temperature: add driver support for ti tmp117
On Fri, Apr 2, 2021 at 11:14 AM Lars-Peter Clausen <lars@metafoo.de> wrote:
>
> On 4/1/21 11:36 AM, Andy Shevchenko wrote:
> > [...]
> >> + 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 ;)

Actually, besides April fool's day, this can have a value if 1000 is
defined as mC _PER_uC or so.
Oh, wait. We have it already.

#define MILLIDEGREE_PER_DEGREE 1000





--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2021-04-03 15:53    [W:0.110 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site