groeck-nct6775
2 years agoAdd driver removal notice master
Guenter Roeck [Tue, 10 Jul 2018 03:42:52 +0000 (20:42 -0700)]
Add driver removal notice

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2 years agoMerge pull request #58 from jonrichards/make-fix
Guenter Roeck [Sun, 1 Jul 2018 22:00:42 +0000 (15:00 -0700)]
Merge pull request #58 from jonrichards/make-fix

Improve distro support

2 years agoImprove distro support 58/head
Jon Richards [Sun, 1 Jul 2018 21:10:12 +0000 (14:10 -0700)]
Improve distro support

Taken from example here:
https://github.com/groeck/it87/blob/master/Makefile, specifically
https://github.com/groeck/it87/commit/74647ea3f4d461e062177f46ad85f71d0c4af811
and
https://github.com/groeck/it87/commit/3436b280785dbb05a73c5468d09d1e49e8ce09c9 commits.

2 years agoFix writing pwmX_mode
Guenter Roeck [Tue, 27 Mar 2018 02:50:31 +0000 (19:50 -0700)]
Fix writing pwmX_mode

pwmX_mode is defined as 0=DC mode, 1=pwm mode. The chip register bit
is set to 1 for DC mode. This got mixed up, and writing 1 into pwmX_mode
resulted in DC mode enabled. Fix it up by using the ABI definition
throughout the driver for consistency.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2 years agoUse DEVICE_ATTR_RO
Guenter Roeck [Wed, 21 Feb 2018 20:58:23 +0000 (12:58 -0800)]
Use DEVICE_ATTR_RO

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2 years agocompat: Introduce DEVICE_ATTR_RO
Guenter Roeck [Wed, 21 Feb 2018 20:58:03 +0000 (12:58 -0800)]
compat: Introduce DEVICE_ATTR_RO

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
3 years agoFix nct6796 support
Guenter Roeck [Mon, 11 Sep 2017 13:37:17 +0000 (06:37 -0700)]
Fix nct6796 support

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
3 years agoAdd support for NCT6796D
Guenter Roeck [Sun, 10 Sep 2017 03:17:58 +0000 (20:17 -0700)]
Add support for NCT6796D

Preliminary, untested.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
3 years agoUpdate README
Guenter Roeck [Sat, 5 Aug 2017 22:44:31 +0000 (15:44 -0700)]
Update README

The driver supports additional chips, and up to 6 fans and fan controls.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
3 years agoImprove fan6/pwm6 support
Guenter Roeck [Sat, 5 Aug 2017 17:57:05 +0000 (10:57 -0700)]
Improve fan6/pwm6 support

Improve fan6/pwm6 detection. Add support for fan pulses for fans 4..6
and fan min limits for fan6.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
3 years agoAdd debug file
Guenter Roeck [Sun, 21 May 2017 21:48:25 +0000 (14:48 -0700)]
Add debug file

Provide debug file to report temperature register settings and values.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
3 years agoUsed bits in temp_mask start with 1
Guenter Roeck [Sat, 20 May 2017 19:53:41 +0000 (12:53 -0700)]
Used bits in temp_mask start with 1

Used bits in temperature source registers, and thus temp_mask, start with 1.
Valid sources in reg_temp_alternate[] start with 0. Add missing offset.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
3 years agoUse bitops
Guenter Roeck [Fri, 19 May 2017 17:57:27 +0000 (10:57 -0700)]
Use bitops

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
3 years agoSync with upstream
Guenter Roeck [Fri, 19 May 2017 17:54:46 +0000 (10:54 -0700)]
Sync with upstream

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
3 years agoImprove NCT6795 support
Guenter Roeck [Tue, 16 May 2017 09:52:34 +0000 (02:52 -0700)]
Improve NCT6795 support

Improve fan and pwm pin detection for both NCT6793D and NCT6795D.
Add temperature sensor labels for NCT6795D.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
3 years agoRework temperature sensor detection
Guenter Roeck [Thu, 6 Apr 2017 11:15:53 +0000 (04:15 -0700)]
Rework temperature sensor detection

We don't know temperature sensor assignment on NCT6795D.
Separate sensor presence detection from sensor label display,
and disable sensor label display for NCT6795D.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
3 years agoAdd basic support for NCT6795D
Guenter Roeck [Tue, 4 Apr 2017 21:41:41 +0000 (14:41 -0700)]
Add basic support for NCT6795D

Temperature sensor labels are known to be wrong.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
4 years agonct6775: Add support for multiple virtual temperature sources
Guenter Roeck [Sun, 11 Sep 2016 16:46:56 +0000 (09:46 -0700)]
nct6775: Add support for multiple virtual temperature sources

For virtual temperatures, the actual temperature values are written
by software, presumably by the BIOS. This functionality is (as of
right now) supported on NCT6791D, NCT6792D, and NCT6793D. On those chips,
the temperatures are written into registers 0xea..0xef on page 0.
This is known to be used on some Asus motherboards. Report the 'virtual'
temperatures for all monotoring sources to address this situation.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
4 years agohwmon: (nct6775) constify sensor_template_group structures
Julia Lawall [Sat, 12 Dec 2015 16:36:39 +0000 (17:36 +0100)]
hwmon: (nct6775) constify sensor_template_group structures

The sensor_template_group structures are never modified, so declare them as
const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
4 years agohwmon: (nct6775) Do not accept force_id unless chip is found
Guenter Roeck [Thu, 4 Aug 2016 05:07:18 +0000 (22:07 -0700)]
hwmon: (nct6775) Do not accept force_id unless chip is found

Since commit 698a7c24a544 ("hwmon: (nct6775) Support two SuperIO chips
in the same system"), the driver supports two Super-IO chips. This has
the undesirable side effect that force_id always detects a second chip
at address 0xfff8, even if no chip exists at that address.

nct6775: Found NCT6793D or compatible chip at 0x4e:0xfff8

If no chip at all is found at a given SIO address, it does not make sense
to instantiate it. Limit force_id to only work if some chip is found,
that is if the chip ID returns a value other than 0xffff.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
4 years agocompat.h: Define sysfs_attr_init if not defined
Guenter Roeck [Thu, 28 Jul 2016 13:35:59 +0000 (06:35 -0700)]
compat.h: Define sysfs_attr_init if not defined

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
4 years agoMerge pull request #36 from airbjorn/master
Guenter Roeck [Tue, 15 Dec 2015 16:19:05 +0000 (08:19 -0800)]
Merge pull request #36 from airbjorn/master

nct6775: fix compile errors on RHEL7

4 years agofix compile errors on RHEL7 36/head
airbjorn [Tue, 15 Dec 2015 15:44:55 +0000 (16:44 +0100)]
fix compile errors on RHEL7

4 years agohwmon: (nct6775) Introduce separate temperature labels for NCT6792 and NCT6793
Guenter Roeck [Tue, 17 Nov 2015 16:26:57 +0000 (08:26 -0800)]
hwmon: (nct6775) Introduce separate temperature labels for NCT6792 and NCT6793

NCT6792 and NCT6793 are mostly register compatible to NCT6791, but
temperature sources are different and difficult to manage with a single
temperature label array. Introduce separate temperature label arrays
for those chips to reflect the differences.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
4 years agoAdd missing sysfs_attr_init()
Guenter Roeck [Tue, 17 Nov 2015 16:25:04 +0000 (08:25 -0800)]
Add missing sysfs_attr_init()

Also synchronize STEP_UP_TIME and STREP_DOWN_TIME handling
with upstream code.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
4 years agoFix typo in NCT6792D version ID
Guenter Roeck [Tue, 17 Nov 2015 16:20:52 +0000 (08:20 -0800)]
Fix typo in NCT6792D version ID

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
4 years agoMove nct6775_sio_names closer to enum to simplify adding new chips
Guenter Roeck [Tue, 17 Nov 2015 16:19:40 +0000 (08:19 -0800)]
Move nct6775_sio_names closer to enum to simplify adding new chips

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
4 years agoAdd missing NCT6793D string
Guenter Roeck [Tue, 17 Nov 2015 16:16:40 +0000 (08:16 -0800)]
Add missing NCT6793D string

Thanks to Eric Swanson for the report.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
5 years agoSwap SETP_UP_TIME and STEP_DOWN_TIME for all chips but NCT6775
Guenter Roeck [Mon, 31 Aug 2015 23:16:17 +0000 (16:16 -0700)]
Swap SETP_UP_TIME and STEP_DOWN_TIME for all chips but NCT6775

The register definition was changed (swapped) after NCT6776.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
5 years agoFix NCT6793D device ID
Guenter Roeck [Mon, 31 Aug 2015 22:54:08 +0000 (15:54 -0700)]
Fix NCT6793D device ID

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
5 years agoAdd support for NCT6793D
Guenter Roeck [Mon, 31 Aug 2015 02:55:09 +0000 (19:55 -0700)]
Add support for NCT6793D

NCT6793D is register compatible with NCT6792D.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
5 years agoNCT6791D and NCT6792D have an additional temperature source
Guenter Roeck [Mon, 31 Aug 2015 02:53:46 +0000 (19:53 -0700)]
NCT6791D and NCT6792D have an additional temperature source

Both NCT6791D and NCT6792D permit selection of a 'virtual' temperature
register as temperature source. The virtual temperature registers are
registers 0xea to 0xef in bank 0 and can be written by software.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
5 years agoMerge pull request #34 from graysky2/master
Guenter Roeck [Sat, 29 Aug 2015 20:34:10 +0000 (13:34 -0700)]
Merge pull request #34 from graysky2/master

Merge pull request #1 from groeck/master

5 years agoMerge pull request #32 from pjperry/master
Guenter Roeck [Sun, 9 Aug 2015 11:27:39 +0000 (04:27 -0700)]
Merge pull request #32 from pjperry/master

nct6775: fix compile errors on RHEL6.7

5 years agonct6775: fix compile errors on RHEL6.7 32/head
Philip J Perry [Sun, 9 Aug 2015 09:55:40 +0000 (10:55 +0100)]
nct6775: fix compile errors on RHEL6.7

Signed-off-by: Philip J Perry <phil@elrepo.org>
5 years agoEnable auxiliary fan monitoring on ASRock Z77 Pro4-M
Guenter Roeck [Fri, 13 Feb 2015 05:46:22 +0000 (21:46 -0800)]
Enable auxiliary fan monitoring on ASRock Z77 Pro4-M

Auxiliary fan monitoring is not enabled on ASRock Z77 Pro4-M
with BIOS version 2.00 if booted in UEFI Ultra-FastBoot mode.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
5 years agoRestore hardware monitoring logical device status on resume
Guenter Roeck [Fri, 13 Feb 2015 04:21:27 +0000 (20:21 -0800)]
Restore hardware monitoring logical device status on resume

After a suspend/resume cycle it is not guaranteed that the hardware monitoring
device is still enabled. Ensure that this is the case after resume.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
5 years agoConvert to use SIMPLE_DEV_PM_OPS
Guenter Roeck [Fri, 13 Feb 2015 04:20:33 +0000 (20:20 -0800)]
Convert to use SIMPLE_DEV_PM_OPS

Get rid of #ifdef CONFIG_PM by using SIMPLE_DEV_PM_OPS and declaring suspend
and resume functions with __maybe_unused.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
5 years agoRevert "Restore hardware monitoring logical device status on resume"
Guenter Roeck [Fri, 13 Feb 2015 04:17:41 +0000 (20:17 -0800)]
Revert "Restore hardware monitoring logical device status on resume"

This reverts commit 8ec9699a1bc4e90f4642efcb68127800ced79591.

5 years agoRevert "Enable fan 3-5 on ASRock Z77 Pro4-M"
Guenter Roeck [Fri, 13 Feb 2015 04:17:32 +0000 (20:17 -0800)]
Revert "Enable fan 3-5 on ASRock Z77 Pro4-M"

This reverts commit ad00077d680fba0530befe9e9ebb94ea090ce9ed.

5 years agoEnable fan 3-5 on ASRock Z77 Pro4-M
Guenter Roeck [Sat, 7 Feb 2015 02:59:34 +0000 (18:59 -0800)]
Enable fan 3-5 on ASRock Z77 Pro4-M

ASRock Z77 Pro4-M BIOS version 2.00 is known to not enable fan 3 to 5
if booted in UEFI Ultra-FastBoot mode.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
5 years agoRestore hardware monitoring logical device status on resume
Guenter Roeck [Sat, 7 Feb 2015 02:58:44 +0000 (18:58 -0800)]
Restore hardware monitoring logical device status on resume

After a suspend/resume cycle it is not guaranteed that the hardware monitoring
device is still enabled. Ensure that this is the case after resume.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
5 years agoUpdate README to reflect all supported chips and minimum kernel version
Guenter Roeck [Sat, 17 Jan 2015 18:06:26 +0000 (10:06 -0800)]
Update README to reflect all supported chips and minimum kernel version

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
5 years agoUpdate minimum kernel version to 2.6.32
Guenter Roeck [Sat, 17 Jan 2015 17:29:53 +0000 (09:29 -0800)]
Update minimum kernel version to 2.6.32

The driver needs is_visible support from the kernel core.
Working qround this for older kernels would be too difficult,
so set the minimum kernel version to 2.6.32, which is also
the oldest still supported longterm kernel.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
5 years agoMerge pull request #1 from groeck/master 34/head
graysky [Wed, 17 Dec 2014 14:01:36 +0000 (09:01 -0500)]
Merge pull request #1 from groeck/master

sync with upstream

5 years agocompat.h: Make kstrtol definition conditional
Guenter Roeck [Thu, 11 Dec 2014 17:03:19 +0000 (09:03 -0800)]
compat.h: Make kstrtol definition conditional

strict_strtol and strict_strtoul are no longer defined in the latest kernel,
so don't use those functions unless really needed.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
5 years agoSynchronize code with upstream version
Guenter Roeck [Sun, 16 Nov 2014 18:13:17 +0000 (10:13 -0800)]
Synchronize code with upstream version

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
6 years agoDrop obsolete pwmX_step_enable from README file
Guenter Roeck [Tue, 19 Aug 2014 16:15:17 +0000 (09:15 -0700)]
Drop obsolete pwmX_step_enable from README file

THis attribute was removed a long time ago,

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
6 years agoAdd new beep registers for nct6792d
Guenter Roeck [Tue, 19 Aug 2014 13:23:25 +0000 (06:23 -0700)]
Add new beep registers for nct6792d

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
6 years agoInitial support for NCT6792D - untested
Guenter Roeck [Fri, 27 Jun 2014 03:24:04 +0000 (20:24 -0700)]
Initial support for NCT6792D - untested

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
6 years agoMerge pull request #18 from karlvoigtland/master
Guenter Roeck [Fri, 7 Feb 2014 03:33:16 +0000 (19:33 -0800)]
Merge pull request #18 from karlvoigtland/master

compat.h:  define pr_warn and pr_warn_ratelimited macros if not already ...

6 years agocompat.h: define pr_warn and pr_warn_ratelimited macros if not already defined 18/head
Karl Voigtland [Fri, 7 Feb 2014 02:39:02 +0000 (11:39 +0900)]
compat.h:  define pr_warn and pr_warn_ratelimited macros if not already defined

pr_warn and pr_warn_ratelimited not added until kernel 2.6.35

6 years agomake define release_region conditional
Philip J Perry [Sat, 18 Jan 2014 23:20:25 +0000 (23:20 +0000)]
make define release_region conditional

release_region is defined on RHEL6 although request_muxed_region isn't so generates a warning:

warning: "release_region" redefined

Making it conditional eliminates the warning.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
6 years agocompat.h: Don't inlude i2C compatibility code
Guenter Roeck [Sat, 18 Jan 2014 16:31:05 +0000 (08:31 -0800)]
compat.h: Don't inlude i2C compatibility code

This is not an I2C driver, so don't include any I2C compatibility code.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
6 years agoREADME: Update to reflect that the driver is available upstream
Guenter Roeck [Sun, 12 Jan 2014 19:12:02 +0000 (11:12 -0800)]
README: Update to reflect that the driver is available upstream

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
6 years agoDeclare vid_from_reg and vid_which_vrm locally if HWMON_VID is not enabled
Guenter Roeck [Sun, 12 Jan 2014 19:00:23 +0000 (11:00 -0800)]
Declare vid_from_reg and vid_which_vrm locally if HWMON_VID is not enabled

This prevents compilation errors if HWMON_VID is not enabled in the system
configuration.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
6 years agoAdd declaration of PTR_ERR_OR_ZERO for kernels prior to 3.12
Guenter Roeck [Fri, 10 Jan 2014 00:12:52 +0000 (16:12 -0800)]
Add declaration of PTR_ERR_OR_ZERO for kernels prior to 3.12

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
6 years agoAdd known problem about fan control settings after resume to README file
Guenter Roeck [Thu, 26 Dec 2013 13:10:12 +0000 (05:10 -0800)]
Add known problem about fan control settings after resume to README file

Fan control settings are not restored in a resume cycle.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
6 years agosync with latest upstream version
Guenter Roeck [Thu, 26 Dec 2013 13:06:27 +0000 (05:06 -0800)]
sync with latest upstream version

Use devm_hwmon_device_register_with_groups() and sysfs_create_groups() if
possible.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
6 years agoAdd support for hibernate
Guenter Roeck [Wed, 25 Dec 2013 15:31:10 +0000 (07:31 -0800)]
Add support for hibernate

Hibernate uses its own set of callbacks, even if they are the same as
suspen/resume. Add support for it. Also synchronize NCT6791 suspend/resume
fix with upstream code.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
6 years agoRe-enable logical device mapping for NCT6791 after restore
Guenter Roeck [Mon, 23 Dec 2013 12:42:20 +0000 (04:42 -0800)]
Re-enable logical device mapping for NCT6791 after restore

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
6 years agonct6775: NCT6791 supports weight control only for CPUFAN
Guenter Roeck [Wed, 13 Nov 2013 06:14:19 +0000 (22:14 -0800)]
nct6775: NCT6791 supports weight control only for CPUFAN

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
6 years agonct6775: Monitor additional temperature registers
Guenter Roeck [Wed, 13 Nov 2013 03:14:04 +0000 (19:14 -0800)]
nct6775: Monitor additional temperature registers

The number of SMIOVT registers on NCT6779 and NCT6791 is limited to 2.
As result, the driver may not report some of the temperatures used for fan
control. Fortunately, the chip has registers to monitor those temperatures.
Add them to the list of temperatures to report.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
6 years agoREADME: Add comment about ASUS desktop boards
Guenter Roeck [Wed, 13 Nov 2013 03:13:45 +0000 (19:13 -0800)]
README: Add comment about ASUS desktop boards

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoUpdate compat.h to improve support of older kernels.
Guenter Roeck [Fri, 6 Sep 2013 16:28:45 +0000 (09:28 -0700)]
Update compat.h to improve support of older kernels.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agotemp[] array needs to have an entry for temp_lcrit
Guenter Roeck [Thu, 18 Jul 2013 07:49:54 +0000 (00:49 -0700)]
temp[] array needs to have an entry for temp_lcrit

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agohwmon: (nct6775) Avoid using device platform data outside probe function
Guenter Roeck [Mon, 8 Jul 2013 20:50:04 +0000 (13:50 -0700)]
hwmon: (nct6775) Avoid using device platform data outside probe function

Plan going forward is to attach all device attributes to the hwmon device and no
longer to the platform device. With that change, accessing platform data outside
the probe function will be more difficult. To avoid the problem, change code
to no longer rely on it.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoAdd support for NCT6791D. nct6775-v1.1
David Bartley [Mon, 24 Jun 2013 05:44:43 +0000 (22:44 -0700)]
Add support for NCT6791D.

Signed-off-by: David Bartley <andareed@gmail.com>
7 years agoAdd beep support
Guenter Roeck [Mon, 24 Jun 2013 13:56:13 +0000 (06:56 -0700)]
Add beep support

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoFix temperature alarms
Guenter Roeck [Sat, 22 Jun 2013 15:53:53 +0000 (08:53 -0700)]
Fix temperature alarms

Which temperatures generate alarms is not fixed but determined by
the temperature source mapping.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoDo not assign non-existing over-temperature and hysteresis registers nct6775-v1.0
Guenter Roeck [Thu, 9 May 2013 17:36:20 +0000 (10:36 -0700)]
Do not assign non-existing over-temperature and hysteresis registers

Overtemperature and hysteresis registers only exist for primary
temperature registers, not for alternates.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoReplace SENSORS_LIMIT in lm75.h with clamp_val
Guenter Roeck [Wed, 1 May 2013 21:26:00 +0000 (14:26 -0700)]
Replace SENSORS_LIMIT in lm75.h with clamp_val

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoSynchronize with upstream version
Guenter Roeck [Sun, 21 Apr 2013 16:45:40 +0000 (09:45 -0700)]
Synchronize with upstream version

Coding style impreovements
Improve sensor template definitions

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoAdd LICENSE file
Guenter Roeck [Wed, 17 Apr 2013 17:59:07 +0000 (10:59 -0700)]
Add LICENSE file

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoFix reported use of unassigned variable
Guenter Roeck [Sun, 14 Apr 2013 15:11:30 +0000 (08:11 -0700)]
Fix reported use of unassigned variable

In some conditions, the compiler reports the use of address as returned
from nct6775_find to be unassigned. Fix by returning it as return value
together with the error.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoUpdate README
Guenter [Sat, 13 Apr 2013 17:37:19 +0000 (10:37 -0700)]
Update README

Signed-off-by: Guenter <groeck@desktop.roeck-us.net>
7 years agoFoermatting changes: Fix checkpatch problems
Guenter Roeck [Sat, 13 Apr 2013 16:34:48 +0000 (09:34 -0700)]
Foermatting changes: Fix checkpatch problems

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoAdd support for critical low/high temperature limits on NCT6106
Guenter Roeck [Wed, 3 Apr 2013 05:14:06 +0000 (22:14 -0700)]
Add support for critical low/high temperature limits on NCT6106

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoAdd support for NCT6102D/6106D
Guenter Roeck [Sun, 1 Jul 2012 15:23:15 +0000 (08:23 -0700)]
Add support for NCT6102D/6106D

Basic testing.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoUse ARRAY_SIZE for loops where possible
Guenter Roeck [Tue, 9 Apr 2013 12:04:00 +0000 (05:04 -0700)]
Use ARRAY_SIZE for loops where possible

This ensures that the loop iterations are correct even if/when
the number of elements in an array changes.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoEnable both VIN3 and AUXTIN
Guenter Roeck [Sat, 6 Apr 2013 06:23:42 +0000 (23:23 -0700)]
Enable both VIN3 and AUXTIN

Both are reported at the same time on SuperMicro C7H61.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoSupport up to two SuperIO chips in the same system
Guenter Roeck [Wed, 3 Apr 2013 17:59:58 +0000 (10:59 -0700)]
Support up to two SuperIO chips in the same system

Support both SuperIO chips on SuperMicro C7H61-O.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agonct6775: Allocate and create attributes from templates
Guenter Roeck [Tue, 19 Mar 2013 15:11:42 +0000 (08:11 -0700)]
nct6775: Allocate and create attributes from templates

This patch significantly reduces the amount of boiler-plate code.
Module size is reduced by more than 20k.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoclarify supported chips nct6775-v0.9.1
Guenter Roeck [Wed, 3 Apr 2013 04:57:43 +0000 (21:57 -0700)]
clarify supported chips

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoDrop read/write lock
Guenter Roeck [Fri, 8 Mar 2013 15:44:56 +0000 (07:44 -0800)]
Drop read/write lock

The read/write lock is acquired for each read/write operation from/to the chip.
This occurs either during initialization, when it is not needed, or during
updates, when the update_lock is held as well, and it is not needed either.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoImprove temperature register array declarations
Guenter Roeck [Fri, 1 Mar 2013 20:38:11 +0000 (12:38 -0800)]
Improve temperature register array declarations

Specify explicit sizes for temperature register arrays.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agonct6775: Use clamp_val instead of SENSORS_LIMIT
Guenter Roeck [Tue, 26 Feb 2013 17:39:36 +0000 (09:39 -0800)]
nct6775: Use clamp_val instead of SENSORS_LIMIT

SENSORS_LIMIT has been deprecated and was removed from the upstream kernel.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agonct6775: Don't report VID if not supported
Guenter Roeck [Tue, 26 Feb 2013 07:18:12 +0000 (23:18 -0800)]
nct6775: Don't report VID if not supported

VID support is configured with CR2a on NCT6775 and NCT6776, so we can detect
if it is enabled. NCT6779 does not support VID at all.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoREADME: Add note about testing and review feedback nct6775-v0.9
Guenter Roeck [Fri, 21 Dec 2012 19:14:26 +0000 (11:14 -0800)]
README: Add note about testing and review feedback

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoAdd README.ASRock
Guenter Roeck [Fri, 21 Dec 2012 19:09:40 +0000 (11:09 -0800)]
Add README.ASRock

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoMinor bug fixes; include compat.h
Guenter Roeck [Wed, 12 Dec 2012 04:51:41 +0000 (20:51 -0800)]
Minor bug fixes; include compat.h

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoSpelling fix in README
Guenter Roeck [Tue, 11 Dec 2012 20:59:14 +0000 (12:59 -0800)]
Spelling fix in README

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 years agoLatest code; sync with proposed kernel version
Guenter Roeck [Tue, 11 Dec 2012 20:56:55 +0000 (12:56 -0800)]
Latest code; sync with proposed kernel version

Many attribute changes.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
8 years agoAdd backward compatibility to nct6775.c
Guenter Roeck [Mon, 6 Aug 2012 17:23:35 +0000 (10:23 -0700)]
Add backward compatibility to nct6775.c

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
8 years agoAdd backward compatibility support
Guenter Roeck [Mon, 6 Aug 2012 17:22:31 +0000 (10:22 -0700)]
Add backward compatibility support

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
8 years agoCleanup
Guenter Roeck [Wed, 25 Jul 2012 19:06:23 +0000 (12:06 -0700)]
Cleanup

Sort register definitions by chip type. Improve parameter alignment.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
8 years agohwmon: (nct6775) Fix temp array overflow
Guenter Roeck [Tue, 24 Jul 2012 03:57:16 +0000 (20:57 -0700)]
hwmon: (nct6775) Fix temp array overflow

With the addition of tempX_crit, there are four sets of temperature values
in the temp[][] array, but it was declared with a size of three. Fix it.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
8 years agoUpdate README
Guenter Roeck [Tue, 3 Jul 2012 14:31:00 +0000 (07:31 -0700)]
Update README

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
8 years agoREG_PWM_TEMP is not used, drop it.
Guenter Roeck [Sun, 1 Jul 2012 15:23:59 +0000 (08:23 -0700)]
REG_PWM_TEMP is not used, drop it.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
8 years agocosmetic: Formatting change
Guenter Roeck [Sat, 30 Jun 2012 17:33:20 +0000 (10:33 -0700)]
cosmetic: Formatting change

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