Re: [PATCH] hwmon: (it87) Drop uart6 condition for vin5&vin6 for IT8783F

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

 



On Tue, 2012-05-15 at 14:21 -0400, Jean Delvare wrote:
> On Tue, 15 May 2012 19:25:03 +0200, Björn Gerhart wrote:
> > From: Bjoern Gerhart <oss@xxxxxxxxxxxxx>
> > 
> > Drop UART6 condition for IT8783F related to VIN5 and VIN6.
> > In case UART6 is routed via JP4 to a different set of pins,
> > VIN5 and VIN6 can be used at the same time.
> > 
> > diff -Naur a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c
> > --- a/drivers/hwmon/it87.c	2012-05-15 16:53:07.156061059 +0200
> > +++ b/drivers/hwmon/it87.c	2012-05-15 17:19:31.717061875 +0200
> > @@ -1806,11 +1806,11 @@
> >  			sio_data->skip_pwm |= (1 << 1);
> >  
> >  		/* VIN5 */
> > -		if ((reg27 & (1 << 0)) || uart6)
> > +		if (reg27 & (1 << 0))
> >  			sio_data->skip_in |= (1 << 5); /* No VIN5 */
> >  
> >  		/* VIN6 */
> > -		if ((reg27 & (1 << 1)) || uart6)
> > +		if (reg27 & (1 << 1))
> >  			sio_data->skip_in |= (1 << 6); /* No VIN6 */
> >  
> >  		/*
> > 
> 
> What about FAN3_TAC? As I read the datasheet, it is also "freed" if
> UART6 is moved to pins 100-106. So I suspect we don't want to check for
> uart6 at all for the IT8783F.
> 
The data sheet says, with Register 0x27/Bit 0:

Function Selection of Pin 93 (FSP)
0: VIN5/FAN_TAC3/SIN6
If bit 2 of index 2Ch is 1, FAN_TAC3/SIN6 input is enabled; otherwise
select VIN5 input.
1: GP30

Assuming the above is correct, I think I'll rename "uart6" to "fan3" and
use

	fan3 = reg2C & (1 << 2);
...
	/* Check if fan3 is there or not */
	if ((reg27 & (1 << 0)) || !fan3)
                sio_data->skip_fan |= (1 << 2);
...
	if ((reg27 & (1 << 0)) || fan3)
		sio_data->skip_in |= (1 << 5); /* No VIN5 */

Does that make sense ?

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