summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon
Commit message (Collapse)AuthorAgeFilesLines
* hwmon: (pwm-fan) Fix module autoload for OF platform driverLuis de Bethencourt2015-09-201-0/+1
| | | | | | | | This platform driver has a OF device ID table but the OF module alias information is not created so module autoloading won't work. Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (gpio-fan) Fix module autoload for OF platform driverLuis de Bethencourt2015-09-201-0/+1
| | | | | | | | This platform driver has a OF device ID table but the OF module alias information is not created so module autoloading won't work. Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (abx500) Fix module autoload for OF platform driverLuis de Bethencourt2015-09-201-0/+1
| | | | | | | | This platform driver has a OF device ID table but the OF module alias information is not created so module autoloading won't work. Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (nct6775) Add support for NCT6793DGuenter Roeck2015-09-122-18/+34
| | | | | | | | | | | NCT6793D is register compatible with NCT6792D. Also move nct6775_sio_names[] closer to enum kinds to simplify adding new chips. Tested-by: Grazvydas Ignotas <notasas@gmail.com> Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (nct6775) Swap STEP_UP_TIME and STEP_DOWN_TIME registers for most chipsGuenter Roeck2015-09-121-6/+10
| | | | | | | | | | The STEP_UP_TIME and STEP_DOWN_TIME registers are swapped for all chips but NCT6775. Reported-by: Grazvydas Ignotas <notasas@gmail.com> Reviewed-by: Jean Delvare <jdelvare@suse.de> Cc: stable@vger.kernel.org # v3.10+ Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* Merge branch 'next' of ↵Linus Torvalds2015-09-113-3/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux Pull thermal updates from Zhang Rui: - use int instead of unsigned long to represent temperature to avoid bogus overheat detection when negative temperature reported. From Sascha Hauer. - export available thermal governors information to user space via sysfs. From Wei Ni. - introduce new thermal driver for Wildcat Point platform controller hub, which uses PCH thermal sensor and associated critical and hot trip points. From Tushar Dave. - add suuport for Intel Skylake and Denlow platforms in powerclamp driver. - some small cleanups in thermal core. * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: thermal: Add Intel PCH thermal driver thermal: Add comment explaining test for critical temperature thermal: Use IS_ENABLED instead of #ifdef thermal: remove unnecessary call to thermal_zone_device_set_polling thermal: trivial: fix typo in comment thermal: consistently use int for temperatures thermal: add available policies sysfs attribute thermal/powerclamp: add cpu id for denlow platform thermal/powerclamp: add cpu id for Skylake u/y thermal/powerclamp: add cpu id for skylake h/s
| *-. Merge branches 'thermal-core' and 'thermal-intel' of .git into nextZhang Rui2015-09-023-3/+3
| |\ \
| | * | thermal: consistently use int for temperaturesSascha Hauer2015-08-033-3/+3
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The thermal code uses int, long and unsigned long for temperatures in different places. Using an unsigned type limits the thermal framework to positive temperatures without need. Also several drivers currently will report temperatures near UINT_MAX for temperatures below 0°C. This will probably immediately shut the machine down due to overtemperature if started below 0°C. 'long' is 64bit on several architectures. This is not needed since INT_MAX °mC is above the melting point of all known materials. Consistently use a plain 'int' for temperatures throughout the thermal code and the drivers. This only changes the places in the drivers where the temperature is passed around as pointer, when drivers internally use another type this is not changed. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Lukasz Majewski <l.majewski@samsung.com> Reviewed-by: Darren Hart <dvhart@linux.intel.com> Reviewed-by: Heiko Stuebner <heiko@sntech.de> Reviewed-by: Peter Feuerer <peter@piie.net> Cc: Punit Agrawal <punit.agrawal@arm.com> Cc: Zhang Rui <rui.zhang@intel.com> Cc: Eduardo Valentin <edubezval@gmail.com> Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Jean Delvare <jdelvare@suse.de> Cc: Peter Feuerer <peter@piie.net> Cc: Heiko Stuebner <heiko@sntech.de> Cc: Lukasz Majewski <l.majewski@samsung.com> Cc: Stephen Warren <swarren@wwwdotorg.org> Cc: Thierry Reding <thierry.reding@gmail.com> Cc: linux-acpi@vger.kernel.org Cc: platform-driver-x86@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-omap@vger.kernel.org Cc: linux-samsung-soc@vger.kernel.org Cc: Guenter Roeck <linux@roeck-us.net> Cc: Rafael J. Wysocki <rjw@rjwysocki.net> Cc: Maxime Ripard <maxime.ripard@free-electrons.com> Cc: Darren Hart <dvhart@infradead.org> Cc: lm-sensors@lm-sensors.org Signed-off-by: Zhang Rui <rui.zhang@intel.com>
* | | hwmon: (fam15h_power) Add ratio of Tsample to the PTSC periodHuang Rui2015-08-271-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a member (cpu_pwr_sample_ratio) of fam15h_power_data, that represents the ratio of compute unit power accumulator sample period to the PTSC counter period. Tsample: compute unit power accumulator sample period Tref: the performance timestamp counter period PTSC: performance timestamp counter Signed-off-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon: (fam15h_power) Update running_avg_capture bit field to 28Huang Rui2015-08-271-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | On Carrizo and later platforms, running_avg_capture bit field is extended to 4:31 (28 bits) from 4:25. Signed-off-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon: (fam15h_power) Rename fam15h_power_is_internal_node0 functionHuang Rui2015-08-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | We rename fam15h_power_is_internal_node0() function to should_load_on_this_node(), because it may not be node0 from KV and on, and they are single-node processors. Signed-off-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon: (fam15h_power) Add support for AMD CarrizoHuang Rui2015-08-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | AMD Carrizo(Fam15h, M60h) processors can report power1_crit (ProcessorPwrWatts) and power1_input (CurrPwrWatts) values. And this patch adds support for CZ. Signed-off-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon: (ltc2978) Add support for LTM4675Guenter Roeck2015-08-192-3/+9
| | | | | | | | | | | | | | | | | | | | | LTM2975 is a dual 9A or single 18A μModule regulator. It is register compatible with LTM4676. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon: (ltc2978) Add polling for chips requiring itMichael Jones2015-08-191-10/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | Some of the LTC chips supported by this driver have to be polled to ensure that they are ready to accept commands. Signed-off-by: Michael Jones <mike@proclivis.com> [Guenter Roeck: simplifications and formatting changes] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon: (pmbus) Enable PEC if the controller supports itGuenter Roeck2015-08-191-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | PMBus controllers optionally support PEC. Configure the driver to use it if available to improve operational security. Suggested-by: Michael Jones <mike@proclivis.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon: (pmbus) Use BIT macroGuenter Roeck2015-08-195-102/+107
| | | | | | | | | | | | | | | | | | Using the BIT macro makes the code a little easier to read. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon: (ltc2978) Add support for LTC3886Guenter Roeck2015-08-172-3/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LTC3886 is a is a dual PolyPhase DC/DC synchronous step-down switching regulator controller. It is mostly command compatible to LTC3883, but supports two phases instead of one. Suggested-by: Michael Jones <mike@proclivis.com> Tested-by: Michael Jones <mike@proclivis.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon: (ltc2978) Add support for LTC2980 and LTM2987Guenter Roeck2015-08-172-5/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LTC2980 and LTM2987 are command compatible to LTC2977. They consist of two LTC2977 on a single die, and are instantiated as two separate chips, each supporting eight channels. Suggested-by: Michael Jones <mike@proclivis.com> Tested-by: Michael Jones <mike@proclivis.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon: (ltc2978) Add missing chip IDs for LTC2978 and LTC3882Guenter Roeck2015-08-171-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add additional chip ID for an older revision of LTC2978, as well as two chip IDs for LTC3882. Turns out the LTC3882 does support the LTC2978_MFR_SPECIAL_ID register, and reading it returns its chip ID, but the register is undocumented. Suggested-by: Michael Jones <mike@proclivis.com> Tested-by: Michael Jones <mike@proclivis.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon: (ltc2978) Use correct ID mask to detect all chipsGuenter Roeck2015-08-171-22/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Per information from Linear Technologies, the ID mask is 12 bit for all chips of this series. Use this mask to detect chips to ensure that all chip revisions are detected. Suggested-by: Michael Jones <mike@proclivis.com> Tested-by: Michael Jones <mike@proclivis.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon: (ltc2978) Introduce helper functions for min and max valuesGuenter Roeck2015-08-171-91/+57
| | | | | | | | | | | | | | | | | | | | | | | | The code used to determine historic low and high peaks is repeated several times. Introduce helper functions to simplify it. Tested-by: Michael Jones <mike@proclivis.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon: (ltc2978) Introduce feature flagsGuenter Roeck2015-08-171-12/+18
| | | | | | | | | | | | | | | | | | | | | | | | It is becoming cumbersom to track per-chip feature support. Introduce feature flag to simplify the code. Tested-by: Michael Jones <mike@proclivis.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon: (pmbus) Convert command register definitions to enumGuenter Roeck2015-08-171-140/+142
| | | | | | | | | | | | | | | | | | | | | This will simplify adding new virtual commands. Tested-by: Michael Jones <mike@proclivis.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon: (ltc2978) Add support for LTC2975Guenter Roeck2015-08-172-12/+96
| | | | | | | | | | | | | | | | | | | | | | | | LTC2975 is mostly compatible to LTC2974, but supports input current and power measurement. Tested-by: Michael Jones <mike@proclivis.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon: (ltc2978) Add support for LTC3887Guenter Roeck2015-08-122-6/+16
| | | | | | | | | | | | | | | | | | LTC3887 is an enhanced version of LTC3880 and supports the same commands. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon: (ltc2978) Add additional chip IDs for LTM4676 and LTM4676AGuenter Roeck2015-08-121-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Per datasheet, the chip ID for LTM4676 is 0x448x. This was observed in real systems. In addition to that, chip ID 0x4401 was observed as well. Research shows that the chip ID has been changed from 0x440x to 0x448x in datasheet revision C. Add support for the additional chip ID. Also add the chip ID for LTM4676A, which is functionally identical to LTM4676. Reported-by: Ananda Babu Nettam <anandab@juniper.net> Cc: Ananda Babu Nettam <anandab@juniper.net> Cc: Amit U Jain <amjain@juniper.net> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon: (ltc2978) Add support for LTC3882Guenter Roeck2015-08-121-6/+44
| | | | | | | | | | | | | | | | | | | | | | | | LTC3882 is mostly compatible with LTC3880. Major differences are that it does not measure the input current, and it no longer supports LTC's legacy mechanism to identify the chip. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon: (ltc2978) Move code to read chip ID into separate functionGuenter Roeck2015-08-121-19/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | Verifying the chip type is getting more complicated with new chips, since not all chips support the same mechanism to read the chip type. Move the code into a separate function to simplify adding support for those chips. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon:change sht15_reverse()yalin wang2015-08-101-16/+4
| | | | | | | | | | | | | | | | | | | | | This change sht15_reverse() to be generic bitrev8(). Signed-off-by: yalin wang <yalin.wang2010@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon: (pmbus) Add device IDs for TPS544{B,C}2{0,5}Guenter Roeck2015-08-102-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | Add device IDs and references for Texas Instruments TPS544B20, TPS544B25, TPS544C20, and TPS544C25 to the generic PMBus driver. Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon: (pmbus) Add support for MAX20751Guenter Roeck2015-08-093-0/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MAX20751 is a multiphase power controller with internal buck converter. It uses VR12.0 to report the output voltage. This requires an explicit driver, since the VR version can not be auto-detected. The chip supports a manufacturer specific command to fine-tune the output voltage. This command is not currently supported. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon: (pmbus) Add support for VR12Guenter Roeck2015-08-093-4/+15
| | | | | | | | | | | | | | | | | | Newer chips such as MAX20751 support VR12. Add support for it. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon: (it87) Add support for IT8732FJustin Maggard2015-08-092-9/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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: (nct7802) Add auto_point attributesConstantine Shulyupin2015-08-091-4/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | Introduced REG_PWM, pwm[1..3]_auto_point[1..5]_temp, pwm[1..3]_auto_point[1..5]_pwm, nct7802_auto_point_attrs, nct7802_auto_point_group, updated nct7802_regmap_is_volatile Signed-off-by: Constantine Shulyupin <const@MakeLinux.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon: (lm70) add device tree supportRabin Vincent2015-08-091-1/+33
| | | | | | | | | | | | | | | | | | | | | Allow the lm70 to be probed from a device tree. Signed-off-by: Rabin Vincent <rabin@rab.in> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon: (ltc2978) LTM4676 supports CLEAR_PEAKSGuenter Roeck2015-08-091-1/+1
| | | | | | | | | | | | | | | | | | | | | Use the CLEAR_PEAKS command on LTM4676. Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon: (adm1275) Add support for ADM1293 and ADM1294Guenter Roeck2015-08-092-10/+135
| | | | | | | | | | | | | | | | | | | | | | | | ADM1293 and ADM1294 are mostly compatible with other chips of the same series, but have more configuration options. There are also some differences in register details. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon: (pmbus) Add support for lowest power value attributesGuenter Roeck2015-08-092-24/+34
| | | | | | | | | | | | | | | | | | Add support for powerX_input_lowest for both input and output power. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon: (adm1275) Introduce new feature flagsGuenter Roeck2015-08-091-43/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce have_vout, have_vaux_status, have_pin_max, and have_uc_fault to simplify adding support for new chips. Also simplify error returns where appropriate to return immediately on error. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon: (adm1275) Introduce configuration data structure for coeffcientsGuenter Roeck2015-08-091-45/+68
| | | | | | | | | | | | | | | | | | | | | | | | Each new chip supported by the driver has a new set of coefficients, making hard-coding coefficients more and more cumbersome. Introduce a datastructure and table to simplify configuration. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon: (adm1275) Use BIT macroGuenter Roeck2015-08-091-9/+10
| | | | | | | | | | | | | | | | | | Use BIT macro to simplify adding new bit masks. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon: (pmbus_core) Constify pmbus_regulator_opsAxel Lin2015-08-092-2/+2
| | | | | | | | | | | | | | | | | | | | | pmbus_regulator_ops is not modified after initialized, so make it const. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon: (pmbus) Explicitly set regulator type for pmbus_regulator_opsAxel Lin2015-08-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | The pmbus_regulator_ops is for voltage regulators, so explicitly set regulator type for better readability. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon: (g762) Drop owner assignment from struct i2c_driverKrzysztof Kozlowski2015-08-091-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | i2c_driver does not need to set an owner because i2c_register_driver() will set it. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon: (f71882fg) Add support for f81768dGeorge Joseph2015-08-091-16/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add f81768d (id 0x1210) currently found on Jetway motherboards. It has 11 voltages but otherwise needed no special handling in this driver. Signed-off-by: George Joseph <george.joseph@fairview5.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon: (nct7802) Add pwmX_enable attributeConstantine Shulyupin2015-08-091-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | Introduced REG_SMARTFAN_EN, SMARTFAN_EN_SHIFT, pwmX_enable, show_pwm_enable, store_pwm_enable. Signed-off-by: Constantine Shulyupin <const@MakeLinux.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon:(f71882fg) Fix f81866a voltage protectionPeter Hung2015-08-091-9/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The f81866a voltage-1 protector(VIN1) address is differ from f71882. f71882 status:12H, beep:13H, v-high:32H f81866a status:16H, beep:17H, v-high:3aH Signed-off-by: Peter Hung <hpeter+linux_kernel@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon: (f71882fg) Fix f81866a temp/beep settingPeter Hung2015-08-091-8/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The temperature value of Fintek F81866 is the same with f71882fg. It located with 0x6c + 2*(nr), others located with 0x6c + 2*(nr+1). We change the rule in f71882fg_probe(), If type = f71858fg/f8000/f81866a. the temp_start will set to 0, others are 1. The F81866 over-temperature beep setting is not the same with f71882fg too. They are using the same address 63H, but F81866 is using bit 0/1/2 & 4/5/6, others are using bit 1/2/3 & 5/6/7, So we copy from fxxxx_temp_beep_attr[] to f81866_temp_beep_attr and change bit setting. Signed-off-by: Peter Hung <hpeter+linux_kernel@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon: (f71882fg) Add support for F81866 and F71868Peter Hung2015-08-091-15/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add New Fintek SuperIO F81866(0x1010) & F71868(0x1106) with H/W Monitor functions. We increased F71882FG_MAX_INS from 9 to 10 to read F71868 10 voltage sets. Signed-off-by: Peter Hung <hpeter+linux_kernel@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* | | hwmon: (nct7802) Add pwm mode attributesConstantine Shulyupin2015-08-091-0/+26
| | | | | | | | | | | | | | | | | | Introduced: show_pwm_mode, pwm1_mode, pwm2_mode, pwm2_mode Signed-off-by: Guenter Roeck <linux@roeck-us.net>
OpenPOWER on IntegriCloud