Commit Graph

791 Commits

Author SHA1 Message Date
Armin Wolf 1721badebf hwmon: (ftsteutates) Fix scaling of measurements
[ Upstream commit ca8fd8c16a ]

A user complained that the ftsteutates driver was displaying
bogus values since its introduction. This happens because the
sensor measurements need to be scaled in order to produce
meaningful results:
- the fan speed needs to be multiplied by 60 since its in RPS
- the temperature is in degrees celsius and needs an offset of 64
- the voltage is in 1/256 of 3.3V

The offical datasheet says the voltage needs to be divided by 256,
but this is likely an off-by-one-error, since even the BIOS
devides by 255 (otherwise 3.3V could not be measured).

The voltage channels additionally need a board-specific multiplier,
however this can be done by the driver since its board-specific.

The reason the missing scaling of measurements is the way Fujitsu
used this driver when it was still out-of-tree. Back then, all
scaling was done in userspace by libsensors, even the generic one.

Tested on a Fujitsu DS3401-B1.

Fixes: 08426eda58 ("hwmon: Add driver for FTS BMC chip "Teutates"")
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://lore.kernel.org/r/20221224041855.83981-2-W_Armin@gmx.de
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-03-10 09:39:21 +01:00
Guenter Roeck 9d21029e71 hwmon: (lm90) Add basic support for TI TMP461
[ Upstream commit f8344f7693 ]

TMP461 is almost identical to TMP451 and was actually detected as TMP451
with the existing lm90 driver if its I2C address is 0x4c. Add support
for it to the lm90 driver. At the same time, improve the chip detection
function to at least try to distinguish between TMP451 and TMP461.

As a side effect, this fixes commit 24333ac26d ("hwmon: (tmp401) use
smb word operations instead of 2 smb byte operations"). TMP461 does not
support word operations on temperature registers, which causes bad
temperature readings with the tmp401 driver. The lm90 driver does not
perform word operations on temperature registers and thus does not have
this problem.

Support is listed as basic because TMP461 supports a sensor resolution
of 0.0625 degrees C, while the lm90 driver assumes a resolution of 0.125
degrees C. Also, the TMP461 supports negative temperatures with its
default temperature range, which is not the case for similar chips
supported by the lm90 and the tmp401 drivers. Those limitations will be
addressed with follow-up patches.

Fixes: 24333ac26d ("hwmon: (tmp401) use smb word operations instead of 2 smb byte operations")
Reported-by: David T. Wilson <david.wilson@nasa.gov>
Cc: David T. Wilson <david.wilson@nasa.gov>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-12-29 12:28:48 +01:00
suma hegde 23c69b9036 hwmon: (k10temp) Remove residues of current and voltage
Commit id "b00647c46c9d7f6ee1ff6aaf335906101755e614",
adds reporting current and voltage to k10temp.c

The commit id "0a4e668b5d52eed8026f5d717196b02b55fb2dc6",
removed reporting current and voltage from k10temp.c

The curr and in(voltage) entries are not removed from
"k10temp_info" structure. Removing those residue entries.
while at it, update k10temp driver documentation

Signed-off-by: suma hegde <suma.hegde@amd.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20210902174155.7365-2-nchatrad@amd.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-09-12 17:56:36 -07:00
Aleksa Savic 0e35f63f7f hwmon: add driver for Aquacomputer D5 Next
This driver exposes hardware sensors of the Aquacomputer D5 Next
watercooling pump, which communicates through a proprietary USB HID
protocol.

Available sensors are pump and fan speed, power, voltage and current, as
well as coolant temperature. Also available through debugfs are the serial
number, firmware version and power-on count.

Attaching a fan is optional and allows it to be controlled using
temperature curves directly from the pump. If it's not connected,
the fan-related sensors will report zeroes.

The pump can be configured either through software or via its physical
interface. Configuring the pump through this driver is not implemented,
as it seems to require sending it a complete configuration. That
includes addressable RGB LEDs, for which there is no standard sysfs
interface. Thus, that task is better suited for userspace tools.

This driver has been tested on x86_64, both in-kernel and as a module.

Signed-off-by: Aleksa Savic <savicaleksa83@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-08-28 08:53:30 -07:00
Akshay Gupta 04165fb73f hwmon: (sbrmi) Add Documentation
- Add documentation for SB-RMI module

Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Akshay Gupta <Akshay.Gupta@amd.com>
Signed-off-by: Naveen Krishna Chatradhi <nchatrad@amd.com>
Link: https://lore.kernel.org/r/20210726133615.9709-2-nchatrad@amd.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-08-17 14:54:25 -07:00
Mauro Carvalho Chehab 04fecf0c61 dt-bindings: firmware: update arm,scpi.yaml reference
Changeset 1496be7194 ("dt-bindings: firmware: arm,scpi: Convert to json schema")
renamed: Documentation/devicetree/bindings/arm/arm,scpi.txt
to: Documentation/devicetree/bindings/firmware/arm,scpi.yaml.

Update its cross-reference accordingly.

Fixes: 1496be7194 ("dt-bindings: firmware: arm,scpi: Convert to json schema")
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Acked-by: Sudeep Holla <sudeep.holla@arm.com>
Link: https://lore.kernel.org/r/b5a2b0cb83e7f8193b4be4cef9250dd4c42877ab.1626947923.git.mchehab+huawei@kernel.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-08-17 14:54:25 -07:00
Randy Dunlap 276281b8e8 hwmon: sht4x: update Documentation for Malformed table
Make top and bottom border lines match.

Documentation/hwmon/sht4x.rst:42: WARNING: Malformed table.
Text in column margin in table line 4.

Fixes: 505c254937 ("hwmon: Add sht4x Temperature and Humidity Sensor Driver")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Navin Sankar Velliangiri <navin@linumiz.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Jean Delvare <jdelvare@suse.com>
Cc: linux-hwmon@vger.kernel.org
Link: https://lore.kernel.org/r/20210727232054.7426-1-rdunlap@infradead.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-08-17 14:54:14 -07:00
Robert Marko 3efbcee8d4 hwmon: (pmbus) Add driver for Delta DPS-920AB PSU
This adds support for the Delta DPS-920AB PSU.

Only missing feature is fan control which the PSU supports.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Link: https://lore.kernel.org/r/20210607103431.2039073-1-robert.marko@sartura.hr
[groeck: Add MODULE_IMPORT_NS(PMBUS);]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-06-17 04:21:46 -07:00
Erik Rosen bf8e0cd8d6 hwmon: (pmbus/pim4328) Add documentation for the pim4328 PMBus driver
Add documentation and index link for pim4328 PMBus driver.

Signed-off-by: Erik Rosen <erik.rosen@metormote.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-06-17 04:21:46 -07:00
Mauro Carvalho Chehab ff53b77e1e docs: hwmon: adm1177.rst: avoid using ReSt :doc:`foo` markup
The :doc:`foo` tag is auto-generated via automarkup.py.
So, use the filename at the sources, instead of :doc:`foo`.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/32b0db7e79a3ed0e817213113c607a1b819e3867.1622898327.git.mchehab+huawei@kernel.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-06-17 04:21:46 -07:00
Guenter Roeck 148c847c9e hwmon: (max31790) Fix pwmX_enable attributes
pwmX_enable supports three possible values:

0: Fan control disabled. Duty cycle is fixed to 0%
1: Fan control enabled, pwm mode. Duty cycle is determined by
   values written into Target Duty Cycle registers.
2: Fan control enabled, rpm mode
   Duty cycle is adjusted such that fan speed matches
   the values in Target Count registers

The current code does not do this; instead, it mixes pwm control
configuration with fan speed monitoring configuration. Worse, it
reports that pwm control would be disabled (pwmX_enable==0) when
it is in fact enabled in pwm mode. Part of the problem may be that
the chip sets the "TACH input enable" bit on its own whenever the
mode bit is set to RPM mode, but that doesn't mean that "TACH input
enable" accurately reflects the pwm mode.

Fix it up and only handle pwm control with the pwmX_enable attributes.
In the documentation, clarify that disabling pwm control (pwmX_enable=0)
sets the pwm duty cycle to 0%. In the code, explain why TACH_INPUT_EN
is set together with RPM_MODE.

While at it, only update the configuration register if the configuration
has changed, and only update the cached configuration if updating the
chip configuration was successful.

Cc: Jan Kundrát <jan.kundrat@cesnet.cz>
Cc: Václav Kubernát <kubernat@cesnet.cz>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Václav Kubernát <kubernat@cesnet.cz>
Reviewed-by: Jan Kundrát <jan.kundrat@cesnet.cz>
Link: https://lore.kernel.org/r/20210526154022.3223012-4-linux@roeck-us.net
2021-06-17 04:21:46 -07:00
Guenter Roeck 897f633989 hwmon: (max31790) Report correct current pwm duty cycles
The MAX31790 has two sets of registers for pwm duty cycles, one to request
a duty cycle and one to read the actual current duty cycle. Both do not
have to be the same.

When reporting the pwm duty cycle to the user, the actual pwm duty cycle
from pwm duty cycle registers needs to be reported. When setting it, the
pwm target duty cycle needs to be written. Since we don't know the actual
pwm duty cycle after a target pwm duty cycle has been written, set the
valid flag to false to indicate that actual pwm duty cycle should be read
from the chip instead of using cached values.

Cc: Jan Kundrát <jan.kundrat@cesnet.cz>
Cc: Václav Kubernát <kubernat@cesnet.cz>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Václav Kubernát <kubernat@ceesnet.cz>
Reviewed-by: Jan Kundrát <jan.kundrat@cesnet.cz>
Link: https://lore.kernel.org/r/20210526154022.3223012-3-linux@roeck-us.net
2021-06-17 04:21:45 -07:00
Navin Sankar Velliangiri 505c254937 hwmon: Add sht4x Temperature and Humidity Sensor Driver
This patch adds a hwmon driver for the SHT4x Temperature and
Humidity sensor.

Signed-off-by: Navin Sankar Velliangiri <navin@linumiz.com>
[groeck: dropped unnecessary empty line and continuation lines]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-06-17 04:21:45 -07:00
Fabio Estevam f20f7363e7 docs: hwmon: Add an entry for mp2888
The entry for mp2888 is missing and it causes the following
'make htmldocs' build warning:

Documentation/hwmon/mp2888.rst: WARNING: document isn't included in any toctree

Add the mp2888 entry.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20210521172218.37592-1-festevam@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-06-17 04:21:45 -07:00
Vadim Pasternak e4db7719d0 hwmon: (pmbus) Add support for MPS Multi-phase mp2888 controller
Add support for mp2888 device from Monolithic Power Systems, Inc. (MPS)
vendor. This is a digital, multi-phase, pulse-width modulation
controller.

This device supports:
- One power rail.
- Programmable Multi-Phase up to 10 Phases.
- PWM-VID Interface
- One pages 0 for telemetry.
- Programmable pins for PMBus Address.
- Built-In EEPROM to Store Custom Configurations.
- Can configured VOUT readout in direct or VID format and allows
  setting of different formats on rails 1 and 2. For VID the following
  protocols are available: VR13 mode with 5-mV DAC; VR13 mode with
  10-mV DAC, IMVP9 mode with 5-mV DAC.

Signed-off-by: Vadim Pasternak <vadimp@nvidia.com>
Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/r/20210511055619.118104-3-vadimp@nvidia.com
[groeck: Add MODULE_IMPORT_NS]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-06-17 04:21:45 -07:00
Erik Rosen ea541c185c hwmon: (pmbus) Add support for additional Flex BMR converters to pmbus
Add support for Flex BMR310, BMR456, BMR457, BMR458, BMR480, BMR490,
BMR491 and BMR492 to the pmbus driver

Signed-off-by: Erik Rosen <erik.rosen@metormote.com>
Link: https://lore.kernel.org/r/20210507194023.61138-4-erik.rosen@metormote.com
[groeck: Fixed minor whitespace error]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-06-17 04:21:45 -07:00
Erik Rosen b976760dc4 hwmon: (pmbus) Add documentation for new flags
Add documentation for the new pmbus flags PMBUS_WRITE_PROTECTED,
PMBUS_NO_CAPABILITY and PMBUS_READ_STATUS_AFTER_FAILED_CHECK

Signed-off-by: Erik Rosen <erik.rosen@metormote.com>
Link: https://lore.kernel.org/r/20210507194023.61138-3-erik.rosen@metormote.com
[groeck: Added newline at end of file]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-06-17 04:21:45 -07:00
Mauro Carvalho Chehab b3ea2fe7e2 docs: hwmon: avoid using UTF-8 chars
While UTF-8 characters can be used at the Linux documentation,
the best is to use them only when ASCII doesn't offer a good replacement.
So, replace the occurences of the following UTF-8 characters:

	- U+2010 ('‐'): HYPHEN
	- U+2013 ('–'): EN DASH
	- U+2019 ('’'): RIGHT SINGLE QUOTATION MARK

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/ccdd1bf45963a7748188a97c75f667b37bd43d2f.1620641727.git.mchehab+huawei@kernel.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-06-17 04:21:44 -07:00
Mauro Carvalho Chehab f0635523c8 docs: hwmon: ir36021.rst: replace some characters
The conversion tools used during DocBook/LaTeX/html/Markdown->ReST
conversion and some cut-and-pasted text contain some characters that
aren't easily reachable on standard keyboards and/or could cause
troubles when parsed by the documentation build system.

Replace the occurences of the following characters:

	- U+2010 ('‐'): HYPHEN
	  as ASCII HYPHEN is preferred over U+2010

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/ba8b5122ac9d4918fd966d0eb0a5ca9d89044b04.1621159997.git.mchehab+huawei@kernel.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-06-17 04:21:44 -07:00
Robert Marko ec081f9154 hwmon: (lm75) Add TI TMP1075 support
TI TMP1075 is a LM75 compatible sensor, so lets
add support for it.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Link: https://lore.kernel.org/r/20210429121150.106804-1-robert.marko@sartura.hr
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-06-17 04:21:44 -07:00
Erik Rosen 6e954d2e64 hwmon: (pmbus/zl6100) Update documentation for zl6100 driver
Update documentation for zl6100 driver and fix dead links to technical
specifications

Signed-off-by: Erik Rosen <erik.rosen@metormote.com>
Link: https://lore.kernel.org/r/20210423153329.33457-3-erik.rosen@metormote.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-06-17 04:21:44 -07:00
Mauro Carvalho Chehab d1f2722d53 docs: hwmon: tmp103.rst: fix bad usage of UTF-8 chars
While UTF-8 characters can be used at the Linux documentation,
the best is to use them only when ASCII doesn't offer a good replacement.
So, replace the occurences of the following UTF-8 characters:

	- U+2013 ('–'): EN DASH

In this specific case, EN DASH was used instead of a minus
sign. So, replace it by a single hyphen.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/73b3c7c1eef5c12ddc941624d23689313bd56529.1620744606.git.mchehab+huawei@kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2021-05-11 11:00:18 -06:00
Guenter Roeck 9049572fb1 hwmon: Remove amd_energy driver
Commit 60268b0e82 ("hwmon: (amd_energy) modify the visibility of
the counters") restricted visibility of AMD energy counters to work
around a side-channel attack using energy data to determine which
instructions are executed. The attack is described in 'PLATYPUS:
Software-based Power Side-Channel Attacks on x86'. It relies on quick
and accurate energy readings.

This change made the counters provided by the amd_energy driver
effectively unusable for non-provileged users. However, unprivileged
read access is the whole point of hardware monitoring attributes.

An attempt to remedy the situation by limiting and randomizing access
to chip registers was rejected by AMD. Since the driver is for all
practical purposes unusable, remove it.

Cc: Naveen Krishna Chatradhi <nchatrad@amd.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-04-20 06:52:08 -07:00
Guenter Roeck e1576396a7 hwmon: Clarify scope of attribute access
Hardware monitoring sysfs attributes are used and displayed by unrestricted
userspace applications. Standard attributes therefore have to be world
readable, since otherwise those userspace applications would either have
to run as super-user or display an error. None of those makes sense.
Clarify the expected scope of attribute access in the ABI document.

Cc: Naveen Krishna Chatradhi <nchatrad@amd.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-04-20 06:50:14 -07:00
Erik Rosen 1e4063329f hwmon: (pmbus) Add pmbus driver for MAX15301
Add pmbus driver support for Maxim MAX15301 InTune Automatically
Compensated Digital PoL Controller with Driver and PMBus Telemetry

Even though the specification does not specifically mention it,
extensive empirical testing has revealed that auto-detection of
limit-registers will fail in a random fashion unless the delay
parameter is set to above about 80us. The default delay is set
to 100us to include some safety margin.

This patch is tested on a Flex BMR461 converter module.

Signed-off-by: Erik Rosen <erik.rosen@metormote.com>
Link: https://lore.kernel.org/r/20210419101251.24840-1-erik.rosen@metormote.com
[groeck: Added rationale for delay to driver header]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-04-20 06:50:14 -07:00
Václav Kubernát 1734b4135a hwmon: Add driver for fsp-3y PSUs and PDUs
This patch adds support for these devices:
- YH-5151E - the PDU
- YM-2151E - the PSU

The device datasheet says that the devices support PMBus 1.2, but in my
testing, a lot of the commands aren't supported and if they are, they
sometimes behave strangely or inconsistently. For example, writes to the
PAGE command requires using PEC, otherwise the write won't work and the
page won't switch, even though, the standard says that PEC is optional.
On the other hand, writes to SMBALERT don't require PEC. Because of
this, the driver is mostly reverse engineered with the help of a tool
called pmbus_peek written by David Brownell (and later adopted by my
colleague Jan Kundrát).

The device also has some sort of a timing issue when switching pages,
which is explained further in the code.

Because of this, the driver support is limited. It exposes only the
values that have been tested to work correctly.

Signed-off-by: Václav Kubernát <kubernat@cesnet.cz>
Link: https://lore.kernel.org/r/20210414080019.3530794-1-kubernat@cesnet.cz
[groeck: Fixed up "missing braces around initializer" from 0-day]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-04-20 06:50:14 -07:00
Erik Rosen cb3d37b590 hwmon: (pmbus/tps53679) Add support for TI TPS53676
Add support for TI TPS53676 controller to the tps53679 pmbus driver

The driver uses the USER_DATA_03 register to figure out how many phases
are enabled and to which channel they are assigned, and sets the number
of pages and phases accordingly.

Signed-off-by: Erik Rosen <erik.rosen@metormote.com>
Link: https://lore.kernel.org/r/20210322193734.75127-3-erik.rosen@metormote.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-04-20 06:50:14 -07:00
Chris Packham 15b2703e5e hwmon: (pmbus) Add driver for BluTek BPA-RS600
The BPA-RS600 is a compact 600W AC to DC removable power supply module.

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20210317040231.21490-3-chris.packham@alliedtelesis.co.nz
[groeck: Added bpa-rs600 to index.rst]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-04-20 06:50:14 -07:00
Jonas Malaco 82e3430dfa hwmon: add driver for NZXT Kraken X42/X52/X62/X72
These are "all-in-one" CPU liquid coolers that can be monitored and
controlled through a proprietary USB HID protocol.

While the models have differently sized radiators and come with varying
numbers of fans, they are all indistinguishable at the software level.

The driver exposes fan/pump speeds and coolant temperature through the
standard hwmon sysfs interface.

Fan and pump control, while supported by the devices, are not currently
exposed.  The firmware accepts up to 61 trip points per channel
(fan/pump), but the same set of trip temperatures has to be maintained
for both; with pwmX_auto_point_Y_temp attributes, users would need to
maintain this invariant themselves.

Instead, fan and pump control, as well as LED control (which the device
also supports for 9 addressable RGB LEDs on the CPU water block) are
left for existing and already mature user-space tools, which can still
be used alongside the driver, thanks to hidraw.  A link to one, which I
also maintain, is provided in the documentation.

The implementation is based on USB traffic analysis.  It has been
runtime tested on x86_64, both as a built-in driver and as a module.

Signed-off-by: Jonas Malaco <jonas@protocubo.io>
Link: https://lore.kernel.org/r/20210319045544.416138-1-jonas@protocubo.io
[groeck: Removed unnecessary spinlock.h include]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-04-20 06:50:14 -07:00
Wilken Gottwalt c2d5f273c5 hwmon: (corsair-psu) add support for critical values
Adds support for reading the critical values of the temperature sensors
and the rail sensors (voltage and current) once and caches them. Updates
the naming of the constants following a more clear scheme. Also updates
the documentation and fixes some typos. Updates is_visible and ops_read
functions to be more readable.

The new sensors output of a Corsair HX850i will look like this:
corsairpsu-hid-3-1
Adapter: HID adapter
v_in:        230.00 V
v_out +12v:   12.14 V  (crit min =  +8.41 V, crit max = +15.59 V)
v_out +5v:     5.03 V  (crit min =  +3.50 V, crit max =  +6.50 V)
v_out +3.3v:   3.30 V  (crit min =  +2.31 V, crit max =  +4.30 V)
psu fan:        0 RPM
vrm temp:     +46.2°C  (crit = +70.0°C)
case temp:    +39.8°C  (crit = +70.0°C)
power total: 152.00 W
power +12v:  108.00 W
power +5v:    41.00 W
power +3.3v:   5.00 W
curr +12v:     9.00 A  (crit max = +85.00 A)
curr +5v:      8.31 A  (crit max = +40.00 A)
curr +3.3v:    1.62 A  (crit max = +40.00 A)

Signed-off-by: Wilken Gottwalt <wilken.gottwalt@posteo.net>
Link: https://lore.kernel.org/r/YFNg6vGk3sQmyqgB@monster.powergraphx.local
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-04-20 06:50:14 -07:00
Erik Rosen 42bfe7dd0f hwmon: (pmbus/stpddc60) Add ST STPDDC60 pmbus driver
Add hardware monitoring support for ST STPDDC60 Unversal Digital
Multicell Controller.

Signed-off-by: Erik Rosen <erik.rosen@metormote.com>
Link: https://lore.kernel.org/r/20210218115249.28513-3-erik.rosen@metormote.com
[groeck: Fixed whitespace error in Makefile]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-04-20 06:50:14 -07:00
Chris Packham e20a7198a2 hwmon: (pmbus) Add driver for Infineon IR36021
The IR36021 is a dual‐loop digital multi‐phase buck controller.

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Link: https://lore.kernel.org/r/20210301035954.16713-3-chris.packham@alliedtelesis.co.nz
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-04-20 06:50:14 -07:00
Robert Marko fff7b8ab22 hwmon: add Texas Instruments TPS23861 driver
Add basic monitoring support as well as port on/off control for Texas
Instruments TPS23861 PoE PSE IC.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Cc: Luka Perkov <luka.perkov@sartura.hr>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20210121134434.2782405-2-robert.marko@sartura.hr
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-02-12 07:02:55 -08:00
Guenter Roeck 66102281f9 hwmon: (pmbus/max16601) Add support for MAX16508
MAX16508 is quite similar to MAX16601, except that it does not support
the DEFAULT_NUM_POP register and we thus can not dynamically determine
the number of populated phases.

Cc: Alex Qiu <xqiu@google.com>
Cc: Ugur Usug <Ugur.Usug@maximintegrated.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20210125185327.93282-2-linux@roeck-us.net
Reviewed-by: Alex Qiu <xqiu@google.com>
Tested-by: Alex Qiu <xqiu@google.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-01-29 09:20:33 -08:00
Guenter Roeck 220c404dc7 hwmon: (pmbus/max16601) Determine and use number of populated phases
The MAX16601 can report the number of populated phases. Use this
information to only create sysfs attributes for populated phases.

Cc: Alex Qiu <xqiu@google.com>
Cc: Ugur Usug <Ugur.Usug@maximintegrated.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20210125185327.93282-1-linux@roeck-us.net
Reviewed-by: Alex Qiu <xqiu@google.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-01-29 09:20:31 -08:00
Johannes Cornelis Draaijer (datdenkikniet) 8c78f0dee4 hwmon: Add AHT10 Temperature and Humidity Sensor Driver
This patch adds a hwmon driver for the AHT10 Temperature and
Humidity sensor. It has a maximum sample rate, as the datasheet
states that the chip may heat up if it is sampled more than once
every two seconds.

Has been tested a to work on a raspberrypi0w

Signed-off-by: Johannes Cornelis Draaijer (datdenkikniet) <jcdra1@gmail.com>
Link: https://lore.kernel.org/r/20210107194014.GA88780@desktop
[groeck: dropped AHT10_ADDR (unused) and use AHT10_MEAS_SIZE where
 appropriate; dropped change log]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-01-27 17:44:18 -08:00
Blaž Hrastnik bd433537fe hwmon: (nct6683) Support ASRock boards
Tested with ASRock X570 Phantom Gaming-ITX/TB3. It also appears
on other ASRock boards.

Signed-off-by: Blaž Hrastnik <blaz@mxxn.io>
Link: https://lore.kernel.org/r/b08d641c-3fb5-4845-85f7-e1753149cd7d@www.fastmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-01-27 17:44:18 -08:00
Guenter Roeck d349626b42 hwmon: (abx500) Decomission abx500 driver
This deletes the ABx500 hwmon driver, the only supported
variant being the AB8500.

This driver has been replaced by generic frameworks. By
inspecting the abx500 sysfs files we see that it contains
things such as temp1_max, temp1_max_alarm, temp1_max_hyst,
temp1_max_hyst_alarm, temp1_min, temp1_min_alarm.

It becomes obvious that the abx500.c is a reimplementation
of thermal zones. This is not very strange as the generic
thermal zones were not invented when this driver was merged
so people were rolling their own.

The ab8500.c driver contains conversion tables for handling
a thermistor on ADC channels AUX1 and AUX2.

I managed to replace the functionality of the driver with:

- Activation of the ntc_thermistor.c driver,
  CONFIG_SENSORS_NTC_THERMISTOR
- Activation of thermal zones, CONFIG_THERMAL
- In the device tree, connecting the NTC driver to the
  processed IIO channels from the AB8500 GPADC ADC forming
  two instances of NTC sensors.
- Connecting the two NTC sensors to a "chassis" thermal zone
  in the device tree and setting that to hit the CPU frequency
  at 50 degrees celsius and do a critical shutdown at 70
  degrees celsius, deploying a policy using the sensors.

After talking to the original authors we concluded that the
driver was never properly parameterized in production so
what we now have in the device tree is already puts the
thermistors to better use than what the hwmon driver did.

The two remaining channels for two battery temperatures is
already handled in the charging algorithms but can be
optionally extended to thermal zones as well if we want
these to trigger critical shutdown for the platform.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20201221125521.768082-1-linus.walleij@linaro.org
[groeck: Removed documentation and fixed up Makefile, Kconfig]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-01-27 17:44:18 -08:00
Mauro Carvalho Chehab f6aed68e8a hwmon: (ina2) update ti,ina2xx.yaml reference in documentation
Changeset 94f1ab9445 ("dt-bindings: hwmon: convert TI INA2xx bindings to dt-schema")
renamed: Documentation/devicetree/bindings/hwmon/ina2xx.txt
to: Documentation/devicetree/bindings/hwmon/ti,ina2xx.yaml.

Update its cross-reference accordingly.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/886bd248721b146d844d46e26ddd4cd277f51446.1610535350.git.mchehab+huawei@kernel.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-01-21 11:27:23 -08:00
Randy Dunlap e042f151ec hwmon: (sbtsi_temp) Fix Documenation kernel-doc warning
Fix Documentation/hwmon/ kernel-doc warning in 5.11-rc1:

lnx-511-rc1/Documentation/hwmon/sbtsi_temp.rst:4: WARNING: Title underline too short.

Kernel driver sbtsi_temp
==================

Fixes: 6ec3fcf556 ("hwmon: (sbtsi) Add documentation")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Kun Yi <kunyi@google.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Jean Delvare <jdelvare@suse.com>
Cc: linux-hwmon@vger.kernel.org
Link: https://lore.kernel.org/r/20201229035428.31270-1-rdunlap@infradead.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-12-30 08:05:20 -08:00
Kun Yi 6ec3fcf556 hwmon: (sbtsi) Add documentation
Document the SB-TSI sensor interface driver.

Signed-off-by: Kun Yi <kunyi@google.com>
Link: https://lore.kernel.org/r/20201211215427.3281681-3-kunyi@google.com
[groeck: Added SPDX license identifier, same as source]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-12-12 08:34:29 -08:00
Krzysztof Kozlowski 15d4a6f736 dt-bindings: hwmon: convert AD ADM1275 bindings to dt-schema
Convert the Analog Devices ADM1275 bindings to dt-schema.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20201117220807.208747-4-krzk@kernel.org
[groeck: Removed unnecessary type ($ref) declaration]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-12-11 07:42:27 -08:00
Lukas Bulwahn 966ead9153 hwmon: (pmbus/q54sj108a2) Correct title underline length
Commit b722d7b9e4da ("hwmon: (pmbus) Driver for Delta power supplies
Q54SJ108A2") provides new documentation for DELTA Q54SJ108A2NC* drivers,
but the title underline was too short.

make htmldocs warns:

  Documentation/hwmon/q54sj108a2.rst:4: WARNING: Title underline too short.

Adjust the title underline to the correct length.

Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Link: https://lore.kernel.org/r/20201207152658.32444-1-lukas.bulwahn@gmail.com
[groeck: Adjust subject]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-12-11 07:42:27 -08:00
Alexandru Tachici b0bd407e94 hwmon: (ltc2992) Add support
LTC2992 is a rail-to-rail system monitor that
measures current, voltage, and power of two supplies.

Two ADCs simultaneously measure each supply’s current.
A third ADC monitors the input voltages and four
auxiliary external voltages.

Signed-off-by: Alexandru Tachici <alexandru.tachici@analog.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-12-11 07:42:27 -08:00
xiao.ma d014538aa3 hwmon: (pmbus) Driver for Delta power supplies Q54SJ108A2
The driver supports Q54SJ108A2 series modules of Delta.
Standard attributes are in sysfs, and other attributes are in debugfs.

Signed-off-by: xiao.ma <xiao.mx.ma@deltaww.com>
Link: https://lore.kernel.org/r/20201202025900.1842-1-max701@126.com
[groeck: Replaced spaces with tabs, dropped excessive spaces,
 fixed module prefix in documentation]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-12-11 07:41:20 -08:00
Charles 7537862a90 hwmon: Add driver for STMicroelectronics PM6764 Voltage Regulator
Add the pmbus driver for the STMicroelectronics pm6764 voltage regulator.

the output voltage use the MFR_READ_VOUT 0xD4
vout value returned is linear11

Signed-off-by: Charles Hsu <hsu.yungteng@gmail.com>
[groeck: Fixed various compile errors; marked pm6764tr_of_match __maybe_unused]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-12-07 07:59:37 -08:00
David Bartley daf4fedde6 hwmon: (nct6683) Support NCT6687D.
This is found on many MSI motherboards.

Signed-off-by: David Bartley <andareed@gmail.com>
Link: https://lore.kernel.org/r/20201202025057.5492-1-andareed@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-12-02 17:42:24 -08:00
Tao Ren 12d36c8362 docs: hwmon: Document max127 driver
Add documentation for the max127 hardware monitoring driver.

Signed-off-by: Tao Ren <rentao.bupt@gmail.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20201123185658.7632-3-rentao.bupt@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-12-02 17:42:24 -08:00
Naveen Krishna Chatradhi 0c8bed2604 docs: hwmon: (amd_energy) update documentation
Update the supported processors and mention vulnerability fix.

Signed-off-by: Naveen Krishna Chatradhi <NaveenKrishna.Chatradhi@amd.com>
Link: https://lore.kernel.org/r/20201119184246.228322-2-NaveenKrishna.Chatradhi@amd.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-12-02 17:42:23 -08:00
Wilken Gottwalt d115b51e0e hwmon: add Corsair PSU HID controller driver
The Corsair digital power supplies of the series RMi, HXi and AXi include
a small micro-controller with a lot of sensors attached. The sensors can
be accessed by an USB connector from the outside.

This micro-controller provides the data by a simple proprietary USB HID
protocol. The data consist of temperatures, current and voltage levels,
power usage, uptimes, fan speed and some more. It is also possible to
configure the PSU (fan mode, mono/multi-rail, over current protection).

This driver provides access to the sensors/statistics of the RMi and HXi
series power supplies. It does not support configuring these devices,
because there would be many ways to misconfigure or even damage the PSU.

This patch adds:
- hwmon driver corsair-psu
- hwmon documentation
- updates MAINTAINERS

Signed-off-by: Wilken Gottwalt <wilken.gottwalt@posteo.net>
Link: https://lore.kernel.org/r/20201027131710.GA253280@monster.powergraphx.local
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-12-02 17:42:23 -08:00