From: Guenter Roeck <linux@roeck-us.net>
To: Fabio Baltieri <fabio.baltieri@gmail.com>,
Jean Delvare <jdelvare@suse.de>
Cc: lm-sensors@lm-sensors.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] hwmon: (ina2xx) Cast to s16 on shunt and current regs
Date: Mon, 09 Jun 2014 07:45:32 -0700 [thread overview]
Message-ID: <5395C88C.5070408@roeck-us.net> (raw)
In-Reply-To: <1402261584-5301-1-git-send-email-fabio.baltieri@gmail.com>
On 06/08/2014 02:06 PM, Fabio Baltieri wrote:
> All devices supported by ina2xx are bidirectional and reports the
> measured shunt voltage and power values as a signed 16 bit, but the
> current driver implementation caches all registers as u16, leading to an
> incorrect sign extension when reporting to the userspace in
> ina2xx_get_value().
>
> This patch fixes the problem by casting the signed registers to s16.
> Tested on an INA219.
>
> Signed-off-by: Fabio Baltieri <fabio.baltieri@gmail.com>
Applied.
Thanks,
Guenter
prev parent reply other threads:[~2014-06-09 14:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-08 21:06 Fabio Baltieri
2014-06-09 14:45 ` Guenter Roeck [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=5395C88C.5070408@roeck-us.net \
--to=linux@roeck-us.net \
--cc=fabio.baltieri@gmail.com \
--cc=jdelvare@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=lm-sensors@lm-sensors.org \
/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
Powered by JetHome