aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon (follow)
AgeCommit message (Collapse)AuthorFilesLines
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>
2015-08-09hwmon: (nct7802) add temperature sensor type attributeConstantine Shulyupin1-12/+60
Sensor type: 3 diode (current mode), MD=1 4 thermistor, MD=2 Reference: Nuvoton Hardware Monitoring IC NCT7802Y 7.2.32 Mode Selection Register Location : Index 22h Signed-off-by: Constantine Shulyupin <const@MakeLinux.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-08-05hwmon: (g762) Export OF module alias informationJavier Martinez Canillas1-0/+1
The I2C core always reports the MODALIAS uevent as "i2c:<client name" regardless if the driver was matched using the I2C id_table or the of_match_table. So technically there's no need for a driver to export the OF table since currently it's not used. In fact, the I2C device ID table is mandatory for I2C drivers since a i2c_device_id is passed to the driver's probe function even if the I2C core used the OF table to match the driver. And since the I2C core uses different tables, OF-only drivers needs to have duplicated data that has to be kept in sync and also the dev node compatible manufacturer prefix is stripped when reporting the MODALIAS. To avoid the above, the I2C core behavior may be changed in the future to not require an I2C device table for OF-only drivers and report the OF module alias. So, it's better to also export the OF table to prevent breaking module autoloading if that happens. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-08-05hwmon: (nct7904) Export I2C module alias informationJavier Martinez Canillas1-0/+1
The I2C core always reports the MODALIAS uevent as "i2c:<client name" regardless if the driver was matched using the I2C id_table or the of_match_table. So the driver needs to export the I2C table and this be built into the module or udev won't have the necessary information to auto load the correct module when the device is added. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Cc: stable@vger.kernel.org # v4.1+ Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-08-05hwmon: (dell-smm) Blacklist Dell Studio XPS 8100Pali Rohár1-1/+17
CPU fan speed going up and down on Dell Studio XPS 8100 for unknown reasons. Without further debugging on the affected machine, it is not possible to find the problem. Link: https://bugzilla.kernel.org/show_bug.cgi?id=100121 Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Tested-by: Jan C Peters <jcpeters89@gmail.com> Cc: stable@vger.kernel.org # v4.0+, will need backport [groeck: cleaned up description, comments] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-07-29hwmon: (nct7802) Fix integer overflow seen when writing voltage limitsGuenter Roeck1-1/+1
Writing a large value into a voltage limit attribute can result in an overflow due to an auto-conversion from unsigned long to unsigned int. Cc: Constantine Shulyupin <const@MakeLinux.com> Reviewed-by: Jean Delvare <jdelvare@suse.de> Cc: stable@vger.kernel.org # v4.1+ Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-07-29hwmon: (nct7904) Rename pwm attributes to match hwmon ABIGuenter Roeck1-28/+29
pwm attributes have well defined names, which should be used. Cc: Vadim V. Vlasov <vvlasov@dev.rtsoft.ru> Cc: stable@vger.kernel.org #v4.1+ Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-07-03hwmon: (w83627ehf) Use swap() in w82627ehf_swap_tempreg()Fabian Frederick1-21/+5
Use kernel.h macro definition. Thanks to Julia Lawall for Coccinelle scripting support. Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Jean Delvare <jdelvare@suse.de>
2015-07-03hwmon: (w83792d) Additional PWM outputs supportRoger Lucas1-5/+22
Add pwm[4-7] and the associated pwm[4-7]_mode attributes. Signed-off-by: Roger Lucas <vt8231@hiddenengine.co.uk> Signed-off-by: Jean Delvare <jdelvare@suse.de>
2015-07-01hwmon: (mcp3021) Fix broken output scalingStevens, Nick1-13/+1
The mcp3021 scaling code is dividing the VDD (full-scale) value in millivolts by the A2D resolution to obtain the scaling factor. When VDD is 3300mV (the standard value) and the resolution is 12-bit (4096 divisions), the result is a scale factor of 3300/4096, which is always one. Effectively, the raw A2D reading is always being returned because no scaling is applied. This patch fixes the issue and simplifies the register-to-volts calculation, removing the unneeded "output_scale" struct member. Signed-off-by: Nick Stevens <Nick.Stevens@digi.com> Cc: stable@vger.kernel.org # v3.10+ [Guenter Roeck: Dropped unnecessary value check] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-07-01hwmon: (nct7802) fix visibility of temp3Constantine Shulyupin1-1/+1
Excerpt from datasheet: 7.2.32 Mode Selection Register RTD3_MD : 00=Closed , 01=Reserved , 10=Thermistor mode , 11=Voltage sense Show temp3 only in Thermistor mode Cc: stable@vger.kernel.org # v3.19+ Signed-off-by: Constantine Shulyupin <const@MakeLinux.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-07-01hwmon: (dell-smm-hwmon) Use a valid name attributeGabriele Mazzotta1-1/+1
As per Documentation/hwmon/sysfs-interface, hwmon name attributes must not include '-', so replace 'dell-smm' with 'dell_smm'. Fixes: 039ae58503f3 ("hwmon: Allow to compile dell-smm-hwmon driver without /proc/i8k") Signed-off-by: Gabriele Mazzotta <gabriele.mzt@gmail.com> Acked-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-06-26Merge tag 'char-misc-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-miscLinus Torvalds3-0/+1039
Pull char/misc driver updates from Greg KH: "Here's the big char/misc driver pull request for 4.2-rc1. Lots of mei, extcon, coresight, uio, mic, and other driver updates in here. Full details in the shortlog. All of these have been in linux-next for some time with no reported problems" * tag 'char-misc-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (176 commits) mei: me: wait for power gating exit confirmation mei: reset flow control on the last client disconnection MAINTAINERS: mei: add mei_cl_bus.h to maintained file list misc: sram: sort and clean up included headers misc: sram: move reserved block logic out of probe function misc: sram: add private struct device and virt_base members misc: sram: report correct SRAM pool size misc: sram: bump error message level on unclean driver unbinding misc: sram: fix device node reference leak on error misc: sram: fix enabled clock leak on error path misc: mic: Fix reported static checker warning misc: mic: Fix randconfig build error by including errno.h uio: pruss: Drop depends on ARCH_DAVINCI_DA850 from config uio: pruss: Add CONFIG_HAS_IOMEM dependence uio: pruss: Include <linux/sizes.h> extcon: Redefine the unique id of supported external connectors without 'enum extcon' type char:xilinx_hwicap:buffer_icap - change 1/0 to true/false for bool type variable in function buffer_icap_set_configuration(). Drivers: hv: vmbus: Allocate ring buffer memory in NUMA aware fashion parport: check exclusive access before register w1: use correct lock on error in w1_seq_show() ...
2015-06-23Merge tag 'hwmon-for-linus-v4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-stagingLinus Torvalds7-76/+264
Pull hwmon updates from Guenter Roeck: - new driver for Microchip TC74 - support for ncpXXwf104 added to ntc_thermistor driver - minor cleanup * tag 'hwmon-for-linus-v4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: add driver for Microchip TC74 hwmon: (ntc_thermistor) Improve precision of resistance calculation hwmon: (ntc_thermistor) fix iio raw to microvolts conversion hwmon: (atxp1) Drop auto-detection hwmon: (atxp1) Drop FSF mailing address hwmon: Allow compile test of GPIO consumers if !GPIOLIB hwmon: (sht15) Constify platform_device_id hwmon: (max197) Constify platform_device_id hwmon: (ntc_thermistor) Add support for ncpXXwf104
2015-06-21hwmon: add driver for Microchip TC74Maciej S. Szmigiero3-0/+188
Add hwmon driver for the Microchip TC74. The TC74 is a single-input 8-bit I2C temperature sensor, with +-2 degrees centigrade accuracy. Signed-off-by: Maciej Szmigiero <mail@maciej.szmigiero.name> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-06-03hwmon: (ntc_thermistor) Improve precision of resistance calculationChris Lesiak1-13/+10
The function get_ohm_of_thermistor has both the measured voltage and the pullup voltage available in microvolts. But it was promptly converting both to millivolts before using them to calculate the thermistor resistance. That conversion unnecessarily hurt the precision of the calculation. For example, take the ncpXXwb473 connected to 5000 mV and pulled down through a 47000 ohm resistor. At 25 C, the resistance of the thermistor is 47000 ohms. The measured voltage will be 2500 mV. If we measure instead 2501 mV, then the calculated resistance will be 46962 ohms -- a difference of 38 ohms. So the precision of the resistance estimate could be increased by 38X by doing the calculations in microvolts. Signed-off-by: Chris Lesiak <chris.lesiak@licor.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-06-02hwmon: (ntc_thermistor) fix iio raw to microvolts conversionChris Lesiak1-7/+8
The function ntc_adc_iio_read was assuming both a 12 bit ADC and that pullup_uv is the same as the ADC reference voltage. If either assumption is false, then the result is incorrect. Attempt to use iio_convert_raw_to_processed to convert the raw value to microvolts. It will fail for iio channels that don't support support IIO_CHAN_INFO_SCALE; in that case fall back to the assumptions. Signed-off-by: Chris Lesiak <chris.lesiak@licor.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-06-02Merge branch 'linus' into sched/core, to resolve conflictIngo Molnar4-1/+14
Conflicts: arch/sparc/include/asm/topology_64.h Signed-off-by: Ingo Molnar <mingo@kernel.org>
2015-05-31hwmon: (atxp1) Drop auto-detectionGuenter Roeck1-46/+9
Auto-detection for this chip is highly unreliable, and one of its I2C addresses can also be used by EEPROMs, increasing the risk for false positives even more. Drop auto-detection entirely to remove the risk. Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-05-31hwmon: (atxp1) Drop FSF mailing addressGuenter Roeck1-5/+0
The FSF mailing address may change and does not provide any real value. Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-05-31hwmon: Allow compile test of GPIO consumers if !GPIOLIBGeert Uytterhoeven1-2/+2
The GPIO subsystem provides dummy GPIO consumer functions if GPIOLIB is not enabled. Hence drivers that depend on GPIOLIB, but use GPIO consumer functionality only, can still be compiled if GPIOLIB is not enabled. Relax the dependency on GPIOLIB if COMPILE_TEST is enabled, where appropriate. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Jean Delvare <jdelvare@suse.de> Cc: Guenter Roeck <linux@roeck-us.net> Cc: lm-sensors@lm-sensors.org Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-05-31hwmon: (sht15) Constify platform_device_idKrzysztof Kozlowski1-1/+1
The platform_device_id is not modified by the driver and core uses it as const. Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-05-31hwmon: (max197) Constify platform_device_idKrzysztof Kozlowski1-1/+1
The platform_device_id is not modified by the driver and core uses it as const. Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>