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] hwmon: (f75375s) Added F75387SG/RG support
Date: Mon, 12 Dec 2011 17:13:40 +0000	[thread overview]
Message-ID: <20111212171340.GA10565@ericsson.com> (raw)
In-Reply-To: <2D36B16B-9487-4A4D-B4EB-60FA8766BFFB@bgerhart.de>

Hi Bjoern,

On Sun, Dec 11, 2011 at 03:07:26PM -0500, Björn Gerhart wrote:
> Added support for Fintek F75387SG/RG.
> 
> Cc: Riku Voipio <riku.voipio@iki.fi>
> Signed-off-by: Bjoern Gerhart <oss@extracloud.de>
> ---
> 
> Tested with kernel 2.6.39, but without fans so far.
> 
> v2:
> - suitable ontop of the latest set of f75375s related patches
> - simplified name of a local char variable
> 
> Kconfig   |    4 -
> f75375s.c |  139 +++++++++++++++++++++++++++++++++++++++++++++-----------------
> 2 files changed, 105 insertions(+), 38 deletions(-)
> 
> diff -uNr linux-2.6.39-5patched/drivers/hwmon/f75375s.c linux-2.6.39/drivers/hwmon/f75375s.c
> --- linux-2.6.39-5patched/drivers/hwmon/f75375s.c	2011-12-09 15:41:01.000000000 +0100
> +++ linux-2.6.39/drivers/hwmon/f75375s.c	2011-12-11 19:15:18.000000000 +0100
> @@ -1,6 +1,6 @@
> /*

I am still having trouble applying your patch. The patch file is supposed
to start unmodified lines with an added blank, which is missing in your patch.
Both git am and the patch command complain about that.

[ ... ]

> @@ -660,11 +716,17 @@
> 	if (!f75375s_pdata) {
> 		u8 conf, mode;
> 		int nr;
> +		char ctrl;
> 
> 		conf = f75375_read8(client, F75375_REG_CONFIG1);
> 		mode = f75375_read8(client, F75375_REG_FAN_TIMER);
> 		for (nr = 0; nr < 2; nr++) {
> -			if (!(conf & (1 << FAN_CTRL_LINEAR(nr))))
> +			if (data->kind == f75387)
> +				ctrl = F75387_FAN_CTRL_LINEAR(nr);
> +			else
> +				ctrl = F75375_FAN_CTRL_LINEAR(nr);
> +
> +			if (!(conf & (1 << ctrl)))
> 				data->pwm_mode[nr] = 1;
> 			switch ((mode >> FAN_CTRL_MODE(nr)) & 3) {
> 			case 0:		/* speed */

You'll also need some F75387 specific code to detect/select pwm_enable[0,1].

Thanks,
Guenter

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

  reply	other threads:[~2011-12-12 17:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-11 20:07 [lm-sensors] [PATCH] hwmon: (f75375s) Added F75387SG/RG support Björn Gerhart
2011-12-12 17:13 ` Guenter Roeck [this message]
2011-12-13 18:19 ` Björn Gerhart
2011-12-13 18:59 ` Guenter Roeck
2011-12-13 19:34 ` Björn Gerhart
2011-12-13 20:02 ` Guenter Roeck

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=20111212171340.GA10565@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.