Re: [PATCH] hwmon: (f75375s) Added F75387SG/RG support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx>
> Signed-off-by: Bjoern Gerhart <oss@xxxxxxxxxxxxx>
> ---
> 
> 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@xxxxxxxxxxxxxx
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors



[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux