]> git.sur5r.net Git - groeck-it87/log
groeck-it87
6 years agoFix scaling for IT8732F
Guenter Roeck [Tue, 27 Feb 2018 03:19:09 +0000 (19:19 -0800)]
Fix scaling for IT8732F

3.3V channels report the wrong voltages on IT8732F since the scaling bit
is not set.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
6 years agoSave and restore bank around envmon register accesses if needed
Guenter Roeck [Wed, 14 Feb 2018 16:57:46 +0000 (08:57 -0800)]
Save and restore bank around envmon register accesses if needed

If an external EC accesses the chip through SMBus registers
and if the chip's environmental registers are paged, it is likely
that the EC modifies the page register. If so, it likely will not
update the page on each access but assume that it "owns" the chip.
If the driver then modifies the page register, subsequent accesses
from the EC will likely have unpredictable results.
To avoid that problem, let's save the page register value after
disabling SMBus accesses and restore the original value when done.
This is only necessary if accesses are not handled through MMIO
since we don't touch the page register in that case.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
6 years agoFix up fan / pwm detection for IT8625/IT8665
Guenter Roeck [Fri, 19 Jan 2018 20:30:24 +0000 (12:30 -0800)]
Fix up fan / pwm detection for IT8625/IT8665

Hope it is correct this time around.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
6 years agoMakefile: DKMS fix
Burt P [Fri, 12 Jan 2018 18:15:12 +0000 (12:15 -0600)]
Makefile: DKMS fix

Allow DKMS (or anyone) to specify TARGET in Makefile.

Signed-off-by: Burt P <pburt0@gmail.com>
6 years agoAdd optional DKMS target to Makefile (v2)
Burt P [Sun, 3 Dec 2017 17:12:08 +0000 (11:12 -0600)]
Add optional DKMS target to Makefile (v2)

Using DKMS, the driver will be automatically rebuilt when
the kernel is updated.

* `make dkms` to install via DKMS
* `make dkms_clean` to remove from DKMS

Signed-off-by: Burt P <pburt0@gmail.com>
6 years agoREADME: Fix typo
Guenter Roeck [Wed, 3 Jan 2018 17:27:25 +0000 (09:27 -0800)]
README: Fix typo

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
6 years agoRevert "Add optional DKMS target to Makefile"
Guenter Roeck [Sun, 31 Dec 2017 02:25:16 +0000 (18:25 -0800)]
Revert "Add optional DKMS target to Makefile"

This reverts commit 6c1e48b4f16b65b6e2ff95d950b250581b0cbe91.

See comments:

"This is indeed not working, at least on Fedora. I tried specifying
MAKE and CLEAN but the outcome is the same (which makes sense, since
the defaults should already cover this)."

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoAdd comment explaining why smbus_disable is needed in probe
Guenter Roeck [Sun, 3 Dec 2017 18:28:15 +0000 (10:28 -0800)]
Add comment explaining why smbus_disable is needed in probe

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoAdd more known problems to ISSUES file
Guenter Roeck [Sun, 3 Dec 2017 18:25:39 +0000 (10:25 -0800)]
Add more known problems to ISSUES file

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoAdd ISSUES file
Guenter Roeck [Sun, 3 Dec 2017 18:15:06 +0000 (10:15 -0800)]
Add ISSUES file

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoAdd optional DKMS target to Makefile
Burt P [Sun, 3 Dec 2017 17:12:08 +0000 (11:12 -0600)]
Add optional DKMS target to Makefile

Using DKMS, the driver will be automatically rebuilt when
the kernel is updated.

* `make dkms` to install via DKMS
* `make dkms_clean` to remove from DKMS

Signed-off-by: Burt P <pburt0@gmail.com>
7 years agoFix PECI/AMDTSI selection
Guenter Roeck [Sat, 7 Oct 2017 14:38:41 +0000 (07:38 -0700)]
Fix PECI/AMDTSI selection

We can not use register 0x98 since it is typically not programmed
on systems selecting PECI. Try register 0x0a (Interface Selection)
which should be a better fit anyway.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoDo not disable SMBs unless really necessary
Guenter Roeck [Fri, 6 Oct 2017 23:14:31 +0000 (16:14 -0700)]
Do not disable SMBs unless really necessary

Only disable SMBus if we are going to read/write data.
Disabling it on each attribute read can result in system
instabilities.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoReport actual chip name, not its ID
Guenter Roeck [Mon, 2 Oct 2017 21:08:29 +0000 (14:08 -0700)]
Report actual chip name, not its ID

For some recent chips (at least IT8792E/IT8795E), the value of the chip ID
register does not match the chip name. Display the textual, not the value
of the ID register, in the kernel log.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoExperimental support for IT8606E
Guenter Roeck [Mon, 2 Oct 2017 18:18:33 +0000 (11:18 -0700)]
Experimental support for IT8606E

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoMakefile: Versioning, take three
Guenter Roeck [Mon, 2 Oct 2017 17:53:44 +0000 (10:53 -0700)]
Makefile: Versioning, take three

Make sure the build passes if the source is not in a git repository.
Again, that means that version information won't be available, but there
is only so much we can do about that.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoCheckpatch cleanup: Line length
Guenter Roeck [Mon, 2 Oct 2017 15:02:36 +0000 (08:02 -0700)]
Checkpatch cleanup: Line length

Try to stay below the 80-character-per-line limit.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoCheckpatch cleanup: Opening brackets
Guenter Roeck [Mon, 2 Oct 2017 15:00:03 +0000 (08:00 -0700)]
Checkpatch cleanup: Opening brackets

Checkpatch nowadays is allergic against '{' in continuation lines.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoCheckpatch cleanup: Use octal file permissions
Guenter Roeck [Mon, 2 Oct 2017 14:56:47 +0000 (07:56 -0700)]
Checkpatch cleanup: Use octal file permissions

Symbolic file permissions ran out of favor and result in a checkpatch
warning. Use octal permissions instead.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoCheckpatch cleanup: Use octal permissions for module parameters
Guenter Roeck [Mon, 2 Oct 2017 14:51:19 +0000 (07:51 -0700)]
Checkpatch cleanup: Use octal permissions for module parameters

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoCheckpatch cleanup: Double semicolon, missing space
Guenter Roeck [Mon, 2 Oct 2017 14:49:35 +0000 (07:49 -0700)]
Checkpatch cleanup: Double semicolon, missing space

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoDrop version.h
Guenter Roeck [Mon, 2 Oct 2017 02:11:33 +0000 (19:11 -0700)]
Drop version.h

Some distributions use their own Makefile and thus won't create version.h,
resulting in a build failure. Pass the version as define instead.
That won't help for generating the driver version with those distributions,
but at least the driver will build.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoAdd support for 4th temperature sensor on IT8622
Guenter Roeck [Sun, 1 Oct 2017 23:47:43 +0000 (16:47 -0700)]
Add support for 4th temperature sensor on IT8622

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoImprove AMDTSI temp type detection, and temp 4 type detection on IT8622
Guenter Roeck [Sun, 1 Oct 2017 23:39:31 +0000 (16:39 -0700)]
Improve AMDTSI temp type detection, and temp 4 type detection on IT8622

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoAdd SMBus bitmap for IT8622
Guenter Roeck [Sun, 1 Oct 2017 22:28:24 +0000 (15:28 -0700)]
Add SMBus bitmap for IT8622

IT8622 supports two external SMBus channels. Add bitmask to disable them
while accessing the chip.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoFix mmio resource request
Guenter Roeck [Sun, 1 Oct 2017 20:40:18 +0000 (13:40 -0700)]
Fix mmio resource request

We have to request a memory resource with IORESOURCE_MEM.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoIT8655E supports MMIO
Guenter Roeck [Sun, 1 Oct 2017 20:05:13 +0000 (13:05 -0700)]
IT8655E supports MMIO

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoPrint MMIO address into kernel log
Guenter Roeck [Sun, 1 Oct 2017 20:02:59 +0000 (13:02 -0700)]
Print MMIO address into kernel log

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoUpdate README to describe new module parameters
Guenter Roeck [Sun, 1 Oct 2017 19:52:34 +0000 (12:52 -0700)]
Update README to describe new module parameters

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoAdd MMIO support
Guenter Roeck [Sun, 1 Oct 2017 06:50:09 +0000 (23:50 -0700)]
Add MMIO support

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoDisable SMBus access while accessing Enviromnental Controller registers
Guenter Roeck [Sat, 30 Sep 2017 04:52:09 +0000 (21:52 -0700)]
Disable SMBus access while accessing Enviromnental Controller registers

Some chips support Environmental Controller access through SMBus.
On those chips, it is possible that an Embedded Controller accesses
Environmental Controller chip registers at any time. There is no real
means for synchronization. On banked chips, this can and will result in
access errors with unpredictable result.

Disable SMBus access while reading or writing environmental controller
registers to work around the problem.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoFix FAN_TAC5 detection for IT8665E
Guenter Roeck [Sun, 24 Sep 2017 15:10:16 +0000 (08:10 -0700)]
Fix FAN_TAC5 detection for IT8665E

FAN_TAC5 is connected if 26h[4]=0.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoRemove version.h when running clean, and clean does not depend on version.h
Guenter Roeck [Sun, 24 Sep 2017 11:20:38 +0000 (04:20 -0700)]
Remove version.h when running clean, and clean does not depend on version.h

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoIgnore version.h
Guenter Roeck [Sun, 24 Sep 2017 11:19:12 +0000 (04:19 -0700)]
Ignore version.h

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoit87: Display driver version
Guenter Roeck [Sun, 24 Sep 2017 11:13:35 +0000 (04:13 -0700)]
it87: Display driver version

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoMakefile: Generate version.h
Guenter Roeck [Sun, 24 Sep 2017 11:13:05 +0000 (04:13 -0700)]
Makefile: Generate version.h

Update version after each change in it87.c.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoSimplify and fix temperature sensor type detection v1.0
Guenter Roeck [Thu, 21 Sep 2017 23:17:53 +0000 (16:17 -0700)]
Simplify and fix temperature sensor type detection

Temperature sensor types won't change, so we only need to read it once.
Also fix temperature register calculation.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoAlways restore previous bank register after reading/writing data
Guenter Roeck [Thu, 21 Sep 2017 22:26:02 +0000 (15:26 -0700)]
Always restore previous bank register after reading/writing data

There is some indication that other entities (BIOS ? EC ?) may access
the chip asynchronously. Restore the bank selection after read/write
operations to limit any potenial impact.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoImprove temperature sensor type detection for IT8686
Guenter Roeck [Thu, 21 Sep 2017 22:19:05 +0000 (15:19 -0700)]
Improve temperature sensor type detection for IT8686

Introduce two new type values, 7 for 'virtual' and 8 for 'other'.
This will need to be added to the ABI once approved.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoFix reworked temperature mapping
Guenter Roeck [Thu, 21 Sep 2017 05:33:31 +0000 (22:33 -0700)]
Fix reworked temperature mapping

With the reworked temperature mapping it was no longer possible to set
manual mode since the 'automatic' configuration bit was never cleared.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoUpdate README
Guenter Roeck [Thu, 21 Sep 2017 00:23:34 +0000 (17:23 -0700)]
Update README

Add a note on sensors-detect. Remove some obsolete information.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoRemove TODO
Guenter Roeck [Thu, 21 Sep 2017 00:20:53 +0000 (17:20 -0700)]
Remove TODO

It is obsolete.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoTry to add support for automatically detected build directories
Guenter Roeck [Wed, 20 Sep 2017 22:46:28 +0000 (15:46 -0700)]
Try to add support for automatically detected build directories

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoAdd 'ignore_resource_conflict' error
Guenter Roeck [Wed, 20 Sep 2017 22:19:33 +0000 (15:19 -0700)]
Add 'ignore_resource_conflict' error

It appears that some BIOSes reserve ACPI resources without using them,
and acpi_enable_resources=lax seems to result in failures to load
certain drivers.

Introduce a 'ignore_resource_conflict' module parameter as alternate
means to ignore ACPI resource conflicts.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoMakefile: Add support for compressed modules
Guenter Roeck [Fri, 15 Sep 2017 15:15:05 +0000 (08:15 -0700)]
Makefile: Add support for compressed modules

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoRework pwm temperature mapping
Guenter Roeck [Mon, 4 Sep 2017 15:27:19 +0000 (08:27 -0700)]
Rework pwm temperature mapping

Various chips have different numbers of valid values for pwm temperature
mapping. Rework the code to take this into account.

No longer keep map as bitmap, but maintain it as number 1..X. Do not try to
define a separate mapping entry for pwm4..6 on chips where the temperature
map for those pwm controls is taken from a different temperature input.
Introduce helpers to convert the control register contents to a map and
vice versa.

Reflect that IT8607 uses the new temperature map in bit 3..5 of the pwm
control register.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoUpdate pwm cached control registers before writing pwm enable
Guenter Roeck [Sun, 3 Sep 2017 20:58:47 +0000 (13:58 -0700)]
Update pwm cached control registers before writing pwm enable

If pwmX_enable is written prior to displaying any attributes,
t87_update_pwm_ctrl() is never called, and the cached pwm registers
are never read before written. This results in bad values written
into various registers, and can result in operational failures.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoCreate the hwmon folder if it does not exist
Yohan Pereira [Sat, 26 Aug 2017 13:16:09 +0000 (18:46 +0530)]
Create the hwmon folder if it does not exist

7 years agoIT8655E and IT8665E both support internal register scaling
Guenter Roeck [Tue, 8 Aug 2017 13:35:46 +0000 (06:35 -0700)]
IT8655E and IT8665E both support internal register scaling

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoForce IT8790E and IT8792E into configuration mode
Guenter Roeck [Sun, 6 Aug 2017 22:00:33 +0000 (15:00 -0700)]
Force IT8790E and IT8792E into configuration mode

IT8790E and IT8792E need to be in configuration mode to avoid LPC bus errors.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoDrop ACPI mutex code
Guenter Roeck [Sun, 6 Aug 2017 21:06:29 +0000 (14:06 -0700)]
Drop ACPI mutex code

The observed problems with IT8792E were after all not caused by ACPI
mutex problems, so drop that code for now.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoFix accesses to IT8792E
Guenter Roeck [Sat, 5 Aug 2017 19:48:49 +0000 (12:48 -0700)]
Fix accesses to IT8792E

If IT8792E or a compatible chip such as IT8795 (which has the same chip ID,
0x8733) resides at SIO address 0x4e/0x4f, and another Super-IO chip is at
SIO address 0x2e/0x2f, the IT8792E causes a cycle decode problem when exiting
its configuration mode. This can result in access errors for both chips, and
may result in system hangs.

Never exit configuration mode for IT8792E to avoid the problem.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoREADME missing necessary build instructions
Enigma [Thu, 3 Aug 2017 13:42:15 +0000 (09:42 -0400)]
README missing necessary build instructions

README missing necessary build instructions

7 years agoIT8607 does not support the 1st fan, only fan2-3
Guenter Roeck [Sun, 23 Jul 2017 14:29:38 +0000 (07:29 -0700)]
IT8607 does not support the 1st fan, only fan2-3

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoDrop FEAT_TEMP_OFFSET
Guenter Roeck [Thu, 8 Jun 2017 00:19:15 +0000 (17:19 -0700)]
Drop FEAT_TEMP_OFFSET

Since we now count the number of temperature offset registers directly,
there is no need for the temperature offset feature flag anymore.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoAdd support for 6 temperature limit registers on IT8628E
Guenter Roeck [Wed, 7 Jun 2017 23:56:31 +0000 (16:56 -0700)]
Add support for 6 temperature limit registers on IT8628E

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>
7 years agoDeclare dummy vid functions if needed
Guenter Roeck [Wed, 24 May 2017 13:02:47 +0000 (06:02 -0700)]
Declare dummy vid functions if needed

Some kernel configurations may have CONFIG_HWMON_VID disabled.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoProvide blacklist module parameter to override blacklist.
Guenter Roeck [Tue, 23 May 2017 13:05:29 +0000 (06:05 -0700)]
Provide blacklist module parameter to override blacklist.

Load module with blacklist=0 to override blacklist.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoMark 2nd Super-IO chip on AB350M-D3H as broken
Guenter Roeck [Tue, 16 May 2017 04:15:55 +0000 (21:15 -0700)]
Mark 2nd Super-IO chip on AB350M-D3H as broken

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>
7 years agoMerge pull request #27 from jmaggard10/master
Guenter Roeck [Thu, 11 May 2017 20:57:52 +0000 (13:57 -0700)]
Merge pull request #27 from jmaggard10/master

Fix up support for IT8625E

7 years agoFix up support for IT8625E 27/head
Justin Maggard [Thu, 11 May 2017 20:25:20 +0000 (13:25 -0700)]
Fix up support for IT8625E

Add missing scaling feature and fix broken temp type detection on temp
1-3 sensors.

7 years agoAdd support for IT8625E
Justin Maggard [Tue, 2 May 2017 18:59:26 +0000 (11:59 -0700)]
Add support for IT8625E

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>
7 years agoFix whitespace issues
Guenter Roeck [Thu, 27 Apr 2017 04:48:56 +0000 (21:48 -0700)]
Fix whitespace issues

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoInitialize register pointers before using them
Guenter Roeck [Wed, 26 Apr 2017 21:28:27 +0000 (14:28 -0700)]
Initialize register pointers before using them

Register pointers have to be initialized before they can be used in
it87_check_pwm().

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoAdd Gigabyte AX370-Gaming 5 to IT8792E blacklist
koji54 [Sun, 23 Apr 2017 07:32:30 +0000 (09:32 +0200)]
Add Gigabyte AX370-Gaming 5 to IT8792E blacklist

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoIntroduce FEAT_NEW_TEMPMAP
Guenter Roeck [Wed, 19 Apr 2017 04:57:08 +0000 (21:57 -0700)]
Introduce FEAT_NEW_TEMPMAP

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>
7 years agoFix up support for IT8613E
Guenter Roeck [Wed, 19 Apr 2017 03:40:05 +0000 (20:40 -0700)]
Fix up support for IT8613E

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>
7 years agoAdd support for IT8613E
andreychernyshev [Sat, 15 Apr 2017 12:07:44 +0000 (15:07 +0300)]
Add support for IT8613E

[groeck: Fix README]

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoBlacklist IT8792E on AX370-Gaming K7
Guenter Roeck [Tue, 18 Apr 2017 21:49:22 +0000 (14:49 -0700)]
Blacklist IT8792E on AX370-Gaming K7

Accessing it may result in a system hang.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoDisable access to 2nd Super-IO chip
Guenter Roeck [Tue, 18 Apr 2017 17:00:31 +0000 (10:00 -0700)]
Disable access to 2nd Super-IO chip

It is known to be broken.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoFEAT_TEMP_PECI does not apply to multi-bank chips.
Guenter Roeck [Thu, 13 Apr 2017 14:05:13 +0000 (07:05 -0700)]
FEAT_TEMP_PECI does not apply to multi-bank chips.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoAdd support for 11mV ADC
Guenter Roeck [Thu, 13 Apr 2017 13:02:32 +0000 (06:02 -0700)]
Add support for 11mV ADC

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>
7 years agoFix up temp offset register addresses
Guenter Roeck [Wed, 12 Apr 2017 13:32:49 +0000 (06:32 -0700)]
Fix up temp offset register addresses

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoVarious improvements
Guenter Roeck [Wed, 12 Apr 2017 13:15:24 +0000 (06:15 -0700)]
Various improvements

- 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>
7 years agoAdd limit support for temp 4-6
Guenter Roeck [Tue, 11 Apr 2017 13:47:37 +0000 (06:47 -0700)]
Add limit support for temp 4-6

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoRegister map as CSV
Guenter Roeck [Tue, 11 Apr 2017 12:31:28 +0000 (05:31 -0700)]
Register map as CSV

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoAdd register map
Guenter Roeck [Tue, 11 Apr 2017 12:27:59 +0000 (05:27 -0700)]
Add register map

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoAdd feature flag FEAT_FANCTL_ONOFF
Guenter Roeck [Tue, 28 Mar 2017 13:26:19 +0000 (06:26 -0700)]
Add feature flag FEAT_FANCTL_ONOFF

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>
7 years agoImprove AVCC3 support
Guenter Roeck [Sat, 25 Mar 2017 14:05:41 +0000 (07:05 -0700)]
Improve AVCC3 support

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoPreliminary support for IT8655E
Guenter Roeck [Wed, 22 Mar 2017 07:54:35 +0000 (00:54 -0700)]
Preliminary support for IT8655E

Assume it is similar to IT8665E with three instead of six fans.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoUpdate TODO and README files
Guenter Roeck [Sat, 11 Mar 2017 16:53:53 +0000 (08:53 -0800)]
Update TODO and README files

Add sections about preliminary support and what to report for unsupported
chips to README.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoAdd support for chip specific register sets
Guenter Roeck [Sun, 19 Mar 2017 07:57:24 +0000 (00:57 -0700)]
Add support for chip specific register sets

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoAdded preliminary support for IT8665E
Drew [Fri, 17 Mar 2017 02:31:54 +0000 (22:31 -0400)]
Added preliminary support for IT8665E

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoSeparate internal scaling from 12mV ADC
Guenter Roeck [Tue, 21 Mar 2017 00:43:03 +0000 (17:43 -0700)]
Separate internal scaling from 12mV ADC

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>
7 years agoAdd multi-bank and initial IT8686E support
Guenter Roeck [Thu, 16 Mar 2017 17:38:45 +0000 (10:38 -0700)]
Add multi-bank and initial IT8686E support

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoForce chip ID only if a chip has been found
Guenter Roeck [Tue, 14 Mar 2017 16:33:52 +0000 (09:33 -0700)]
Force chip ID only if a chip has been found

If the reported chip ID is 0xffff, there is no chip, and forcing the chip
type does not add value.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoUpdate TODO: 4th fan control for IT8732E is now supported
Guenter Roeck [Sat, 11 Mar 2017 16:40:01 +0000 (08:40 -0800)]
Update TODO: 4th fan control for IT8732E is now supported

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoAdd 4th fan control and measurement for IT8732E
Guenter Roeck [Sat, 11 Mar 2017 16:39:40 +0000 (08:39 -0800)]
Add 4th fan control and measurement for IT8732E

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoFix feature mask for IT8792E (IT8733E)
Guenter Roeck [Fri, 10 Mar 2017 17:06:17 +0000 (09:06 -0800)]
Fix feature mask for IT8792E (IT8733E)

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>
7 years agoDo not overwrite bit 2..6 of pwm control registers
Guenter Roeck [Wed, 8 Feb 2017 17:10:11 +0000 (09:10 -0800)]
Do not overwrite bit 2..6 of pwm control registers

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>
7 years agoFix fan4_ctl detection for IT8620, IT8628
Guenter Roeck [Wed, 8 Feb 2017 14:29:43 +0000 (06:29 -0800)]
Fix fan4_ctl detection for IT8620, IT8628

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>
7 years agoAdd TODO file
Guenter Roeck [Thu, 29 Dec 2016 04:48:36 +0000 (20:48 -0800)]
Add TODO file

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoExperimental support for IT8607E
Guenter Roeck [Thu, 29 Dec 2016 04:45:31 +0000 (20:45 -0800)]
Experimental support for IT8607E

Assume for now that in5 and in6 are supported, and that fan control
is standard (unlike IT8603E).

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoAdd preliminary support for IT8792E
Guenter Roeck [Thu, 29 Dec 2016 02:25:06 +0000 (18:25 -0800)]
Add preliminary support for IT8792E

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>
8 years agoEnsure that pwm control cache is current before updating values
Guenter Roeck [Tue, 27 Sep 2016 00:35:56 +0000 (17:35 -0700)]
Ensure that pwm control cache is current before updating values

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>
8 years agoImprove IT8622 support
Guenter Roeck [Thu, 22 Sep 2016 20:51:20 +0000 (13:51 -0700)]
Improve IT8622 support

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>
8 years agoAdd support for IT8622E
Guenter Roeck [Wed, 21 Sep 2016 15:00:46 +0000 (08:00 -0700)]
Add support for IT8622E

Originally-from: Kevin Folz <kfolz@evertz.com>.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
8 years agoUpdate README to match upstream documentation
Guenter Roeck [Wed, 21 Sep 2016 14:55:34 +0000 (07:55 -0700)]
Update README to match upstream documentation

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
8 years agoAdd feature flag indicating that VIN3 is connected to 5V
Guenter Roeck [Wed, 21 Sep 2016 13:35:37 +0000 (06:35 -0700)]
Add feature flag indicating that VIN3 is connected to 5V

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>
8 years agoSynchronize with upstream version
Guenter Roeck [Wed, 21 Sep 2016 13:19:44 +0000 (06:19 -0700)]
Synchronize with upstream version

Signed-off-by: Guenter Roeck <linux@roeck-us.net>