IT8628E has 6 temperature limit registers, overlayed with VIN7..VIN9
limit registers, but only 3 temperature offset registers. Given that,
introduce separate variables for the number of temperature limit
registers and the number of temperature offset registers.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Configuration register access of the second Super-IO chip on AB350M-D3H
is just as broken as the others and can result in the known system hang-up.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
This is mostly identical to IT8665E, with the exception of the
configuration bits for fans 4 and 5.
Signed-off-by: Justin Maggard <jmaggard@netgear.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Several recent chips have a different register definition for
temperature to pwm assignment. Introduce FEAT_NEW_TEMPMAP to reflect
this and assign to affected chips.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Feature detection and pwm temperature mapping differs from other chips.
Also disable pwm1, fan1, vin3, and vin6.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
The ADC LSB on some newer chips such as IT8613E and IT8625E is
officially 11mV, not 10.9mV. Add support for it.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
- Acquire acpi mutex (not supported in upstream kernel)
- Try to handle 0x4e access failures on Gigabyte boards
- Improve temperature register / limit / type support for recent chips
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Several recent chips don't support configuration bits to turn fan control
off entirely for the first three fans. Handle all of them with a
configuration flag.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Some chips have internal voltage scaling but 10.9mV ADC,
so we can no longer associate the 12mV ADC with internal scaling
but need a different flag to distinguish scaling support.
Also fix ADC resolution for IT8790E and IT8792E.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
The chip features match those of IT8790E. Most important is the
ADC resolution, which is 12 mV, not 10.9 mV.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
In IT8620E, after setting pwm control to manual, it was observed that
pwm values for fan 4..6 have reversed results (writing 0 results in fans
running at full speed, writing 255 results in fans turned off).
With the new PWM control, pwm polarity for pwm control 4..6 is specified
in its pwm control registers. Those registers are overwritten when setting
the pwm mode or the temperature mapping. Do not touch bit 2..6 of pwm
control registers on register writes to fix the problem.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
fan4 control is enabled if bit 2 of GPIO control register 4 is disabled,
not when it is enabled. Since the check is for the skip condition, it is
reversed. This applies to both IT8620 and IT8628.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
The chip is similar to IT8732E, but supports only three fans
instead of four (the driver currently does not support the 4th
fan on IT8732E).
Note that the chip ID is 0x8733, not 0x8792 as one would expect.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
If sensor attributes were never read, the pwm control data has not been
initiialized, which can cause wrong driver behavior. Ensure that cached
data is current before acting on it.
Reported-by: Kevin Folz <kfolz@evertz.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Configuration registers on ITE8622 are different to 8620 and 8628 and
require special handling. Also, the chip supports up to 5 pwm controls.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
On IT8622E and IT8628E, VIN3 is expected to be connected to +5V.
Add feature flag and reflect in input label.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>