How to add nano precision measurement to hwmon

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

 



Hi,

We have here in our company an internal hardware platform for our linux development that can measure current in a few circuits with nanoamps precision. The measured values are exposed by a 32bit register that must read as a 32bit float.

If we follow the hwmon sysfs interface we loss precision converting to milliamps, where the final value exposed is zero.

Example :
Measure 291nA becomes 0mA under sysfs curr1_input

The best solution for me would be a file in sysfs that I could just expose the float from my register (like curr1_input_float), this solution has two benefits for me:

- I wouldn't need to convert my internal float to int
- This would give the best precision that I can have from my hardware

The value could be exposed as a 32bit hex string, like 0x349c3abc.

So, how should I proceed with this ?

Thanks

Lucas Tanure
--
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