All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <guenter.roeck@ericsson.com>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [PATCH 1/2] hwmon: (w83627ehf) Add support for temperature offset registers
Date: Tue, 13 Mar 2012 10:43:42 +0000	[thread overview]
Message-ID: <20120313104342.GB31363@ericsson.com> (raw)
In-Reply-To: <1328807876-26409-1-git-send-email-guenter.roeck@ericsson.com>

On Tue, Mar 13, 2012 at 03:42:21AM -0400, Jean Delvare wrote:
> Hi Guenter,
> 
> On Thu, 9 Feb 2012 09:17:56 -0800, Guenter Roeck wrote:
> > Add support for temperature offset registers for CPUTIN, SYSTIN,
> > and AUXTIN temperatures.
> > 
> > Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
> > ---
> >  drivers/hwmon/w83627ehf.c |   73 +++++++++++++++++++++++++++++++++++++++++++++
> >  1 files changed, 73 insertions(+), 0 deletions(-)
> 
> I can't test that, overall it looks good, except one thing:
> 
> > diff --git a/drivers/hwmon/w83627ehf.c b/drivers/hwmon/w83627ehf.c
> > index 57a31a0..5273fff 100644
> > --- a/drivers/hwmon/w83627ehf.c
> > +++ b/drivers/hwmon/w83627ehf.c
> > (...)
> > @@ -2204,6 +2265,11 @@ static int __devinit w83627ehf_probe(struct platform_device *pdev)
> >  		data->in6_skip = 1;			/* No VIN3 */
> >  
> >  		data->temp_label = w83667hg_b_temp_label;
> > +		data->have_temp_offset = data->have_temp & 0x03;
> > +		for (i = 0; i < 2; i++) {
> > +			if (data->temp_src[i] > 1)
> > +				data->have_temp_offset &= ~(1 << i);
> > +		}
> 
> This is the W83627UHG case, and while it has only two analog
> temperature inputs, it can have up to 3 temperature channels. temp1 is
> hard-coded to SYSTIN, temp2 can be set to PECI and temp3 to CPUTIN, in
> which case temp3 would support temperature offset. So you should loop
> up to i < 3, not 2.
> 
> Once this is fixed, you can add:
> 
> Acked-by: Jean Delvare <khali@linux-fr.org>
> 
Thanks, fixed and applied to -next.

Guenter

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

      parent reply	other threads:[~2012-03-13 10:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-09 17:17 [lm-sensors] [PATCH 1/2] hwmon: (w83627ehf) Add support for temperature offset registers Guenter Roeck
2012-03-13  7:42 ` Jean Delvare
2012-03-13 10:43 ` 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=20120313104342.GB31363@ericsson.com \
    --to=guenter.roeck@ericsson.com \
    --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.