summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon
AgeCommit message (Collapse)AuthorFilesLines
2015-09-20hwmon: (pwm-fan) Fix module autoload for OF platform driverLuis de Bethencourt1-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>
2015-09-20hwmon: (gpio-fan) Fix module autoload for OF platform driverLuis de Bethencourt1-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>
2015-09-20hwmon: (abx500) Fix module autoload for OF platform driverLuis de Bethencourt1-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>
2015-09-12hwmon: (nct6775) Add support for NCT6793DGuenter Roeck2-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>
2015-09-12hwmon: (nct6775) Swap STEP_UP_TIME and STEP_DOWN_TIME registers for most chipsGuenter Roeck1-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>
2015-09-11Merge branch 'next' of ↵Linus Torvalds3-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
2015-09-02Merge branches 'thermal-core' and 'thermal-intel' of .git into nextZhang Rui3-3/+3
2015-08-27hwmon: (fam15h_power) Add ratio of Tsample to the PTSC periodHuang Rui1-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>
2015-08-27hwmon: (fam15h_power) Update running_avg_capture bit field to 28Huang Rui1-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>
2015-08-27hwmon: (fam15h_power) Rename fam15h_power_is_internal_node0 functionHuang Rui1-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>
2015-08-27hwmon: (fam15h_power) Add support for AMD CarrizoHuang Rui1-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>
2015-08-19hwmon: (ltc2978) Add support for LTM4675Guenter Roeck2-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>
2015-08-19hwmon: (ltc2978) Add polling for chips requiring itMichael Jones1-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>
2015-08-19hwmon: (pmbus) Enable PEC if the controller supports itGuenter Roeck1-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>
2015-08-19hwmon: (pmbus) Use BIT macroGuenter Roeck5-102/+107
Using the BIT macro makes the code a little easier to read. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-08-17hwmon: (ltc2978) Add support for LTC3886Guenter Roeck2-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>
2015-08-17hwmon: (ltc2978) Add support for LTC2980 and LTM2987Guenter Roeck2-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>
2015-08-17hwmon: (ltc2978) Add missing chip IDs for LTC2978 and LTC3882Guenter Roeck1-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>
2015-08-17hwmon: (ltc2978) Use correct ID mask to detect all chipsGuenter Roeck1-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>
2015-08-17hwmon: (ltc2978) Introduce helper functions for min and max valuesGuenter Roeck1-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>
2015-08-17hwmon: (ltc2978) Introduce feature flagsGuenter Roeck1-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>
2015-08-17hwmon: (pmbus) Convert command register definitions to enumGuenter Roeck1-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>
2015-08-17hwmon: (ltc2978) Add support for LTC2975Guenter Roeck2-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>
2015-08-12hwmon: (ltc2978) Add support for LTC3887Guenter Roeck2-6/+16
LTC3887 is an enhanced version of LTC3880 and supports the same commands. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-08-12hwmon: (ltc2978) Add additional chip IDs for LTM4676 and LTM4676AGuenter Roeck1-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>
2015-08-12hwmon: (ltc2978) Add support for LTC3882Guenter Roeck1-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>
2015-08-12hwmon: (ltc2978) Move code to read chip ID into separate functionGuenter Roeck1-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>
2015-08-10hwmon:change sht15_reverse()yalin wang1-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>
2015-08-10hwmon: (pmbus) Add device IDs for TPS544{B,C}2{0,5}Guenter Roeck2-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>
2015-08-09hwmon: (pmbus) Add support for MAX20751Guenter Roeck3-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>
2015-08-09hwmon: (pmbus) Add support for VR12Guenter Roeck3-4/+15
Newer chips such as MAX20751 support VR12. Add support for it. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-08-09hwmon: (it87) Add support for IT8732FJustin Maggard2-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>
2015-08-09hwmon: (nct7802) Add auto_point attributesConstantine Shulyupin1-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>
2015-08-09hwmon: (lm70) add device tree supportRabin Vincent1-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>
2015-08-09hwmon: (ltc2978) LTM4676 supports CLEAR_PEAKSGuenter Roeck1-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>
2015-08-09hwmon: (adm1275) Add support for ADM1293 and ADM1294Guenter Roeck2-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>
2015-08-09hwmon: (pmbus) Add support for lowest power value attributesGuenter Roeck2-24/+34
Add support for powerX_input_lowest for both input and output power. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-08-09hwmon: (adm1275) Introduce new feature flagsGuenter Roeck1-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>
2015-08-09hwmon: (adm1275) Introduce configuration data structure for coeffcientsGuenter Roeck1-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>
2015-08-09hwmon: (adm1275) Use BIT macroGuenter Roeck1-9/+10
Use BIT macro to simplify adding new bit masks. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-08-09hwmon: (pmbus_core) Constify pmbus_regulator_opsAxel Lin2-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>
2015-08-09hwmon: (pmbus) Explicitly set regulator type for pmbus_regulator_opsAxel Lin1-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>
2015-08-09hwmon: (g762) Drop owner assignment from struct i2c_driverKrzysztof Kozlowski1-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>
2015-08-09hwmon: (f71882fg) Add support for f81768dGeorge Joseph1-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>
2015-08-09hwmon: (nct7802) Add pwmX_enable attributeConstantine Shulyupin1-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>
2015-08-09hwmon:(f71882fg) Fix f81866a voltage protectionPeter Hung1-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>
2015-08-09hwmon: (f71882fg) Fix f81866a temp/beep settingPeter Hung1-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>
2015-08-09hwmon: (f71882fg) Add support for F81866 and F71868Peter Hung1-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>
2015-08-09hwmon: (nct7802) Add pwm mode attributesConstantine Shulyupin1-0/+26
Introduced: show_pwm_mode, pwm1_mode, pwm2_mode, pwm2_mode Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-08-09hwmon: (nct7802) Add pwm controlConstantine Shulyupin1-0/+47
Added fan output control registers. Modes of operation are PWM (default) and DC. Introduced show_pwm, store_pwm, nct7802_pwm_attrs, nct7802_pwm_group. Signed-off-by: Guenter Roeck <linux@roeck-us.net>