Re: [PATCH] hwmon: (scpi) Add slope and offset to SCP sensor readings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 1, 2017 at 6:56 PM, Guenter Roeck <linux@xxxxxxxxxxxx> wrote:
> On Wed, Mar 01, 2017 at 04:57:00PM +0000, Punit Agrawal wrote:

>> Another way to fix this would be to add optional properties to the scpi
>> sensors binding and use them instead. This could then be used to fixup
>> values reported to both thermal and hwmon.
>>
>
> Yes, this would be much more appropriate.

What about something like:

sensor-coefficients = <x1 y1 z1>,
                                  <x2 y2 z2>,
                                  ...;

Where in general `x` is the sensor-id, `y` the slope and `z` the
offset for the sensor reading.
So the reported reading to hwmon (and thermal for temperature) for
sensor with id `x1` is `y1 * val + z1`, the same for sensor with id x2
and so on for all the sensors in the array.

-- 
Carlo Caione
--
To unsubscribe from this list: send the line "unsubscribe linux-hwmon" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux