From: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Lucas Tanure <tanureal@opensource.wolfsonmicro.com>,
<linux-hwmon@vger.kernel.org>, <patches@opensource.cirrus.com>
Subject: Re: How to add nano precision measurement to hwmon
Date: Mon, 20 Feb 2017 15:07:43 +0000 [thread overview]
Message-ID: <20170220150743.GA2742@localhost.localdomain> (raw)
In-Reply-To: <e99ea167-3138-b555-ed62-b3a7b233c7ae@roeck-us.net>
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
prev parent reply other threads:[~2017-02-20 15:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-17 16:07 How to add nano precision measurement to hwmon Lucas Tanure
2017-02-19 2:10 ` Guenter Roeck
2017-02-19 8:53 ` Lucas Tanure
2017-02-19 16:33 ` Guenter Roeck
2017-02-20 15:07 ` Charles Keepax [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170220150743.GA2742@localhost.localdomain \
--to=ckeepax@opensource.wolfsonmicro.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=patches@opensource.cirrus.com \
--cc=tanureal@opensource.wolfsonmicro.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox