summaryrefslogtreecommitdiff
path: root/drivers/hwmon/it87.c
AgeCommit message (Collapse)Author
2015-08-09hwmon: (it87) Add support for IT8732FJustin Maggard
Add support for the IT8732F. This chip is pretty similar to IT8721F, with the main difference being that the ADC LSB is 10.9 mV instead of 12 mV. Signed-off-by: Justin Maggard <jmaggard@netgear.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-04-09hwmon: (it87) Use feature macros on sio_dataGuenter Roeck
Feature macros work on sio_data as well, so use them there. Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-04-05hwmon: (it87) Add support for 6th fan of IT8620EGuenter Roeck
IT8620E supports up to 6 fan tachometers. Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-04-05hwmon: (it87) Add support for IT8620EGuenter Roeck
IT8620E is mostly compatible to IT7828F. Add generic support for it. IT8620E supports up to 6 fan tachometers and 6 pwm controls. Support for the 6th tachometer and for the additional pwm controls are addded in separate patches. Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-04-05hwmon: (it87) Add support for IT8790EGuenter Roeck
IT8790E is a super-IO chip with three fan tachometers. It is mostly compatible to IT8728F, but only supports three fan tachometers instead of five. Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-04-05hwmon: (it87) Introduce feature flag to reflect internal in7 sensorGuenter Roeck
On some chips, in7 is always an internal voltage sensor. Introduce feature flag to reflect this condition to simplify adding support for new chips. Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-04-05hwmon: (it87) Introduce configuration field for chip suffixGuenter Roeck
ITE chips may have 'E', 'F', or both 'E' and 'F' suffixes. Introduce suffic configuration to the it87_devices structure to simplify adding new chips. Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-04-05hwmon: (it87) Fix PWM frequency display for chips with newer PWM controlGuenter Roeck
On chips with newer PWM control, the PWM frequency divider is 256 instead of 128. Since the base PWM frequency remained the same, the actual PWM frequency is half of what it used to be with the older PWM control mechanism. Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-03-30hwmon: (it87) Fix pwm sysfs attribute removalGuenter Roeck
Detection if a pwm channel is supported was wrong on removal, causing the code to try removing non-existing sysfs attributes. That didn't matter much because sysfs attribute removal of non-existing files fails silently, and because the wrong evaluation always returned false, but should nevertheless be fixed. Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-03-09hwmon: (it87) No need to skip fan4 for IT8603Guenter Roeck
IT8603 only supports three fans, so it is not necessary to skip fan4. Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-03-09hwmon: (it87) Add support for IT8786EThomas Lorblanches
IT8786E is mostly compatible with IT8771 / IT8772. Parameters determined by testing various combinations. Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Thomas Lorblanches <zlika_ese@hotmail.com> [Guenter Roeck: merged from github, addressed review comments] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-03-09hwmon: (it87) Add feature flag for VID supportGuenter Roeck
Newer chips don't typically support VID inputs or control. Add a feature flag for VID support to simplify adding support for new chips. Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-03-09hwmon: (it87) Add feature flags for fans count and 16-bit fan configurationGuenter Roeck
Fans 4-5 are not supported on all chips and revisions. Also, 16-bit fan counters are always enabled on some chips. Provide feature flags to simplify adding support for new chips. Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-03-09hwmon: (it87) Don't configure 16 bit fan counters it not necessaryGuenter Roeck
On IT8728F, IT8771E, and IT8772E, fans counters are always 16 bit and don't need to be configured for it. Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-03-09hwmon: (it87) Add support for IT8781FGuenter Roeck
IT8781F is mostly compatible to IT8782F. Major difference is that it only supports four instead of six UART channels, and therefore does not share the uart6 pins. Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-10-20hwmon: drop owner assignment from platform_driversWolfram Sang
A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-04-04hwmon: (it87) Add support for IT8623ERudolf Marek
Add support for the IT8623E found on Asus motherboards. It has same hardware monitoring block as IT8603E. Signed-off-by: Rudolf Marek <r.marek@assembler.cz> Signed-off-by: Jean Delvare <jdelvare@suse.de>
2014-04-04hwmon: (it87) Fix IT8603E define nameRudolf Marek
Fix small typo in the define name for IT8603E. Signed-off-by: Rudolf Marek <r.marek@assembler.cz> Signed-off-by: Jean Delvare <jdelvare@suse.de>
2014-01-29Update Jean Delvare's e-mail addressJean Delvare
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2014-01-29hwmon: (it87) Print proper names for the IT8771E and IT8772EJean Delvare
The driver prints IT8771F and IT8772F instead of IT8771E and IT8772E respectively when the driver is loaded. This is a cosmetic only bug but let's fix it. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2014-01-29hwmon: (it87) Add support for the ITE IT8603ERudolf Marek
Add support for IT8603E. This closes bug #57861: https://bugzilla.kernel.org/show_bug.cgi?id=57861 [JD: Fixes and clean-ups.] Signed-off-by: Rudolf Marek <r.marek@assembler.cz> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2013-08-11hwmon: use dev_get_platdata()Jingoo Han
Use the wrapper function for retrieving the platform data instead of accessing dev->platform_data directly. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-04-07hwmon: Fix CamelCase checkpatch warningsGuenter Roeck
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-02-06hwmon: (it87) Add support for IT8771E and IT8772EGuenter Roeck
Assume that IT8771E and IT8772E are fully compatible with IT8728F. IT8771E support contributed by Kelly Anderson. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Jean Delvare <khali@linux-fr.org>
2013-01-25hwmon: Replace SENSORS_LIMIT with clamp_valGuenter Roeck
SENSORS_LIMIT and the generic clamp_val have the same functionality, and clamp_val is more efficient. This patch reduces text size by 9052 bytes and bss size by 11624 bytes for x86_64 builds. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: George Joseph <george.joseph@fairview5.com> Acked-by: Jean Delvare <khali@linux-fr.org>
2012-12-19hwmon: (it87) Support PECI for additional chipsGuenter Roeck
Extend support for reporting and selecting PECI temperature sensors to IT8718, IT8720, IT8782, and IT8783. For IT8721, report the sensor type for temp2 as Intel PECI (6) if the chip is configured to report the PCH temperature. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2012-12-19hwmon: (it87) Report thermal sensor type as Intel PECI if appropriateGuenter Roeck
IT8721 and IT8728 support Intel PECI temperature reporting. Each sensor can be programmed to display the temperature reported on the PECI interface. If configured for Intel PECI, the driver reported the wrong sensor type for the respective thermal sensor. Fix the code to correctly report it as "Intel PECI (6)". Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2012-12-19hwmon: (it87) Manage device specific features with tableGuenter Roeck
This simplifies the code, improves runtime performance, reduces code size (about 280 bytes on x86_64), and makes it easier to add support for new devices. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2012-12-19hwmon: (it87) Replace pwm group macro with direct attribute definitionsGuenter Roeck
Fix checkpatch error: ERROR: Macros with multiple statements should be enclosed in a do - while loop Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2012-12-19hwmon: (it87) Avoid quoted string splits across linesGuenter Roeck
Fix the respective checkpatch warnings. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2012-12-19hwmon: (it87) Save fan registers in 2-dimensional arrayGuenter Roeck
Also unify fan functions to use the same code for 8 and 16 bit fans. This patch reduces code size by approximately 1,200 bytes on x86_64. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2012-12-19hwmon: (it87) Introduce support for tempX_offset sysfs attributeGuenter Roeck
Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2012-12-19hwmon: (it87) Replace macro defining tempX_type sensors with direct definitionsGuenter Roeck
The macro name show_sensor_offset is confusing since it related to the sensor type, not an offset - even more so when we introduce offset attributes later on. Replace it with direct definitions, and replace the show_sensor/set_sensor function names with show_temp_type/set_temp_type. This also resolves a checkpatch error. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2012-12-19hwmon: (it87) Save voltage register values in 2-dimensional arrayGuenter Roeck
Reduces code size (more than 600 bytes on x86_64), and gets rid of some checkpatch errors. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2012-12-19hwmon: (it87) Save temperature registers in 2-dimensional arrayGuenter Roeck
Cleaner code, fewer checkpatch errors, and reduced code size (saves more than 500 bytes on x86-64). Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2012-11-28hwmon: remove use of __devexitBill Pemberton
CONFIG_HOTPLUG is going away as an option so __devexit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Jean Delvare <khali@linux-fr.org> Cc: Alistair John Strachan <alistair@devzero.co.uk> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: Juerg Haefliger <juergh@gmail.com> Cc: Andreas Herrmann <herrmann.der.user@googlemail.com> Cc: Clemens Ladisch <clemens@ladisch.de> Cc: Rudolf Marek <r.marek@assembler.cz> Cc: Jim Cromie <jim.cromie@gmail.com> Cc: "Mark M. Hoffman" <mhoffman@lightlink.com> Cc: Roger Lucas <vt8231@hiddenengine.co.uk> Acked-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-28hwmon: remove use of __devinitBill Pemberton
CONFIG_HOTPLUG is going away as an option so __devinit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Jean Delvare <khali@linux-fr.org> Cc: Alistair John Strachan <alistair@devzero.co.uk> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: Juerg Haefliger <juergh@gmail.com> Cc: Andreas Herrmann <herrmann.der.user@googlemail.com> Cc: Clemens Ladisch <clemens@ladisch.de> Cc: Rudolf Marek <r.marek@assembler.cz> Cc: Jim Cromie <jim.cromie@gmail.com> Cc: "Mark M. Hoffman" <mhoffman@lightlink.com> Cc: Roger Lucas <vt8231@hiddenengine.co.uk> Acked-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-28hwmon: remove use of __devexit_pBill Pemberton
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Jean Delvare <khali@linux-fr.org> Cc: Alistair John Strachan <alistair@devzero.co.uk> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: Juerg Haefliger <juergh@gmail.com> Cc: Andreas Herrmann <herrmann.der.user@googlemail.com> Cc: Clemens Ladisch <clemens@ladisch.de> Cc: Rudolf Marek <r.marek@assembler.cz> Cc: Jim Cromie <jim.cromie@gmail.com> Cc: "Mark M. Hoffman" <mhoffman@lightlink.com> Cc: Roger Lucas <vt8231@hiddenengine.co.uk> Acked-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-12hwmon: (it87) Preserve configuration register bits on initJean Delvare
We were accidentally losing one bit in the configuration register on device initialization. It was reported to freeze one specific system right away. Properly preserve all bits we don't explicitly want to change in order to prevent that. Reported-by: Stevie Trujillo <stevie.trujillo@gmail.com> Cc: stable@vger.kernel.org Signed-off-by: Jean Delvare <khali@linux-fr.org> Reviewed-by: Guenter Roeck <linux@roeck-us.net>
2012-05-22hwmon: (it87) Make temp3 attribute conditional for IT8782FGuenter Roeck
On IT8782F, temp3 is only supported if UART6 is disabled. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
2012-05-22hwmon: (it87) Convert to use devm_kzalloc and devm_request_regionGuenter Roeck
This makes the code a bit simpler and smaller. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
2012-05-20hwmon: (it87) Create voltage attributes only if voltage is enabledGuenter Roeck
On IT8782F and IT8783F, some voltage input pins may be disabled. Don't create sysfs attribute files if that is the case. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
2012-05-20hwmon: (it87) Add support for IT8782F and IT8783E/FGuenter Roeck
Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
2012-03-18hwmon: (it87) Constify fixed string arraysGuenter Roeck
Make checkpatch happy by constifying fixed string arrays. Cc: Jean Delvare <khali@linux-fr.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
2012-03-18hwmon: (it87) Fix multi-line commentsGuenter Roeck
Fix multi-line comments, and clean up some of the affected comments. Cc: Jean Delvare <khali@linux-fr.org> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-01-16hwmon: (it87) Add IT8728F supportJean Delvare
Until we get a datasheet for the IT8728F, treat it as fully compatible with the IT8721F, as it seems to work reasonably well. This closes kernel bug #27262. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-01-13module_param: make bool parameters really bool (drivers & misc)Rusty Russell
module_param(bool) used to counter-intuitively take an int. In fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy trick. It's time to remove the int/unsigned int option. For this version it'll simply give a warning, but it'll break next kernel version. Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-01-05hwmon: replaced strict_str* with kstr*Frans Meulenbroeks
replaced strict_strtol with kstrtol and replaced strict_strtuol with kstrtuol This satisfies checkpatch -f Compile tested only: no warnings or errors given Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-07-25hwmon: (it87) Add chassis intrusion detection supportJean Delvare
Add chassis intrusion detection support for all supported devices, using the standard interface. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2011-07-17hwmon: (it87) Fix label group removalJean Delvare
A copy-and-paste error caused it87_attributes_vid to be referenced where it87_attributes_label should be. Thankfully the group is only used for attribute removal, not attribute creation, so the effects of this bug are limited, but let's fix it still. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: stable@kernel.org Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>