Commit Graph

999 Commits

Author SHA1 Message Date
Frank Li
11d35624d7 hwmon: (tmp108) Add NXP p3t1085 support
Add compatible string 'nxp,p3t1085' since p3t1085's register layout is the
same as tmp108.

The p3t1085 supports I3C interface.

Update document tmp108.rst and Kconfig's help context.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
Message-ID: <20241111-p3t1085-v3-2-bff511550aad@nxp.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-11-12 13:54:55 -08:00
Abhinav Saxena
1f22c07257 hwmon: (sch5627, max31827) Fix typos in driver documentation
Fix some typos in hwmon/sch5627 and hwmon/max31827 reported by
checkpatch.pl. These changes are purely documentation cleanup with no
functional modifications.

Signed-off-by: Abhinav Saxena <xandfury@gmail.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Reviewed-by: Bagas Sanjaya <bagasdotme@gmail.com>
Message-ID: <20241108212201.144482-1-xandfury@gmail.com>
[groeck: Updated subject]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-11-12 13:54:55 -08:00
Abhinav Saxena
2e5bdf8aa2 hwmon: (f71882fg) Fix grammar in fan speed trip points explanation
Fix several grammatical issues in the fan speed trip points documentation:
- Replace awkward "which % the fan should run at at" construction with
 clearer "that specify the percentage at which"
- Fix incorrect "is chip depended" to "are chip dependent" for correct
 verb agreement and adjective form
- Improve readability by reorganizing first sentence and separating the
 complex explanation into simpler parts
- Add hyphen before "see" to improve readability
- Remove redundant "at" in temperature description

No functional changes, documentation only.

Signed-off-by: Abhinav Saxena <xandfury@gmail.com>
Message-ID: <20241107013849.47833-1-xandfury@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-11-12 13:54:55 -08:00
Jerome Brunet
544177f20b hwmon: (pmbus) add documentation for existing flags
PMBUS_NO_WRITE_PROTECT and PMBUS_USE_COEFFICIENTS_CMD flags have been added
to pmbus, but the corresponding documentation was not updated.

Update the documentation before adding new flags

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Message-ID: <20241105-tps25990-v4-1-0e312ac70b62@baylibre.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-11-10 14:48:07 -08:00
Wenliang Yan
52172ad87a hwmon: (ina226) Add support for SY24655
SY24655: Support for current and voltage detection as well as
power calculation.

Signed-off-by: Wenliang Yan <wenliang202407@163.com>
Message-ID: <20241106150547.2538-1-wenliang202407@163.com>
[groeck: Changed order of compatible entries;
 dropped spurious extra return statement in is_visible();
 fixed code problems]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-11-10 14:48:07 -08:00
Mariel Tinaco
baf88c49a2 hwmon: (pmbus/ltc7841) add support for LTC7841 - docs
Add LTC7841 to compatible devices of LTC2978

Signed-off-by: Mariel Tinaco <Mariel.Tinaco@analog.com>
Message-ID: <20241029013734.293024-3-Mariel.Tinaco@analog.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-11-10 14:48:07 -08:00
Ban Feng
46b94c485e hwmon: Add driver for I2C chip Nuvoton NCT7363Y
The NCT7363Y is a fan controller which provides up to 16
independent FAN input monitors. It can report each FAN input count
values. The NCT7363Y also provides up to 16 independent PWM
outputs. Each PWM can output specific PWM signal by manual mode to
control the FAN duty outside.

Signed-off-by: Ban Feng <kcfeng0@nuvoton.com>
Message-ID: <20241022052905.4062682-3-kcfeng0@nuvoton.com>
[groeck: Dropped unnecessary variable initialization, and , after { }]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-11-10 14:48:07 -08:00
Yikai Tsai
39671a14df hwmon: (isl28022) new driver for ISL28022 power monitor
Driver for Renesas ISL28022 power monitor with I2C interface.
The device monitors voltage, current via shunt resistor
and calculated power.

Signed-off-by: Carsten Spieß <mail@carsten-spiess.de>
Signed-off-by: Yikai Tsai <yikai.tsai.wiwynn@gmail.com>
Message-ID: <20241002081133.13123-3-yikai.tsai.wiwynn@gmail.com>
[groeck: Fixed alignment issues, dropped noise at end of probe]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-11-10 14:48:07 -08:00
Antoni Pokusinski
0eed6fc3d2 hwmon: (sht4x): add heater support
Add support for manipulating the internal heater of sht4x devices.
Enabling the heater removes condensed water from the sensor surface
which disturbs the relative humidity measurements.

The heater can operate at three heating levels (20, 110 or 200
milliwatts). Also, two heating durations may be selected (0.1 or 1s).
Once the heating time elapses the heater is automatically switched off.

Changes since v3:
* struct sht4x_data: add heating_complete timestamp
* struct sht4x_data: add data_pending flag
* heater_enable_store: return -EINVAL if input != 1
* heater_enable_store: check for data->heating_complete and update it
* heater_enable_store: set data_pending flag after heating request
* sht4x_read_values: msleep if heating in progress
* sht4x_read_values: dont send measurement request if data_pending
* heater_enable attr: make it RW
* Documentation: update info about heater_enable attr

Changes since v2:
* heater_enable_store: remove unnecessary if
* Documentation: remove incorrect info about turning off the heater
* be more specific in the patch description

Changes since v1:
* explain the use case of the new attributes set
* heater_enable attr: make it write-only
* heater_enable_store: define cmd as u8 instead of u8*
* heater_enable_store: remove unreachable data path
* heater_enable_store: remove unnecessary lock
* heater_enable_store: call i2c_master_send only if status==true
* define attributes as DEVICE_ATTR_* instead of SENSOR_DEVICE_ATTR_*

Signed-off-by: Antoni Pokusinski <apokusinski01@gmail.com>
Message-ID: <20240930205346.2147-1-apokusinski01@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-11-10 14:48:07 -08:00
Everest K.C.
edeed7b666 hwmon: (max31827) Fix spelling errors reported by codespell
Below mentioned spelling errors reported by codesepll
were fixed:
	respresents ==> represents
	signifcant ==> significant
	bandwitdh ==> bandwidth

Signed-off-by: Everest K.C. <everestkc@everestkc.com.np>
Message-ID: <20241001011521.80982-1-everestkc@everestkc.com.np>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-11-10 14:48:06 -08:00
Guenter Roeck
70fb84a109 hwmon: (ina2xx) Add support for INA260
INA260 is similar to other chips of the series, except it has an internal
shunt resistor. The calibration register is therefore not present. Also,
the current register address was changed, though that does not matter for
the driver since the shunt voltage register (which is now the current
register) value is already used to read the current.

Cc: Loic Guegan <loic.guegan@mailbox.org>
Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-11-10 14:48:06 -08:00
Guenter Roeck
2cb4acf214 hwmon: Remove devm_hwmon_device_unregister() API function
devm_hwmon_device_unregister() has no in-tree user, and its implementation
is wrong since it does not pass the to-be-removed hardware monitoring
device as parameter. I do not envision a valid use for it; drivers needing
it should not have called devm_hwmon_device_register_with_info() in the
first place. Remove it.

Reported-by: Matthew Sanders <m@ttsande.rs>
Closes: https://lore.kernel.org/linux-hwmon/488b3bdf870ea76c4b943dbe5fd15ac8113019dc.camel@kernel.org/
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-09-13 07:27:36 -07:00
Guenter Roeck
4d5c2d9867 hwmon: (ina2xx) Add support for current limits
While the chips supported by this driver do not directly support current
limits, they do support setting shunt voltage limits. The shunt voltage
divided by the shunt resistor value is the current. On top of that,
calibration values are set such that in the shunt voltage register and
the current register report the same values. That means we can report and
configure current limits based on shunt voltage limits, and we can do so
with much better accuracy than by setting shunt voltage limits.

Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-08-30 08:34:23 -07:00
Inochi Amaoto
758b62e562 hwmon: Add sophgo SG2042 external hardware monitor support
SG2042 use an external MCU to provide basic hardware information
and thermal sensors.

Add driver support for the onboard MCU of SG2042.

Signed-off-by: Inochi Amaoto <inochiama@outlook.com>
Message-ID: <IA1PR20MB49536C786048D1E676BB9C20BB822@IA1PR20MB4953.namprd20.prod.outlook.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-08-27 08:11:15 -07:00
Derek J. Clark
b82b38a499 hwmon: (oxp-sensors) Add support for multiple new devices.
Add support for the OrangePi NEO-01. It uses different registers for PWM
manual mode, set PWM, and read fan speed than previous devices. Valid PWM
input and duty cycle is 1-244, we scale this from 1-255 to maintain
compatibility with the existing interface.

Add OneXPlayer 2 series, OneXFly, and X1 series models. The 2/X1 series use
new registers for turbo button takeover and read fan speed. X1 has an Intel
variant so change the CPU detection at init to only check for the affected
devices. While at it, adjust formatting of some constants and reorder all
cases alphabetically for consistency. Rename OXP_OLD constants to OXP_MINI
for disambiguation. Update code comments for clarity.

Add support for AYANEO models 2S, AIR 1S, Flip series, GEEK 1S, and KUN.

Signed-off-by: Derek J. Clark <derekjohn.clark@gmail.com>
Tested-by: Kevin Greenberg <kdgreenberg234@protonmail.com>
Tested-by: Joshua Tam <csinaction@pm.me>
Tested-by: Parth Menon <parthasarathymenon@gmail.com>
Tested-by: Philip Müller <philm@manjaro.org>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202408160329.TLNbIwRC-lkp@intel.com/
Message-ID: <20240822183525.27289-2-derekjohn.clark@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-08-27 08:10:33 -07:00
Guenter Roeck
05aa8cbeab hwmon: (lm92) Update documentation
Update datasheet references. Replace misleading 'force parameter needed'
with 'must be instantiated explicitly'. Explain the reason for the missing
auto-detection. Mention all supported chips in Kconfig.

Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-08-27 08:10:23 -07:00
Guenter Roeck
f8016132ce hwmon: (max1619) Convert to use regmap
Use regmap for local caching, to hide register read/write address
differences, and for multi-byte operations. With this change,
the driver specific lock is no longer necessary.

While at it, check errors seen when initializing the chip and bail out
if chip initialization fails.

Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-07-31 10:43:53 -07:00
Cryolitia PukNgae
34ea1f9867 hwmon: (oxp-sensors) Fix typo in driver documentation
RMP -> RPM

Signed-off-by: Cryolitia PukNgae <Cryolitia@gmail.com>
Link: https://lore.kernel.org/r/20240726-typo-v1-1-3ca3f07f93e9@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-07-31 10:43:52 -07:00
Linus Torvalds
500a711df6 hwmon updates for v6.11-rc1
* Obsolete driver removals
 
   - Removed obsolete adm1021 and max6642 drivers
 
 * New drivers
 
   - MPS MP2891
 
   - MPS MP2993
 
   - MPS MP9941
 
   - MPS MP5920
 
   - SPD5118 (Temperature Sensor and EEPROM)
 
 * Added device support to existing drivers
 
   - g762: G761
 
   - dell-smm: Dell OptiPlex 7060
 
   - asus-ec-sensors: ProArt X670E-CREATOR WIFI
 
   - corsair-psu: HX1200i Series 2023 psu
 
   - nzxt-smart2: Additional USB IS for NZXT RGB & Fan Controller
 
 * Notable enhancements and fixes
 
   - Removed use of i2c_match_id()
 
   - Constified struct regmap_config where feasible
 
   - Cleaned up amc6821 driver, and converted to use regmap and with_info API
 
   - Converted max6639 driver to use with_info API; added support for
     additional sysfs attributes
 
   - Fixed various sysfs attribute underflows
 
   - Added PEC support to hwmon core, and use in lm90 and max31827 drivers
 
 * Various other minor fixes and improvements
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEiHPvMQj9QTOCiqgVyx8mb86fmYEFAmaUaiIACgkQyx8mb86f
 mYHnbRAAhyaqFF1w5B/XEuZOQ3obG+pAV1ZioE7wXpeRDlniJ9/WgFe4bPpvTNQm
 C2LHW6kVtwxybM/FOJz9BN32WiP9v2kp9upb7hhHHo32+5dv57iQR5lB+JC/7lpy
 HLisqLrPc5eDQlUiOdeph5fsKyuydxQkefbR1x4shxmcgn+D5M+AYjuAZOA6fSun
 spSzgTyPGWgGfhQjSzKoA7DHG3S2pFxRTfqOArvKLOM+ahyOCFuS8Kbq/JpqvalB
 moiyIJUeOrgJcTcHSecQ/uFxFiShGBs6EQ1Ao8O9kO0WFw7ke1fw/fWESeTvtiBm
 0Z3zfqAIKcnCXvKEupltWXf6kASx5LSlycODTZQlXEROeYhzhJw3J5qF4h0r4+EM
 oKmptVLLLekVYrjQlarBtHqpdfnwsL1GuQTk5fZz7ZbG85/ktKV6aGTeKGYdBvll
 zZSjz3Jys2u191uxATpJ3vmjaggPylX6dXgmJ9u9lW16+/OnNq7sWURekIfE3F+P
 dpZsaia2KN3WAnX/qLQWOOOBbkIIGxn48e+Hi6QY9igVUbY+P/BBfhb9UiWonLKU
 exRxAFNV5a4nM0ipJF4odwMqzC9ZjrpY6zFQFZCrG79zOO62/gADUAVzwu2LGGig
 p6hqGJmEOkJgYd0zo8KP8ABwgffn8EAtgXBtQU0RS/ls7Z0S58U=
 =ebWS
 -----END PGP SIGNATURE-----

Merge tag 'hwmon-for-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging

Pull hwmon updates from Guenter Roeck:
 "Obsolete driver removals:

   - Removed obsolete adm1021 and max6642 drivers

  New drivers:

   - MPS MP2891, MP2993, MP9941, and MP5920

   - SPD5118 (Temperature Sensor and EEPROM)

  Added device support to existing drivers:

   - g762: G761

   - dell-smm: Dell OptiPlex 7060

   - asus-ec-sensors: ProArt X670E-CREATOR WIFI

   - corsair-psu: HX1200i Series 2023 psu

   - nzxt-smart2: Additional USB IS for NZXT RGB & Fan Controller

  Notable enhancements and fixes:

   - Removed use of i2c_match_id()

   - Constified struct regmap_config where feasible

   - Cleaned up amc6821 driver, and converted to use regmap and
     with_info API

   - Converted max6639 driver to use with_info API; added support for
     additional sysfs attributes

   - Fixed various sysfs attribute underflows

   - Added PEC support to hwmon core, and use in lm90 and max31827
     drivers

  And various other minor fixes and improvements"

* tag 'hwmon-for-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (103 commits)
  hwmon: (max6697) Fix swapped temp{1,8} critical alarms
  hwmon: (max6697) Fix underflow when writing limit attributes
  hwmon: Remove obsolete adm1021 and max6642 drivers
  hwmon: (pmbus/ltc4286) Drop unused i2c device ids
  hwmon: (g762) Initialize fans after configuring clock
  hwmon: (amc6821) Add support for pwm1_mode attribute
  hwmon: (amc6821) Convert to with_info API
  hwmon: (amc6821) Convert to use regmap
  hwmon: (amc6821) Drop unnecessary enum chips
  hwmon: (amc6821) Use BIT() and GENMASK()
  hwmon: (amc6821) Use tabs for column alignment in defines
  hwmon: (amc6821) Reorder include files, drop unnecessary ones
  hwmon: (amc6821) Add support for fan1_target and pwm1_enable mode 4
  hwmon: (amc6821) Rename fan1_div to fan1_pulses
  hwmon: (amc6821) Make reading and writing fan speed limits consistent
  hwmon: (amc6821) Stop accepting invalid pwm values
  hwmon: (w83627ehf) Fix underflows seen when writing limit attributes
  hwmon: (nct6775-core) Fix underflows seen when writing limit attributes
  hwmon: (lm95234) Fix underflows seen when writing limit attributes
  hwmon: (adc128d818) Fix underflows seen when writing limit attributes
  ...
2024-07-15 17:39:13 -07:00
Guenter Roeck
ed99ae74f2 hwmon: Remove obsolete adm1021 and max6642 drivers
ADM1021, MAX6642, and compatible chips are supported by the lm90 driver.
Remove the obsolete stand-alone drivers to reduce maintenance overhead.

Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-07-14 11:48:43 -07:00
Guenter Roeck
4814241a58 hwmon: (amc6821) Add support for pwm1_mode attribute
AMC6821 supports configuring if a fan is DC or PWM controlled.
Add support for the pwm1_mode attribute to make it runtime configurable.

Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-07-08 07:52:36 -07:00
Guenter Roeck
becbd16ed2 hwmon: (amc6821) Add support for fan1_target and pwm1_enable mode 4
After setting fan1_target and setting pwm1_enable to 4,
the fan controller tries to achieve the requested fan speed.

Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-07-08 07:52:36 -07:00
Guenter Roeck
154a0c2bd6 hwmon: (amc6821) Rename fan1_div to fan1_pulses
The chip does not have a fan divisor. What it does have is a configuration
to set either 2 or 4 pulses per fan rotation. Rename the attribute to
reflect its use. Update documentation accordingly.

Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-07-08 07:52:36 -07:00
Alex Vdovydchenko
cd228e7b65 hwmon: add MP5920 driver
Add support for MPS Hot-Swap controller mp5920. This driver exposes
telemetry and limit value readings and writings.

Signed-off-by: Alex Vdovydchenko <xzeol@yahoo.com>
Reviewed-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://lore.kernel.org/r/20240702115252.981416-3-xzeol@yahoo.com
[groeck: Use min_t() to limit length of displayed model string]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-07-02 12:36:31 -07:00
Armin Wolf
ef8df816ee hwmon: (dell-smm) Add Dell OptiPlex 7060 to DMI table
The BIOS on this machine is buggy and will in some cases return
an error when trying to get the fan state, but reading of the
RPM values and the temperature sensors still works.

Closes: https://github.com/vitorafsr/i8kutils/issues/38
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Acked-by: Pali Rohár <pali@kernel.org>
Link: https://lore.kernel.org/r/20240628214723.19665-1-W_Armin@gmx.de
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-06-30 09:13:08 -07:00
Noah Wang
38b2b02236 hwmon: add MP2891 driver
Add support for MPS VR controller mp2891. This driver exposes
telemetry and limit value readings and writtings.

Signed-off-by: Noah Wang <noahwang.wang@outlook.com>
Link: https://lore.kernel.org/r/SEYPR04MB64828A352836982C0184AA10FAD62@SEYPR04MB6482.apcprd04.prod.outlook.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-06-28 10:27:47 -07:00
Noah Wang
dc5abc2ff0 hwmon: add MP9941 driver
Add support for MPS step-down converter mp9941. This driver exposes
telemetry and limit value readings and writtings.

Signed-off-by: Noah Wang <noahwang.wang@outlook.com>
Link: https://lore.kernel.org/r/SEYPR04MB648294005D55F70736B519F6FAC72@SEYPR04MB6482.apcprd04.prod.outlook.com
[groeck: Include bitfield.h (for FIELD_PREP) and bits.h (for GENMASK)]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-06-12 22:39:34 -07:00
Noah Wang
fc37348c90 hwmon: add MP2993 driver
Add support for MPS VR controller mp2993. This driver exposes
telemetry and limits value readings and writtings.

Signed-off-by: Noah Wang <noahwang.wang@outlook.com>
Link: https://lore.kernel.org/r/SEYPR04MB648203DC017A514837DB1204FAC72@SEYPR04MB6482.apcprd04.prod.outlook.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-06-12 08:59:44 -07:00
Eugene Shalygin
71ac69e089 hwmon: (asus-ec-sensors) add ProArt X670E-CREATOR WIFI
Provided and tested by a user in a GitHub PR [1].

[1] https://github.com/zeule/asus-ec-sensors/pull/56

Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com>
Link: https://lore.kernel.org/r/20240608085146.572777-2-eugene.shalygin@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-06-10 09:13:56 -07:00
Guenter Roeck
25dff444c6 hwmon: (spd5118) Add support for reading SPD data
Add support for reading SPD NVMEM data from SPD5118 (Jedec JESD300)
compliant memory modules. NVMEM write operation is not supported.

NVMEM support is optional. If CONFIG_NVMEM is disabled, the driver will
still instantiate but not provide NVMEM attribute files.

Reviewed-by: Thomas Weißschuh <linux@weissschuh.net>
Tested-by: Armin Wolf <W_Armin@gmx.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-06-10 09:13:41 -07:00
Guenter Roeck
09262e9814 hwmon: Add support for SPD5118 compliant temperature sensors
Add support for SPD5118 (Jedec JESD300) compliant temperature
sensors. Such sensors are typically found on DDR5 memory modules.

Cc: René Rebe <rene@exactcode.de>
Cc: Thomas Weißschuh <linux@weissschuh.net>
Reviewed-by: Thomas Weißschuh <linux@weissschuh.net>
Tested-by: Thomas Weißschuh <linux@weissschuh.net>
Tested-by: Stephen Horvath <s.horvath@outlook.com.au>
Tested-by: Armin Wolf <W_Armin@gmx.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-06-10 09:13:41 -07:00
Radu Sabau
5124d9acf3 hwmon: (max31827) Add PEC support
Add PEC support using the hwmon core infrastructure.

Signed-off-by: Radu Sabau <radu.sabau@analog.com>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20240531084645.12935-2-radu.sabau@analog.com
[groeck: Adjusted subject; simplified description]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-06-03 20:26:31 -07:00
Thomas Weißschuh
bc3e452580 hwmon: add ChromeOS EC driver
The ChromeOS Embedded Controller exposes fan speed and temperature
readings.
Expose this data through the hwmon subsystem.

The driver is designed to be probed via the cros_ec mfd device.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20240529-cros_ec-hwmon-v4-2-5cdf0c5db50a@weissschuh.net
[tzungbi: Fixed typo in MAINTAINERS: "chros_ec_hwmon" -> "cros_ec_hwmon"]
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
2024-06-03 04:13:43 +00:00
Wilken Gottwalt
b9c15c96cc hwmon: corsair-psu: add USB id of HX1200i Series 2023 psu
Add the usb id of the HX1200i Series 2023. Update the documentation
accordingly. Also fix the version comments, there are no Series 2022
products. That are legacy or first version products going back many
many years.

Signed-off-by: Wilken Gottwalt <wilken.gottwalt@posteo.net>
Link: https://lore.kernel.org/r/ZlAZs4u0dU7JxtDf@monster.localdomain
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-05-29 15:33:18 -07:00
Marius Zachmann
5997eb60f8 hwmon: (corsair-cpro) Add firmware and bootloader information
Add support for reporting firmware and bootloader version using debugfs.
Update documentation accordingly.

Signed-off-by: Marius Zachmann <mail@mariuszachmann.de>
Link: https://lore.kernel.org/r/20240513194734.43040-2-mail@mariuszachmann.de
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-05-29 15:23:54 -07:00
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