From: Hans de Goede <j.w.r.degoede@hhs.nl>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [RFC v3] [PATCH] hwmon: Add LTC4245 driver
Date: Fri, 17 Oct 2008 06:27:00 +0000 [thread overview]
Message-ID: <48F83034.2030901@hhs.nl> (raw)
In-Reply-To: <20081015212930.GA21854@ovro.caltech.edu>
Jean Delvare wrote:
> On Thu, 16 Oct 2008 13:50:26 -0700, Ira Snyder wrote:
>> On Thu, Oct 16, 2008 at 10:38:10PM +0200, Hans de Goede wrote:
>>
>> snip
>>
>>>> +/* Return the voltage from the given register in millivolts */
>>>> +static u32 ltc4245_get_voltage(struct device *dev, u8 reg)
>>>> +{
>>> Why dont you make this an s32 (or just an int) and then ..
>>>
>> snip
>>
>>>> + case LTC4245_VEEIN:
>>>> + case LTC4245_VEEOUT:
>>>> + voltage = regval * 55;
>>> Make this * -55, and ...
>>>
>> Great idea. I didn't even think of that. :) I'll post up a final patch
>> after I hear back on the stuff below.
>>
>> Is it ok to have a negative power? The current value gets used to
>> calculate the (virtual) power in ltc4245_show_power(), but that's it.
>
> I'd use the absolute value for power. A negative power sounds weird.
>
+1
Regards,
Hans
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
prev parent reply other threads:[~2008-10-17 6:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-15 21:29 [lm-sensors] [RFC v3] [PATCH] hwmon: Add LTC4245 driver Ira Snyder
2008-10-16 20:38 ` Hans de Goede
2008-10-16 20:50 ` Ira Snyder
2008-10-16 20:56 ` Jean Delvare
2008-10-17 6:27 ` Hans de Goede [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=48F83034.2030901@hhs.nl \
--to=j.w.r.degoede@hhs.nl \
--cc=lm-sensors@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.