lkml.org 
[lkml]   [2014]   [Dec]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v5 1/3] hwmon: ina2xx: make shunt resistance configurable at run-time
From
2014-12-10 15:20 GMT+01:00 Guenter Roeck <linux@roeck-us.net>:
>> + case INA2XX_CALIBRATION:
>> + if (data->regs[reg] == 0)
>> + val = 0;
>> + else
>> + val = data->config->calibration_factor
>> + / data->regs[reg];
>> + break;
>
>
> This doesn't really make sense. What you want to show is rshunt, not the
> above.
> I think it would be better to write a separate show function to display it.

Hi Guenter,

this is the only way to display values read from the chip. It also
tells the user what the actual programmed value is. In fact it was
your suggestion (https://lkml.org/lkml/2014/11/30/233) and I agree
that it's a better alternative. Are you sure you don't want it done
this way?

Bart


\
 
 \ /
  Last update: 2014-12-10 18:21    [W:0.062 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site