summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/it87.c
Commit message (Collapse)AuthorAgeFilesLines
* hwmon: (it87) Add support for IT8732FJustin Maggard2015-08-091-7/+36
| | | | | | | | | 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>
* hwmon: (it87) Use feature macros on sio_dataGuenter Roeck2015-04-091-2/+5
| | | | | | | 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>
* hwmon: (it87) Add support for 6th fan of IT8620EGuenter Roeck2015-04-051-15/+33
| | | | | | | IT8620E supports up to 6 fan tachometers. Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (it87) Add support for IT8620EGuenter Roeck2015-04-051-1/+42
| | | | | | | | | | | 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>
* hwmon: (it87) Add support for IT8790EGuenter Roeck2015-04-051-1/+13
| | | | | | | | | 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>
* hwmon: (it87) Introduce feature flag to reflect internal in7 sensorGuenter Roeck2015-04-051-11/+16
| | | | | | | | | 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>
* hwmon: (it87) Introduce configuration field for chip suffixGuenter Roeck2015-04-051-3/+17
| | | | | | | | | 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>
* hwmon: (it87) Fix PWM frequency display for chips with newer PWM controlGuenter Roeck2015-04-051-9/+25
| | | | | | | | | | 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>
* hwmon: (it87) Fix pwm sysfs attribute removalGuenter Roeck2015-03-301-1/+1
| | | | | | | | | | | 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>
* hwmon: (it87) No need to skip fan4 for IT8603Guenter Roeck2015-03-091-4/+0Star
| | | | | | | 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>
* hwmon: (it87) Add support for IT8786EThomas Lorblanches2015-03-091-6/+16
| | | | | | | | | | 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>
* hwmon: (it87) Add feature flag for VID supportGuenter Roeck2015-03-091-20/+11Star
| | | | | | | | | 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>
* hwmon: (it87) Add feature flags for fans count and 16-bit fan configurationGuenter Roeck2015-03-091-33/+36
| | | | | | | | | 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>
* hwmon: (it87) Don't configure 16 bit fan counters it not necessaryGuenter Roeck2015-03-091-3/+6
| | | | | | | | 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>
* hwmon: (it87) Add support for IT8781FGuenter Roeck2015-03-091-8/+24
| | | | | | | | | 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>
* hwmon: drop owner assignment from platform_driversWolfram Sang2014-10-201-1/+0Star
| | | | | | | 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>
* hwmon: (it87) Add support for IT8623ERudolf Marek2014-04-041-0/+3
| | | | | | | | 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>
* hwmon: (it87) Fix IT8603E define nameRudolf Marek2014-04-041-3/+3
| | | | | | | 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>
* Update Jean Delvare's e-mail addressJean Delvare2014-01-291-2/+2
| | | | Signed-off-by: Jean Delvare <khali@linux-fr.org>
* hwmon: (it87) Print proper names for the IT8771E and IT8772EJean Delvare2014-01-291-0/+1
| | | | | | | | 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>
* hwmon: (it87) Add support for the ITE IT8603ERudolf Marek2014-01-291-18/+85
| | | | | | | | | | | | 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>
* hwmon: use dev_get_platdata()Jingoo Han2013-08-121-3/+3
| | | | | | | | 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>
* hwmon: Fix CamelCase checkpatch warningsGuenter Roeck2013-04-081-12/+12
| | | | Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (it87) Add support for IT8771E and IT8772EGuenter Roeck2013-02-061-4/+35
| | | | | | | | | 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>
* hwmon: Replace SENSORS_LIMIT with clamp_valGuenter Roeck2013-01-261-7/+6Star
| | | | | | | | | | | | 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>
* hwmon: (it87) Support PECI for additional chipsGuenter Roeck2012-12-191-10/+38
| | | | | | | | | | 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>
* hwmon: (it87) Report thermal sensor type as Intel PECI if appropriateGuenter Roeck2012-12-191-3/+17
| | | | | | | | | | | | 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>
* hwmon: (it87) Manage device specific features with tableGuenter Roeck2012-12-191-74/+81
| | | | | | | | | 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>
* hwmon: (it87) Replace pwm group macro with direct attribute definitionsGuenter Roeck2012-12-191-41/+74
| | | | | | | | | 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>
* hwmon: (it87) Avoid quoted string splits across linesGuenter Roeck2012-12-191-14/+13Star
| | | | | | | Fix the respective checkpatch warnings. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* hwmon: (it87) Save fan registers in 2-dimensional arrayGuenter Roeck2012-12-191-159/+104Star
| | | | | | | | | 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>
* hwmon: (it87) Introduce support for tempX_offset sysfs attributeGuenter Roeck2012-12-191-5/+61
| | | | | Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* hwmon: (it87) Replace macro defining tempX_type sensors with direct definitionsGuenter Roeck2012-12-191-10/+11
| | | | | | | | | | | 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>
* hwmon: (it87) Save voltage register values in 2-dimensional arrayGuenter Roeck2012-12-191-81/+66Star
| | | | | | | | 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>
* hwmon: (it87) Save temperature registers in 2-dimensional arrayGuenter Roeck2012-12-191-63/+35Star
| | | | | | | | 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>
* hwmon: remove use of __devexitBill Pemberton2012-11-281-2/+2
| | | | | | | | | | | | | | | | | | | | | 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>
* hwmon: remove use of __devinitBill Pemberton2012-11-281-3/+3
| | | | | | | | | | | | | | | | | | | | | 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>
* hwmon: remove use of __devexit_pBill Pemberton2012-11-281-1/+1
| | | | | | | | | | | | | | | | | | | | | 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>
* hwmon: (it87) Preserve configuration register bits on initJean Delvare2012-07-121-1/+1
| | | | | | | | | | | | 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>
* hwmon: (it87) Make temp3 attribute conditional for IT8782FGuenter Roeck2012-05-221-20/+61
| | | | | | | 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>
* hwmon: (it87) Convert to use devm_kzalloc and devm_request_regionGuenter Roeck2012-05-221-34/+20Star
| | | | | | | 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>
* hwmon: (it87) Create voltage attributes only if voltage is enabledGuenter Roeck2012-05-211-38/+124
| | | | | | | | 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>
* hwmon: (it87) Add support for IT8782F and IT8783E/FGuenter Roeck2012-05-211-26/+99
| | | | | Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
* hwmon: (it87) Constify fixed string arraysGuenter Roeck2012-03-191-3/+3
| | | | | | | | 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>
* hwmon: (it87) Fix multi-line commentsGuenter Roeck2012-03-191-62/+108
| | | | | | | | 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>
* hwmon: (it87) Add IT8728F supportJean Delvare2012-01-161-15/+46
| | | | | | | | | | 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>
* module_param: make bool parameters really bool (drivers & misc)Rusty Russell2012-01-131-2/+2
| | | | | | | | | | | | 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>
* hwmon: replaced strict_str* with kstr*Frans Meulenbroeks2012-01-051-17/+17
| | | | | | | | | | | 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>
* hwmon: (it87) Add chassis intrusion detection supportJean Delvare2011-07-251-0/+29
| | | | | | | Add chassis intrusion detection support for all supported devices, using the standard interface. Signed-off-by: Jean Delvare <khali@linux-fr.org>
* hwmon: (it87) Fix label group removalJean Delvare2011-07-171-1/+1
| | | | | | | | | | | 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>