Re: How to add nano precision measurement to hwmon

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

 



On Sun, Feb 19, 2017 at 08:33:52AM -0800, Guenter Roeck wrote:
> On 02/19/2017 12:53 AM, Lucas Tanure wrote:
> >On 19/02/2017 02:10, Guenter Roeck wrote:
> >>Hi Lucas,
> >>
> >>On 02/17/2017 08:07 AM, Lucas Tanure wrote:
> >Hi Guenter,
> >
> >You don't see any option to expose the 32bit float to user space ?
> >I would rather not deal with float conversion inside the kernel, as the numbers become too large to deal and I lose precision.
> >
> I'd rather not have to deal with one of many float formats in a kernel ABI.
> After all, an ABI is expected to convert from internal formats to standardized
> formats.
> 
> Besides, u32 can report ~4 A in nano-Ampere, and u64 can report 18,446,744,073 A
> in nano-Ampere, so I am not entirely sure I can follow your argument about
> loosing precision.
> 
> Do you plan to submit your driver upstream ? Maybe it would help to see the code.

I have to say I think I agree with Guenter here exposing random binary
stuff in sysfs is not nice and if the user side stuff can actually
be configured to correctly handle us reporting nA that seems like a
no-brainer.

We do intend to upstream the driver, there is some support for the
device in general that I need to upstream first, then Lucas can send
up the hwmon stuff.

Thanks,
Charles
--
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