Commit Graph

964 Commits

Author SHA1 Message Date
Lars Petter Mostad c82337843d hwmon: (emc1403) Add support for EMC1428 and EMC1438.
EMC1428 and EMC1438 are similar to EMC14xx, but have eight temperature
channels, as well as signed data and limit registers. Chips currently
supported by this driver have unsigned registers only.

Signed-off-by: Lars Petter Mostad <larspm@gmail.com>
Link: https://lore.kernel.org/r/20240510142824.824332-1-lars.petter.mostad@appear.net
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-05-12 09:02:00 -07:00
Uwe Kleine-König d8a66f3621 hwmon: Drop explicit initialization of struct i2c_device_id::driver_data to 0
These drivers don't use the driver_data member of struct i2c_device_id,
so don't explicitly initialize this member.

This prepares putting driver_data in an anonymous union which requires
either no initialization or named designators. But it's also a nice
cleanup on its own.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20240430085654.1028864-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-05-01 07:47:49 -07:00
Aleksa Savic 8ec8d6c509 hwmon: (nzxt-kraken3) Add support for NZXT Kraken 2023 (standard and Elite) models
Add support for NZXT Kraken 2023 (standard) and NZXT Kraken 2023 Elite
all-in-one CPU coolers. These models communicate identically to the NZXT
Kraken Z-series (Z53 code paths) in all cases except when writing the
fan curve, where setting additional bits in the report is needed.

Reviewed-by: Jonas Malaco <jonas@protocubo.io>
Signed-off-by: Aleksa Savic <savicaleksa83@gmail.com>
Link: https://lore.kernel.org/r/20240428104812.14037-3-savicaleksa83@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-04-30 10:32:14 -07:00
Peter Yin 35fe06d94e hwmon: (pmbus) Add support for Infineon XDP710
Add support for Infineon XDP710.This is a Hot-Swap Controller.

Signed-off-by: Peter Yin <peteryin.openbmc@gmail.com>
Link: https://lore.kernel.org/r/20240425153608.4003782-2-peteryin.openbmc@gmail.com
[groeck: s/microOhmRsense/micro_ohm_osense/g; declared array static]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-04-30 10:32:14 -07:00
Aleksa Savic bf7b5a12bd hwmon: (aquacomputer_d5next) Add support for Octo flow sensor pulses
Add support for reading and writing the flow sensor pulses on
the Aquacomputer Octo. Implemented by David Flemstrom [1].

[1] https://github.com/aleksamagicka/aquacomputer_d5next-hwmon/pull/95

Originally-from: David Flemstrom <david.flemstrom@gmail.com>
Signed-off-by: Aleksa Savic <savicaleksa83@gmail.com>
Link: https://lore.kernel.org/r/20240417175037.32499-3-savicaleksa83@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-04-30 10:32:14 -07:00
Aleksa Savic 120584c728 hwmon: (aquacomputer_d5next) Add support for Octo flow sensor
Add support for reading the flow sensor value on
the Aquacomputer Octo. Implemented by David Flemstrom [1].

[1] https://github.com/aleksamagicka/aquacomputer_d5next-hwmon/pull/95

Originally-from: David Flemstrom <david.flemstrom@gmail.com>
Signed-off-by: Aleksa Savic <savicaleksa83@gmail.com>
Link: https://lore.kernel.org/r/20240417175037.32499-2-savicaleksa83@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-04-30 10:32:14 -07:00
Jose Ramon San Buenaventura 9163009027 hwmon: (pmbus/adm1275) add adm1281 support
Add support for adm1281 which is similar to adm1275 and other chips
of the series.

Signed-off-by: Jose Ramon San Buenaventura <jose.sanbuenaventura@analog.com>
Link: https://lore.kernel.org/r/20240425070948.25788-3-jose.sanbuenaventura@analog.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-04-28 10:08:43 -07:00
Radu Sabau 04f175954d hwmon: (pmbus) Add driver for ADP1050
Add support for ADP1050 Digital Controller for Isolated Power Supplies
with PMBus interface Voltage, Current and Temperature Monitor.

The ADP1050 implements several features to enable a robust
system of parallel and redundant operation for customers who
require high availability. The device can measure voltage,
current and temperature that can be used in different
techniques to identify and safely shut down an erroneous
power supply in parallel operation mode.

Signed-off-by: Radu Sabau <radu.sabau@analog.com>
Link: https://lore.kernel.org/r/20240321142201.10330-2-radu.sabau@analog.com
[groeck: Fixed corrupted link in documentation]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-04-28 10:07:35 -07:00
Kousik Sanagavarapu b18c01a4c8 hwmon: (lm70) fix links in doc and comments
Update links in the documentation and in-code comments which point to
the datasheet.

The current links don't work because National Semiconductor (which is the
original manufacturer of this chip) has been a part of Texas Instruments
since 2011 and http://www.national.com/ doesn't work anymore.

Fixes: e1a8e913f9 ("[PATCH] lm70: New hardware monitoring driver")
Signed-off-by: Kousik Sanagavarapu <five231003@gmail.com>
Link: https://lore.kernel.org/r/20240318154540.90613-3-five231003@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-04-28 10:07:34 -07:00
Billy Tsai 7e1449cd15 hwmon: (aspeed-g6-pwm-tacho): Support for ASPEED g6 PWM/Fan tach
The driver support two functions: PWM and Tachometer. The PWM feature can
handle up to 16 output ports, while the Tachometer can monitor to up to 16
input ports as well. This driver implements them by exposing two kernel
subsystems: PWM and HWMON. The PWM subsystem can be utilized alongside
existing drivers for controlling elements such as fans (pwm-fan.c),
beepers (pwm-beeper.c) and so on. Through the HWMON subsystem, the driver
provides sysfs interfaces for fan.

Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
Link: https://lore.kernel.org/r/20240221104025.1306227-4-billy_tsai@aspeedtech.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-03-07 10:50:16 -08:00
Okan Akyuz d88cef1d17 hwmon: (max6620) Update broken Datasheet URL in driver documentation
The URL for the MAX6620 datasheet has changed. Update it to reflect the
current location.

Signed-off-by: Okan Akyuz <okanakyuz@okanakyuz.com>
Link: https://lore.kernel.org/r/20240216075212.69118-1-okanakyuz@okanakyuz.com
[groeck: Updated subject and patch description]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-02-25 12:37:46 -08:00
Sebastian Kranz 692cf83bc3 hwmon: (oxp-sensors) Add support for Ayaneo Air Plus 7320u.
Add support for handheld AYANEO AIR Plus with the same EC registers
to add proper fan control.

Functionality was tested successfully.

Signed-off-by: Sebastian Kranz <tklightforce@googlemail.com>
Link: https://lore.kernel.org/r/20240209090157.3232-1-tklightforce@googlemail.com
[groeck: Fixed up commit message]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-02-25 12:37:46 -08:00
Cosmo Chou 1b2ca93cd0 hwmon: Add driver for Astera Labs PT5161L retimer
This driver implements support for temperature monitoring of Astera Labs
PT5161L series PCIe retimer chips.

This driver implementation originates from the CSDK available at
Link: https://github.com/facebook/openbmc/tree/helium/common/recipes-lib/retimer-v2.14
The communication protocol utilized is based on the I2C/SMBus standard.

Signed-off-by: Cosmo Chou <chou.cosmo@gmail.com>
Link: https://lore.kernel.org/r/20240206125420.3884300-2-chou.cosmo@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-02-25 12:37:37 -08:00
Aleksa Savic ed3e03790c hwmon: Add driver for ASUS ROG RYUJIN II 360 AIO cooler
This driver exposes hardware sensors of the ASUS ROG RYUJIN II 360
all-in-one CPU liquid cooler, which communicates through a proprietary
USB HID protocol. Report offsets were initially discovered in [1] by
Florian Freudiger.

Available sensors are pump, internal and external
(controller) fan speed in RPM, their duties in PWM, as well as
coolant temperature.

Attaching external fans to the controller is optional and allows them
to be controlled from the device. If not connected, the fan-related
sensors will report zeroes. The controller is a separate hardware unit
that comes bundled with the AIO and connects to it to allow fan control.

The addressable LCD screen is not supported in this
driver and should be controlled through userspace tools.

[1]: https://github.com/liquidctl/liquidctl/pull/653

Tested-by: Florian Freudiger <florian.freudiger@proton.me>
Signed-off-by: Aleksa Savic <savicaleksa83@gmail.com>
Link: https://lore.kernel.org/r/20240108094453.22986-1-savicaleksa83@gmail.com
[groeck: Add HID dependency]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-02-25 12:37:37 -08:00
Aleksa Savic f3b4b146eb hwmon: Add driver for NZXT Kraken X and Z series AIO CPU coolers
This driver enables hardware monitoring support for NZXT Kraken
X53/X63/X73 and Z53/Z63/Z73 all-in-one CPU liquid coolers.

All models expose liquid temperature and pump speed (in RPM), as well as
PWM control (natively only through a temp-PWM curve, but the driver also
emulates fixed PWM control on top of that). The Z-series models
additionally expose the speed and duty of an optionally connected fan,
with the same PWM control capabilities.

Pump and fan duty control mode can be set through pwm[1-2]_enable,
where 1 is for the manual control mode and 2 is for the liquid temp
to PWM curve mode. Writing a 0 disables control of the channel through
the driver after setting its duty to 100%. As it is not possible to query
the device for the active mode, the driver keeps track of it.

The temperature of the curves relates to the fixed [20-59] C range, per
device limitations, and correlating to the detected liquid temperature.
Only PWM values (ranging from 0-255) can be set.

The addressable RGB LEDs and LCD screen, included only on Z-series models,
are not supported in this driver.

Co-developed-by: Jonas Malaco <jonas@protocubo.io>
Signed-off-by: Jonas Malaco <jonas@protocubo.io>
Co-developed-by: Yury Zhuravlev <stalkerg@gmail.com>
Signed-off-by: Yury Zhuravlev <stalkerg@gmail.com>
Signed-off-by: Aleksa Savic <savicaleksa83@gmail.com>
Link: https://lore.kernel.org/r/20240129111932.368232-1-savicaleksa83@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-02-25 12:37:37 -08:00
Javier Carrasco 3af350929e hwmon: Add support for Amphenol ChipCap 2
The Amphenol ChipCap 2 is a capacitive polymer humidity and temperature
sensor with an integrated EEPROM and minimum/maximum humidity alarms.

All device variants offer an I2C interface and depending on the part
number, two different output modes:
- CC2D: digital output
- CC2A: analog (PDM) output

This driver adds support for the digital variant (CC2D part numbers),
which includes the following part numbers:
- non-sleep measurement mode (CC2D23, CC2D25, CC2D33, CC2D35)
- sleep measurement mode (CC2D23S, CC2D25S, CC2D33S, CC2D35S)

The Chipcap 2 EEPROM can be accessed to configure a series of parameters
like the minimum/maximum humidity alarm threshold and hysteresis. The
EEPROM is only accessible in the command window after a power-on reset.
The default window lasts 10 ms if no Start_CM command is sent. After the
command window is finished (either after the mentioned timeout of after
a Start_NOM command is sent), the device enters the normal operation
mode and makes a first measurement automatically.

Unfortunately, the device does not provide any hardware or software
reset and therefore the driver must trigger power cycles to enter the
command mode. A dedicated, external regulator is required for that.

This driver keeps the device off until a measurement or access to the
EEPROM is required, making use of the first automatic measurement to
avoid different code paths for sleep and non-sleep devices.

The minimum and maximum humidity alarms are configured with two
registers per alarm: one stores the alarm threshold and the other one
keeps the value that turns off the alarm. The alarm signals are only
updated when a measurement is carried out.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://lore.kernel.org/r/20240130-topic-chipcap2-v6-5-260bea05cf9b@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-02-25 12:37:37 -08:00
Stefan Gloor 9d613d9b8a hwmon: (sht3x) read out sensor serial number
The temperature/humidity sensors of the STS3x/SHT3x family are
calibrated and factory-programmed with a unique serial number.
For some sensors, this serial number can be used to obtain a calibration
certificate via an API provided by the manufacturer (Sensirion).
Expose the serial number via debugfs.

Tested with: 2x STS31, 1x STS32, 1x SHT31

Signed-off-by: Stefan Gloor <code@stefan-gloor.ch>
Link: https://lore.kernel.org/r/20240131111512.25321-2-code@stefan-gloor.ch
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-02-25 12:37:36 -08:00
Charles Hsu f20b4a9311 hwmon: Add driver for MPS MPQ8785 Synchronous Step-Down Converter
Add support for mpq8785 device from Monolithic Power Systems, Inc.
(MPS) vendor. This is synchronous step-down controller.

Signed-off-by: Charles Hsu <ythsu0511@gmail.com>
Link: https://lore.kernel.org/r/20240131074822.2962078-2-ythsu0511@gmail.com
[groeck: probe_new --> probe; add MODULE_IMPORT_NS(PMBUS)]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-02-25 12:37:36 -08:00
Ivor Wanders d612bf839f hwmon: add fan speed monitoring driver for Surface devices
Adds a driver that provides read only access to the fan speed for Microsoft
Surface Pro devices. The fan speed is always regulated by the EC and cannot
be influenced directly.

Signed-off-by: Ivor Wanders <ivor@iwanders.net>
Link: https://github.com/linux-surface/kernel/pull/144
Reviewed-by: Maximilian Luz <luzmaximilian@gmail.com>
Reviewed-by: Armin Wolf <W_Armin@gmx.de>
Link: https://lore.kernel.org/r/20240131005856.10180-2-ivor@iwanders.net
[groeck:
 - Declare surface_fan_hwmon_is_visible() static
 - Add dependency on SURFACE_AGGREGATOR_BUS
]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-02-25 12:37:36 -08:00
Nuno Sa cbc29538db hwmon: Add driver for LTC4282
The LTC4282 hot swap controller allows a board to be safely inserted and
removed from a live backplane. Using one or more external N-channel pass
transistors, board supply voltage and inrush current are ramped up at an
adjustable rate. An I2C interface and onboard ADC allows for monitoring
of board current, voltage, power, energy and fault status.

Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20240129-b4-ltc4282-support-v4-3-fe75798164cc@analog.com
[groeck: clamp value range in ltc4282_write_voltage_byte_cached()]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-02-25 12:37:10 -08:00
Heiner Kallweit 7a0564448a hwmon: Drop non-functional I2C_CLASS_HWMON support for drivers w/o detect()
Class-based I2C probing requires detect() and address_list both
to be set in the I2C client driver, see checks in i2c_detect().
It's misleading to declare I2C_CLASS_HWMON support if the driver
doesn't implement detect().
Class-based probing is a legacy mechanism, in addition apparently
nobody ever noticed that class-based probing has been non-functional
in both drivers from the very beginning. So drop the fragments of
class-based probing support.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Link: https://lore.kernel.org/r/13ce7c11-a958-4892-ada9-faf5bfdcb89d@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-02-11 13:43:08 -08:00
Forest Crossman 7fce84a991 hwmon: (nct6683) Add another customer ID for MSI
This value was found on an MSI PRO X670-P WIFI with an NCT6687D chip.

Signed-off-by: Forest Crossman <cyrozap@gmail.com>
Link: https://lore.kernel.org/r/CAO3ALPwot01+bBisj7Roog7SD9UwV+y4NtiakKrBDE0tPvFhbw@mail.gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-02-11 13:43:08 -08:00
Abdel Alkuor 4b6358e1fe hwmon: (lm75) Add AMS AS6200 temperature sensor
as6200 is a temperature sensor with 0.0625°C resolution and a
range between -40°C to 125°C.

By default, the driver configures as6200 as following:
- Converstion rate: 8 Hz
- Conversion mode: continuous
- Consecutive fault counts: 4 samples
- Alert state: high polarity
- Alert mode: comparator mode

Interrupt is supported for the alert pin.

Signed-off-by: Abdel Alkuor <alkuor@gmail.com>
Link: https://lore.kernel.org/r/d1686678991bf8ee0d00cb08ca046798f37ca4b3.1703127334.git.alkuor@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-01-02 08:44:57 -08:00
Peter Yin f9e5f289b6 hwmon: (pmbus) Add support for MPS Multi-phase mp2856/mp2857 controller
Add support for mp2856/mp2857 device from Monolithic Power Systems, Inc.
(MPS) vendor. This is a dual-loop, digital, multi-phase,
modulation controller.

Signed-off-by: Peter Yin <peteryin.openbmc@gmail.com>
Signed-off-by: Potin Lai <potin.lai.pt@gmail.com>
Link: https://lore.kernel.org/r/20231211160519.21254-3-potin.lai.pt@gmail.com
[groeck: Fix checkpatch issues, use i2c_get_match_data()]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-01-02 08:44:57 -08:00
Aleksa Savic 42ac68e3d4 hwmon: Add driver for Gigabyte AORUS Waterforce AIO coolers
This driver exposes hardware sensors of the Gigabyte AORUS Waterforce
all-in-one CPU liquid coolers, which communicate through a proprietary
USB HID protocol. Report offsets were initially discovered in [1] and
confirmed by me on a Waterforce X240 by observing the sent reports from
the official software.

Available sensors are pump and fan speed in RPM, as well as coolant
temperature. Also available through debugfs is the firmware version.

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

The addressable RGB LEDs and LCD screen are not supported in this
driver and should be controlled through userspace tools.

[1]: https://github.com/liquidctl/liquidctl/issues/167

Signed-off-by: Aleksa Savic <savicaleksa83@gmail.com>
Link: https://lore.kernel.org/r/20231207122402.107032-1-savicaleksa83@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-01-02 08:44:57 -08:00
Stefan Gloor 6ec09effb2 hwmon: (sht3x) add sts3x support
Add information regarding the existing support for sts3x series and
update the datasheet links.

Signed-off-by: Stefan Gloor <code@stefan-gloor.ch>
Link: https://lore.kernel.org/r/20231204165004.8491-2-code@stefan-gloor.ch
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-01-02 08:44:56 -08:00
Delphine CC Chiu 0c459759ca hwmon: (pmbus) Add ltc4286 driver
Add a driver to support ltc4286 chip

Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@Wiwynn.com>
Link: https://lore.kernel.org/r/20231123015440.199822-3-Delphine_CC_Chiu@Wiwynn.com
[groeck: Fixed formatting]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-01-02 08:44:55 -08:00
Daniel Matyas 29a9ac6414 hwmon: (max31827) Add custom attribute for resolution
Added custom channel-specific (temp1) attribute for resolution. The wait
time for a conversion in one-shot mode (enable = 0) depends on the
resolution.

When resolution is 12-bit, the conversion time is 140ms, but the minimum
update_interval is 125ms. Handled this problem by waiting an additional
15ms (125ms + 15ms = 140ms).

Added 'mask' parameter to the shutdown_write() function. Now it can
either write or update bits, depending on the value of mask. This is
needed, because for alarms a write is necessary, but for resolution only
the resolution bits should be updated.

Signed-off-by: Daniel Matyas <daniel.matyas@analog.com>
Link: https://lore.kernel.org/r/20231031182158.124608-5-daniel.matyas@analog.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-12-11 06:42:58 -08:00
Daniel Matyas 88548710d2 hwmon: (max31827) Handle new properties from the devicetree
Used fwnode to retrieve data from the devicetree in the init_client
function.

If the uint32 properties are not present, the default values are used
for max31827 chip.

Signed-off-by: Daniel Matyas <daniel.matyas@analog.com>
Link: https://lore.kernel.org/r/20231031182158.124608-1-daniel.matyas@analog.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-12-11 06:42:36 -08:00
Armin Wolf e7caf3d1e8 hwmon: (dell-smm) Document the WMI SMM interface
Document the WMI SMM interface so that future developers
can better understand how it works.

Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Pali Rohár <pali@kernel.org>
Link: https://lore.kernel.org/r/20231123004820.50635-9-W_Armin@gmx.de
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-12-11 06:21:01 -08:00
Peter Yin ce0742404a hwmon: (pmbus) Add support for MPS Multi-phase mp5990
Add support for mp5990 device from Monolithic Power Systems, Inc. (MPS)
vendor. This is a Hot-Swap Controller.

Signed-off-by: Peter Yin <peteryin.openbmc@gmail.com>
Link: https://lore.kernel.org/r/20231113155008.2147090-3-peteryin.openbmc@gmail.com
[groeck: Improved and clarified comments]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-12-11 06:21:00 -08:00
Aleksa Savic ceaa22402e hwmon: (aquacomputer_d5next) Add support for Aquacomputer High Flow USB and MPS Flow
Extend aquacomputer_d5next driver to expose various hardware sensors of the
Aquacomputer High Flow USB flow sensor, which communicates through a
proprietary USB HID protocol. This commit also adds support for the sensors
of the MPS Flow devices, as they have the same USB product ID and sensor
layouts. Implemented by Leonard Anderweit [1].

Internal and external temp sensor readings are available, along with
the flow sensor.

Additionally, serial number and firmware version are exposed through
debugfs.

[1] https://github.com/aleksamagicka/aquacomputer_d5next-hwmon/pull/90

Originally-from: Leonard Anderweit <leonard.anderweit@gmail.com>
Signed-off-by: Aleksa Savic <savicaleksa83@gmail.com>
Link: https://lore.kernel.org/r/20231016083559.139341-3-savicaleksa83@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-10-29 22:22:48 -07:00
Antoniu Miclaus 2b9ea4262a hwmon: Add driver for ltc2991
Add support for LTC2991 Octal I2C Voltage, Current, and Temperature
Monitor.

The LTC2991 is used to monitor system temperatures, voltages and
currents. Through the I2C serial interface, the eight monitors can
individually measure supply voltages and can be paired for
differential measurements of current sense resistors or temperature
sensing transistors. Additional measurements include internal
temperature and internal VCC.

Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Link: https://lore.kernel.org/r/20231026103413.27800-2-antoniu.miclaus@analog.com
[groeck: Fixed up documentation warning]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-10-29 22:22:20 -07:00
Ellie Hermaszewska f7ac302003 hwmon: (asus-ec-sensors) add ROG Crosshair X670E Gene.
Only the temp sensors that I can verify are present.

T_Sensor is the temperature reading of a 10kΩ β=3435K NTC thermistor
optionally connected to the T_SENSOR header.

The other sensors are as found on the X670E Hero.

Signed-off-by: Ellie Hermaszewska <kernel@monoid.al>
Link: https://lore.kernel.org/r/20231026104332.906357-1-kernel@monoid.al
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-10-28 09:21:59 -07:00
Daniel Matyas 8824557037 hwmon: (max31827) Modify conversion wait time
There is nothing in the datasheet indicating that the 1ms error is
needed and I didn't encounter any error during testing with 140ms wait
time.

Signed-off-by: Daniel Matyas <daniel.matyas@analog.com>
Link: https://lore.kernel.org/r/20230919093456.10592-2-daniel.matyas@analog.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-10-28 09:21:40 -07:00
Alexander Koskovich 05b68e18ec hwmon: (nct6683) Add another customer ID for ASRock X670E Taichi
This value was found on an ASRock X670E Taichi with an
NCT6686D chip.

Signed-off-by: Alexander Koskovich <akoskovich@pm.me>
Link: https://lore.kernel.org/r/20231023182442.21943-1-akoskovich@pm.me
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-10-28 09:21:36 -07:00
Timothy Pearson 62c11e461c hwmon: (adt7475) Add support for Imon readout on ADT7490
Add support for the ADT7490's Imon voltage readout. It is handled
largely the same way as the existing Vtt readout.

Signed-off-by: Timothy Pearson <tpearson@raptorengineering.com>
Co-developed-by: Shawn Anastasio <sanastasio@raptorengineering.com>
Signed-off-by: Shawn Anastasio <sanastasio@raptorengineering.com>
Link: https://lore.kernel.org/r/20230914223947.829025-1-tpearson@raptorengineering.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-10-27 07:27:25 -07:00
Armin Wolf e09b750526 hwmon: (sch5627) Document behaviour of limit registers
The values of the limit registers affect the fan speed in a
particular way. Document this behaviour so that future users
can exploit it if required.

Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://lore.kernel.org/r/20230907052639.16491-6-W_Armin@gmx.de
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-10-27 07:27:24 -07:00
Thomas Weißschuh 4381a36abd hwmon: add POWER-Z driver
POWER-Z is a series of devices to monitor power characteristics of
USB-C connections and display those on a on-device display.
Some of the devices, notably KM002C and KM003C, contain an additional
port which exposes the measurements via USB.

This is a driver for this monitor port.

It was developed and tested with the KM003C.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://lore.kernel.org/r/20230902-powerz-v4-1-7ec2c1440687@weissschuh.net
[groeck:
 Release urb after hwmon registration error;
 Move priv->status initialization to correct place before reinit_completion
 ]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-10-27 07:27:23 -07:00
Linus Torvalds cd99b9eb4b Documentation work keeps chugging along; stuff for 6.6 includes:
- Work from Carlos Bilbao to integrate rustdoc output into the generated
   HTML documentation.  This took some work to figure out how to do it
   without slowing the docs build and without creating people who don't have
   Rust installed, but Carlos got there.
 
 - Move the loongarch and mips architecture documentation under
   Documentation/arch/.
 
 - Some more maintainer documentation from Jakub
 
 ...plus the usual assortment of updates, translations, and fixes.
 -----BEGIN PGP SIGNATURE-----
 
 iQFDBAABCAAtFiEEIw+MvkEiF49krdp9F0NaE2wMflgFAmTvqNkPHGNvcmJldEBs
 d24ubmV0AAoJEBdDWhNsDH5YgIgH/3drfLtlFtzLqDOzrzDXS8yGnE3pPdxw796b
 /ZFzAK16wYKaKevYoIz8bVGGKaE1sEUW0mhlq4KGdfZuxLG8YnWS8URyCW4FDU2E
 6qNL+8oJ8LZfID46f9Q8ZgfEz7yF/mhCqPk7MEswYtwbscs2ZTGCTGYB/5BHlBuT
 LR+M89uLmHgr8S1o24v30OgiX+VvQFyu0xoxIhbiqUZvBd/XdfX2pgYd9BGzMj5q
 C2ZP+V14g36c5pV0EO9TwhCXOF/WVrp7DbjbfWAsqBSLxvpXPydH2q1DUzGeQtP1
 exujrBD1O8q3pPdaNA5R+h6cWlHmUZug9mE4BRLp9ErGrozwJsQ=
 =C3Uv
 -----END PGP SIGNATURE-----

Merge tag 'docs-6.6' of git://git.lwn.net/linux

Pull documentation updates from Jonathan Corbet:
 "Documentation work keeps chugging along; this includes:

   - Work from Carlos Bilbao to integrate rustdoc output into the
     generated HTML documentation. This took some work to figure out how
     to do it without slowing the docs build and without creating people
     who don't have Rust installed, but Carlos got there

   - Move the loongarch and mips architecture documentation under
     Documentation/arch/

   - Some more maintainer documentation from Jakub

  ... plus the usual assortment of updates, translations, and fixes"

* tag 'docs-6.6' of git://git.lwn.net/linux: (56 commits)
  Docu: genericirq.rst: fix irq-example
  input: docs: pxrc: remove reference to phoenix-sim
  Documentation: serial-console: Fix literal block marker
  docs/mm: remove references to hmm_mirror ops and clean typos
  docs/zh_CN: correct regi_chg(),regi_add() to region_chg(),region_add()
  Documentation: Fix typos
  Documentation/ABI: Fix typos
  scripts: kernel-doc: fix macro handling in enums
  scripts: kernel-doc: parse DEFINE_DMA_UNMAP_[ADDR|LEN]
  Documentation: riscv: Update boot image header since EFI stub is supported
  Documentation: riscv: Add early boot document
  Documentation: arm: Add bootargs to the table of added DT parameters
  docs: kernel-parameters: Refer to the correct bitmap function
  doc: update params of memhp_default_state=
  docs: Add book to process/kernel-docs.rst
  docs: sparse: fix invalid link addresses
  docs: vfs: clean up after the iterate() removal
  docs: Add a section on surveys to the researcher guidelines
  docs: move mips under arch
  docs: move loongarch under arch
  ...
2023-08-30 20:05:42 -07:00
Andre Werner 43fbe66dc2 hwmon: Add driver for Renesas HS3001
Add base support for Renesas HS3001 temperature
and humidity sensors and its compatibles HS3002,
HS3003 and HS3004.

The sensor has a fix I2C address 0x44. The resolution
is fixed to 14bit (ref. Missing feature).

Missing feature:
- Accessing non-volatile memory: Custom board has no
  possibility to control voltage supply of sensor. Thus,
  we cannot send the necessary control commands within
  the first 10ms after power-on.

Signed-off-by: Andre Werner <andre.werner@systec-electronic.com>
Link: https://lore.kernel.org/r/20230725042207.22310-2-andre.werner@systec-electronic.com
[groeck: Cosmetic documentation fixup; added documentation to index;
 replaced probe_new with probe dropped unused variable]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-08-21 06:04:30 -07:00
Guenter Roeck b3af14c4c2 hwmon: Remove smm665 driver
SMM665 and related chips are power controller/sequencer chips from
Summit Microelectronics. The company was acquired by Qualcomm in 2012,
and support for the chip series stopped.

The chips are long since gone from active use, making the driver
unsupportable and just consuming space and compile time. Remove it.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-08-21 06:04:29 -07:00
Ahmad Khalifa 23299bba08 hwmon: (nct6775) Change labels for nct6799
nct6799d-r and nct6796d-s are very similar and chip_id is only
different in the version nibblet.

Since both will be detected by the driver anyway due to the
chipid mask, they should be labeled together for dmesg msg.

Signed-off-by: Ahmad Khalifa <ahmad@khalifa.ws>
Link: https://lore.kernel.org/r/20230715195244.1334723-1-ahmad@khalifa.ws
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-08-21 06:04:29 -07:00
Uwe Kleine-König 4a754aba0b hwmon: (pmbus) Update documentation to not use .probe_new() any more
Since commit 03c835f498 ("i2c: Switch .probe() to not take an id
parameter") .probe() is the recommended callback to implement an i2c
driver (again). Reflect this in the documentation and don't mention
.probe_new() which will be dropped soon.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230627064948.593804-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-08-21 06:04:29 -07:00
Bjorn Helgaas d56b699d76 Documentation: Fix typos
Fix typos in Documentation.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://lore.kernel.org/r/20230814212822.193684-4-helgaas@kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2023-08-18 11:29:03 -06:00
Jerrod Frost 4dbbaf8fbd hwmon: (oxp-sensors) Add support for AOKZOE A1 PRO
This device is an iteration over the AOKZOE A1 with the same EC mapping
and features.

It also has support for tt_toggle.

Signed-off-by: Jerrod Frost <jcfrosty@proton.me>
Signed-off-by: Joaquín Ignacio Aramendía <samsagax@gmail.com>
Link: https://lore.kernel.org/r/20230625012347.121352-2-samsagax@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-06-24 20:17:18 -07:00
Wilken Gottwalt 741ed0856d hwmon: (corsair-psu) update Series 2022 and 2023 support
The series 2022/2023 reports slightly longer vendor/product strings
and shares USB ids. Technically the reply size is the USB HID packet
size (64 bytes) but all the supported commands do not use more than 8
bytes and replies reporting back strings do not use more then 24 bytes
(vendor and product are in one string in the newer devices now). The
rest of the reply is always filled with '\0'. Also update comments
and documentation accordingly.

Signed-off-by: Wilken Gottwalt <wilken.gottwalt@posteo.net>
Link: https://lore.kernel.org/r/ZJbB72CAPmLflhHG@monster.localdomain
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-06-24 08:47:29 -07:00
Wilken Gottwalt b54c4b02ab hwmon: (corsair-psu) various cleanups
Fix some typos, adjust documentation and comments to current state of
knowledge and update coding style to be more uniform.

Signed-off-by: Wilken Gottwalt <wilken.gottwalt@posteo.net>
Link: https://lore.kernel.org/r/ZJWf3H972hGgLK-8@monster.localdomain
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-06-23 07:47:37 -07:00
Wilken Gottwalt 0d67bbc48c hwmon: (corsair-psu) add support for reading PWM values and mode
Add support for reading PWM values and mode,
and update documentation accordingly.

Signed-off-by: Wilken Gottwalt <wilken.gottwalt@posteo.net>
Link: https://lore.kernel.org/r/ZJSASByXpzoZ0XyH@monster.localdomain
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-06-22 10:42:39 -07:00
Joaquín Ignacio Aramendía be144ee491 hwmon: (oxp-sensors) Add tt_toggle attribute on supported boards
OneXPlayer boards from the last generation (both for OneXPlayer and AOK
ZOE brands) have a toggle in the EC to switch the "Turbo/Silent" button
into a different keyboard event.

Add a means to use that "Turbo button takeover" function and expose it
to userspace in a custom sysfs `tt_toggle` attribute. It can be read to
take the current state. Write 1|0 to activate the function. The specific
keycode is dependent on the board but can be checked by running
`evtest` utility.

Newer BIOS on the OneXPlayer added this function aside from string changes.
Add a board enum to differentiate it from the old OneXplayer Mini AMD BIOS.

Currently known supported boards:
- AOK ZOE A1
- OneXPlayer Mini AMD (only newer BIOS version supported)
- OneXPlayer Mini Pro

Signed-off-by: Joaquín Ignacio Aramendía <samsagax@gmail.com>
Link: https://lore.kernel.org/r/20230611143332.40590-2-samsagax@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-06-17 20:49:18 -07:00