Commit Graph

1153556 Commits

Author SHA1 Message Date
Guenter Roeck a6f7c5d0e7 hwmon: (pmbus/max16601) Add support for MAX16600
From programming perspective, MAX16600 is identical to MAX16601 and
MAX16602. Add support for it.

Cc: Steve Foreman <foremans@google.com>
Cc: Holly Barrett <holly.barrett@analog.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-02-03 07:30:11 -08:00
John Pruitt b11f3d47c0 hwmon: (ltc2945) Allow setting shunt resistor
Add the ability to specify the value of the shunt resistor in the
device tree instead of assuming it is 1 milliOhm. The value in the
device tree has the name shunt-resistor-micro-ohms and the
default value is 1000 micro-ohms in order to preserve the
current behavior.

Signed-off-by: Jonathan Cormier <jcormier@criticallink.com>
Signed-off-by: John Pruitt <jpruitt@criticallink.com>
[groeck: Fixed multi-line alignment, squashed last patch of series]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-02-03 07:30:10 -08:00
Jonathan Cormier 178b01eccf hwmon: (ltc2945) Handle error case in ltc2945_value_store
ltc2945_val_to_reg errors were not being handled
which would have resulted in register being set to
0 (clamped) instead of being left alone.

Fixes: 6700ce035f ("hwmon: Driver for Linear Technologies LTC2945")

Signed-off-by: Jonathan Cormier <jcormier@criticallink.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-02-03 07:30:10 -08:00
Jonathan Cormier 4b0654e2c3 hwmon: (ltc2945) Add devicetree match table
Add adi,ltc2945 compatible

Signed-off-by: Jonathan Cormier <jcormier@criticallink.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-02-03 07:30:10 -08:00
Jonathan Cormier 7c81970baf dt-bindings: hwmon: adi,ltc2945: Add binding
Create initial binding for the LTC2945 I2C power monitor.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Jonathan Cormier <jcormier@criticallink.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-02-03 07:30:10 -08:00
Patrick Rudolph 95b80c48cf hwmon: (pmbus/tda38640) Add driver for Infineon TDA38640 Voltage Regulator
Add the pmbus driver for the Infineon TDA38640 voltage regulator.

Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Signed-off-by: Naresh Solanki <Naresh.Solanki@9elements.com>
Link: https://lore.kernel.org/r/20230124202317.3704963-2-Naresh.Solanki@9elements.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-02-03 07:30:10 -08:00
Naresh Solanki af499400dc dt-bindings: trivial-devices: Add Infineon TDA38640 Voltage Regulator
Infineon TDA38640 is PMBUS compliant voltage regulator.

Signed-off-by: Naresh Solanki <Naresh.Solanki@9elements.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230124202317.3704963-1-Naresh.Solanki@9elements.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-02-03 07:30:10 -08:00
Eric Nguyen 195f46e5af hwmon: (asus-ec-sensors) add zenith ii extreme alpha
The ROG ZENITH II EXTREME ALPHA provides the same set of sensors as the
no-ALPHA version. Tested with the hardware [1].

[1] https://github.com/zeule/asus-ec-sensors/issues/31

Signed-off-by: Eric Nguyen <linux@drogman.ch>
Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com>
Link: https://lore.kernel.org/r/20230128102135.5199-1-eugene.shalygin@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-02-03 07:30:10 -08:00
Mario Kicherer 07830d9ab3 hwmon: add initial NXP MC34VR500 PMIC monitoring support
Add initial monitoring support for the MC34VR500 PMIC. In its current
state, input voltage and temperature alarms are reported to hwmon.

Datasheet:
 - https://www.nxp.com/docs/en/data-sheet/MC34VR500.pdf

Signed-off-by: Mario Kicherer <dev@kicherer.org>
Link: https://lore.kernel.org/r/20230118123019.3041303-4-dev@kicherer.org
[groeck: Silence stray compiler warning, terminate struct of_device_id]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-02-03 07:30:10 -08:00
Mario Kicherer a66c914791 docs: hwmon: add docs for the NXP MC34VR500 PMIC
Add documentation for the NXP MC34VR500 PMIC.

Signed-off-by: Mario Kicherer <dev@kicherer.org>
Link: https://lore.kernel.org/r/20230118123019.3041303-3-dev@kicherer.org
[groeck: Added to index]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-02-03 07:30:10 -08:00
Mario Kicherer 363ab25324 dt-bindings: hwmon: add nxp,mc34vr500
Add dt-bindings for the NXP MC34VR500 PMIC.

Signed-off-by: Mario Kicherer <dev@kicherer.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230118123019.3041303-2-dev@kicherer.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-02-03 07:30:10 -08:00
Frank Crawford b361a1cf62 hwmon: (it87) Group all related MODULE_PARM definitions together
Group the MODULE_PARM definitions together to make them easier for
future maintenance, rather than having them spread across the file.

Signed-off-by: Frank Crawford <frank@crawford.emu.id.au>
Link: https://lore.kernel.org/r/20230121085754.1693336-2-frank@crawford.emu.id.au
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-02-03 07:30:10 -08:00
Krzysztof Kozlowski 08be423352 dt-bindings: hwmon: correct indentation and style in examples
Fix mixed indentation to 4-spaces, remove unnecessary suffix from
i2c node name and use lower-case hex.  No functional impact.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230118172237.349111-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-02-03 07:30:10 -08:00
Krzysztof Kozlowski 22f0fd208d dt-bindings: hwmon: adi,ltc2992: correct unit address in example
lower-case hex is expected for unit addresses:

  adi,ltc2992.example.dts:22.24-38.15: Warning (i2c_bus_reg): /example-0/i2c/ltc2992@6F: I2C bus unit address format error, expected "6f"

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230118172237.349111-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-02-03 07:30:10 -08:00
Armin Wolf c184f377a4 hwmon: (ftsteutates) Add support for fanX_fault attributes
The driver knows internally when a fan is not connected,
but does not export this knowledge to userspace. Use the
standard fanX_fault attributes to notify userspace if a
fan is not connected.

Tested on a Fujitsu DS3401-B1.

Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://lore.kernel.org/r/20230105225107.58308-4-W_Armin@gmx.de
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-02-03 07:30:10 -08:00
Armin Wolf 1c5759d8ce hwmon: (ftsteutates) Replace fanX_source with pwmX_auto_channels_temp
Replace the nonstandard fanX_source attributes with the standardized
pwmX_auto_channels_temp attributes and document the special behaviour
associated with those attributes.

Tested on a Fujitsu DS3401-B1.

Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://lore.kernel.org/r/20230105225107.58308-3-W_Armin@gmx.de
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-02-03 07:30:10 -08:00
Armin Wolf dea60ff028 hwmon: (ftsteutates) Convert to devm_hwmon_device_register_with_info()
Convert driver to use devm_hwmon_device_register_with_info()
to reduce module size by ~30%.

Tested on a Fujitsu DS3401-B1.

Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://lore.kernel.org/r/20230105225107.58308-2-W_Armin@gmx.de
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-02-03 07:30:10 -08:00
Frank Crawford ff9dedd2da hwmon: (it87) Set second Super-IO chip in configuration mode
On various Gigabyte AM4 boards (AB350, AX370), the second Super-IO chip
(IT8792E) needs to be in configuration mode before accessing the first
due to a bug in IT8792E which otherwise results in LPC bus access errors.
This needs to be done before accessing the first Super-IO chip since
the second chip may have been accessed prior to loading this driver.

The problem is also reported to affect IT8795E, which is used on X299
boards and has the same chip ID as IT8792E (0x8733). It also appears
to affect systems with IT8790E, which is used on some Z97X-Gaming boards
as well as Z87X-OC, and other more recent Gigabyte boards.

Signed-off-by: Frank Crawford <frank@crawford.emu.id.au>
Link: https://lore.kernel.org/r/20230104060926.619686-3-frank@crawford.emu.id.au
[groeck: Made description pass checkpatch]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-02-03 07:30:10 -08:00
Frank Crawford d47e377c7b hwmon: (it87) Allow calling __superio_enter outside muxed region
Allow for superio_enter to be called without requesting the muxed memory
region, in particular for initialisation of the second chipset, which must
be put into configuration mode, but without an associated call to leave
configuration mode.

Signed-off-by: Frank Crawford <frank@crawford.emu.id.au>
Link: https://lore.kernel.org/r/20230104060926.619686-2-frank@crawford.emu.id.au
[groeck: Clarified subject]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-02-03 07:30:10 -08:00
XU pengfei 554df454e2 hwmon: ibmpex: remove unnecessary (void*) conversions
Pointer variables of void * type do not require type cast.

Signed-off-by: XU pengfei <xupengfei@nfschina.com>
Link: https://lore.kernel.org/r/20230111043605.3726-1-xupengfei@nfschina.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-02-03 07:30:10 -08:00
Denis Pauk e2e09989cc hwmon: (nct6775) B650/B660/X670 ASUS boards support
Boards such as:
  "EX-B660M-V5 PRO D4",
  "PRIME B650-PLUS",
  "PRIME B650M-A",
  "PRIME B650M-A AX",
  "PRIME B650M-A II",
  "PRIME B650M-A WIFI",
  "PRIME B650M-A WIFI II",
  "PRIME B660M-A D4",
  "PRIME B660M-A WIFI D4",
  "PRIME X670-P",
  "PRIME X670-P WIFI",
  "PRIME X670E-PRO WIFI",
  "Pro B660M-C-D4",
  "ProArt B660-CREATOR D4",
  "ProArt X670E-CREATOR WIFI",
  "ROG CROSSHAIR X670E EXTREME",
  "ROG CROSSHAIR X670E GENE",
  "ROG CROSSHAIR X670E HERO",
  "ROG MAXIMUS XIII EXTREME GLACIAL",
  "ROG MAXIMUS Z690 EXTREME",
  "ROG MAXIMUS Z690 EXTREME GLACIAL",
  "ROG STRIX B650-A GAMING WIFI",
  "ROG STRIX B650E-E GAMING WIFI",
  "ROG STRIX B650E-F GAMING WIFI",
  "ROG STRIX B650E-I GAMING WIFI",
  "ROG STRIX B660-A GAMING WIFI D4",
  "ROG STRIX B660-F GAMING WIFI",
  "ROG STRIX B660-G GAMING WIFI",
  "ROG STRIX B660-I GAMING WIFI",
  "ROG STRIX X670E-A GAMING WIFI",
  "ROG STRIX X670E-E GAMING WIFI",
  "ROG STRIX X670E-F GAMING WIFI",
  "ROG STRIX X670E-I GAMING WIFI",
  "ROG STRIX Z590-A GAMING WIFI II",
  "ROG STRIX Z690-A GAMING WIFI D4",
  "TUF GAMING B650-PLUS",
  "TUF GAMING B650-PLUS WIFI",
  "TUF GAMING B650M-PLUS",
  "TUF GAMING B650M-PLUS WIFI",
  "TUF GAMING B660M-PLUS WIFI",
  "TUF GAMING X670E-PLUS",
  "TUF GAMING X670E-PLUS WIFI",
  "TUF GAMING Z590-PLUS WIFI",
have got a NCT6799D chip, but by default there's no use of it
because of resource conflict with WMI method.

This commit adds such boards to the monitoring list with new ACPI device
UID.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=204807
Signed-off-by: Denis Pauk <pauk.denis@gmail.com>
Co-developed-by: Ahmad Khalifa <ahmad@khalifa.ws>
Signed-off-by: Ahmad Khalifa <ahmad@khalifa.ws>
Tested-by: Jeroen Beerstra <jeroen@beerstra.org>
Tested-by: Slawomir Stepien <sst@poczta.fm>
Link: https://lore.kernel.org/r/20230111212241.7456-2-pauk.denis@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-02-03 07:30:10 -08:00
Denis Pauk c3b3747d02 hwmon: (nct6775) Directly call ASUS ACPI WMI method
New ASUS B650/B660/X670 boards firmware have not exposed WMI monitoring
GUID  and entrypoint method WMBD could be implemented for different device
UID.

Implement the direct call to entrypoint method for monitoring the device
UID of B550/X570 boards.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=204807
Signed-off-by: Denis Pauk <pauk.denis@gmail.com>
Co-developed-by: Ahmad Khalifa <ahmad@khalifa.ws>
Signed-off-by: Ahmad Khalifa <ahmad@khalifa.ws>
Link: https://lore.kernel.org/r/20230111212241.7456-1-pauk.denis@gmail.com
[groeck: Fix multi-line formatting]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-02-03 07:30:10 -08:00
Randy Dunlap 0be688d042 hwmon: (hih6130) fix kernel-doc warnings
Use the correct function name in kernel-doc comments to prevent these
warnings:

drivers/hwmon/hih6130.c:164: warning: expecting prototype for hih6130_show_temperature(). Prototype was for hih6130_temperature_show() instead
drivers/hwmon/hih6130.c:185: warning: expecting prototype for hih6130_show_humidity(). Prototype was for hih6130_humidity_show() instead

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Jean Delvare <jdelvare@suse.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: linux-hwmon@vger.kernel.org
Link: https://lore.kernel.org/r/20230113064549.21289-1-rdunlap@infradead.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-02-03 07:30:10 -08:00
Randy Dunlap ffdb3ba034 hwmon: (sht15,sht21) fix kernel-doc warnings
Use the correct function names in kernel-doc comments to prevent these
warnings:

drivers/hwmon/sht15.c:682: warning: expecting prototype for sht15_show_status(). Prototype was for sht15_status_show() instead
drivers/hwmon/sht15.c:705: warning: expecting prototype for sht15_store_heater(). Prototype was for sht15_status_store() instead
drivers/hwmon/sht15.c:738: warning: expecting prototype for sht15_show_temp(). Prototype was for sht15_temp_show() instead
drivers/hwmon/sht15.c:760: warning: expecting prototype for sht15_show_humidity(). Prototype was for sht15_humidity_show() instead
drivers/hwmon/sht21.c:128: warning: expecting prototype for sht21_show_temperature(). Prototype was for sht21_temperature_show() instead
drivers/hwmon/sht21.c:149: warning: expecting prototype for sht21_show_humidity(). Prototype was for sht21_humidity_show() instead

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Jean Delvare <jdelvare@suse.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: linux-hwmon@vger.kernel.org
Link: https://lore.kernel.org/r/20230113064556.21685-1-rdunlap@infradead.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-02-03 07:30:10 -08:00
Randy Dunlap e11037a5e1 hwmon: (emc2305) fix kernel-doc warnings
Fix kernel-doc warnings:
drivers/hwmon/emc2305.c:62: warning: Cannot understand  * @cdev: cooling device;
 on line 62 - I thought it was a doc line
drivers/hwmon/emc2305.c:89: warning: Cannot understand  * @client: i2c client;
 on line 89 - I thought it was a doc line

and drop ';' at end of each struct member line.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Jean Delvare <jdelvare@suse.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: linux-hwmon@vger.kernel.org
Link: https://lore.kernel.org/r/20230113064540.20179-1-rdunlap@infradead.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-02-03 07:30:09 -08:00
Nick Hawkins d5f80ff774 MAINTAINERS: add gxp fan controller and documents
Add the gxp-fan-ctrl.c and gxp-fan-ctrl.rst in hwmon
driver/documentation.

Signed-off-by: Nick Hawkins <nick.hawkins@hpe.com>
Reviewed-by: Guenter Roek <linux@roek-us.net>
Link: https://lore.kernel.org/r/20230103203654.59322-6-nick.hawkins@hpe.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-02-03 07:30:09 -08:00
Nick Hawkins 547e9d942f dt-bindings: hwmon: Add hpe,gxp-fan-ctrl
Create documentation for the binding to support control of the fans on
HPE platforms.

Signed-off-by: Nick Hawkins <nick.hawkins@hpe.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20230103203654.59322-3-nick.hawkins@hpe.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-02-03 07:30:09 -08:00
Nick Hawkins 90905f7c40 hwmon: (gxp-fan-ctrl) Add GXP fan controller
The GXP SoC can support up to 16 fans through the interface provided by
the CPLD. The current support is limited to 8 fans. The fans speeds are
controlled via 8 different PWMs which can vary in value from  0-255. The
fans are also capable of reporting if they have failed to the CPLD which
in turn reports the status to the GXP SoC.

Signed-off-by: Nick Hawkins <nick.hawkins@hpe.com>
Link: https://lore.kernel.org/r/20230103203654.59322-2-nick.hawkins@hpe.com
[groeck: Improved alignment of defined, added missing include linux/bits.h]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-02-03 07:30:09 -08:00
Robin Murphy 6d03bbff45 hwmon: (coretemp) Simplify platform device handling
Coretemp's platform driver is unconventional. All the real work is done
globally by the initcall and CPU hotplug notifiers, while the "driver"
effectively just wraps an allocation and the registration of the hwmon
interface in a long-winded round-trip through the driver core.  The whole
logic of dynamically creating and destroying platform devices to bring
the interfaces up and down is error prone, since it assumes
platform_device_add() will synchronously bind the driver and set drvdata
before it returns, thus results in a NULL dereference if drivers_autoprobe
is turned off for the platform bus. Furthermore, the unusual approach of
doing that from within a CPU hotplug notifier, already commented in the
code that it deadlocks suspend, also causes lockdep issues for other
drivers or subsystems which may want to legitimately register a CPU
hotplug notifier from a platform bus notifier.

All of these issues can be solved by ripping this unusual behaviour out
completely, simply tying the platform devices to the lifetime of the
module itself, and directly managing the hwmon interfaces from the
hotplug notifiers. There is a slight user-visible change in that
/sys/bus/platform/drivers/coretemp will no longer appear, and
/sys/devices/platform/coretemp.n will remain present if package n is
hotplugged off, but hwmon users should really only be looking for the
presence of the hwmon interfaces, whose behaviour remains unchanged.

Link: https://lore.kernel.org/lkml/20220922101036.87457-1-janusz.krzysztofik@linux.intel.com/
Link: https://gitlab.freedesktop.org/drm/intel/issues/6641
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
Link: https://lore.kernel.org/r/20230103114620.15319-1-janusz.krzysztofik@linux.intel.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-02-03 07:30:09 -08:00
Aleksa Savic 3d2e9f582a hwmon: (aquacomputer_d5next) Add support for reading calculated Aquaero sensors
Add support for reading four calculated virtual temp sensors on the
Aquacomputer Aquaero. Values of these sensors are calculated on the
device itself based on what the user configured in the official software.
Configuring these sensors is not currently reverse engineered.

Signed-off-by: Aleksa Savic <savicaleksa83@gmail.com>
Link: https://lore.kernel.org/r/20230101190056.1357124-1-savicaleksa83@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-02-03 07:30:09 -08:00
Yang Li 4b8e5a9326 hwmon: (aht10) Fix some kernel-doc comments
Make the description of @aht10_data to @data in aht10_read_values()
and remove @client in aht10_init() to clear the below warnings:

drivers/hwmon/aht10.c:87: warning: Excess function parameter 'client' description in 'aht10_init'
drivers/hwmon/aht10.c:131: warning: Function parameter or member 'data' not described in 'aht10_read_values'
drivers/hwmon/aht10.c:131: warning: Excess function parameter 'aht10_data' description in 'aht10_read_values'

Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3543
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Link: https://lore.kernel.org/r/20221223081056.88345-1-yang.lee@linux.alibaba.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-02-03 07:30:09 -08:00
Armin Wolf e1515a7492 hwmon: (ftsteutates) Use devm_watchdog_register_device()
Use devm_watchdog_register_device() to let devres take care
of unregistering the watchdog at device removal. Remove the
now pointless fts_remove() function.

Tested on a Fujitsu DS3401-B1.

Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://lore.kernel.org/r/20221224041855.83981-4-W_Armin@gmx.de
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-02-03 07:30:09 -08:00
Derek J. Clark ebd4bfee2b hwmon: (oxp-sensors) Add AYANEO AIR and AIR Pro
Add support for the AYANEO AIR and AYANEO AIR Pro models of handheld
devices. These devices use the same EC registers and logic as the One X
Player mini AMD. Previous AYANEO models are not supported as they use a
different EC and do not have the necessary fan speed write enable and
setting registers. The driver is tested on AYANEO AIR while AIR Pro model
EC functionality and DMI data were verified using command line tools by
another user.

Add:
- AYANEO AIR (AMD 5560U)
- AYANEO AIR Pro (AMD 5560U)
- AYANEO AIR Pro (AMD 5825U)

While at it, fix spelling error (appart -> apart).

Link: https://lore.kernel.org/r/20221229025609.147482-1-derekjohn.clark@gmail.com
Signed-off-by: Derek J. Clark <derekjohn.clark@gmail.com>
[groeck: Sanitize commit description]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-02-03 07:30:09 -08:00
Leonard Anderweit 2c55211104 hwmon: (aquacomputer_d5next) Support sensors for Aquacomputer Aquaero
Add support for reading sensors of the Aquacomputer Aquaero 5/6 fan
controllers. These fan controllers supports 4 fans, 8 physical
temperature sensors, 8 virtual temperature sensors and 2 flow sensors.
Temperature and flow sensor reading implemented by Aleksa Savic [1] [2]
[3].

[1] https://github.com/aleksamagicka/aquacomputer_d5next-hwmon/pull/31
[2] https://github.com/aleksamagicka/aquacomputer_d5next-hwmon/pull/51
[3] https://github.com/aleksamagicka/aquacomputer_d5next-hwmon/pull/55

Originally-from: Aleksa Savic <savicaleksa83@gmail.com>
Signed-off-by: Leonard Anderweit <leonard.anderweit@gmail.com>
Link: https://lore.kernel.org/r/20221218113131.3752-7-leonard.anderweit@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-02-03 07:30:09 -08:00
Leonard Anderweit 1ed5036b3b hwmon: (aquacomputer_d5next) Make fan sensor offsets u16
Make fan sensor offsets u16 as u8 is insufficient for upcoming devices.

Signed-off-by: Leonard Anderweit <leonard.anderweit@gmail.com>
Link: https://lore.kernel.org/r/20221218113131.3752-6-leonard.anderweit@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-02-03 07:30:09 -08:00
Leonard Anderweit ad2f0811fb hwmon: (aquacomputer_d5next) Device dependent serial number and firmware offsets
Add device dependent serial number and firmware offsets to support
devices with different offsets. All currently supported devices share
the same offsets. Implemented by Aleksa Savic [1].

[1] 14c3acf78b

Originally-from: Aleksa Savic <savicaleksa83@gmail.com>
Signed-off-by: Leonard Anderweit <leonard.anderweit@gmail.com>
Link: https://lore.kernel.org/r/20221218113131.3752-5-leonard.anderweit@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-02-03 07:30:09 -08:00
Leonard Anderweit 249c752110 hwmon: (aquacomputer_d5next) Add structure for fan layout
Introduce structure for per device fan sensor offsets. This allows
reading fan sensors in aqc_raw_event() from devices which use a
different sensor layout in their status HID report.  Currently only one
version is implemented as all supported devices use the same structure.

Signed-off-by: Leonard Anderweit <leonard.anderweit@gmail.com>
Link: https://lore.kernel.org/r/20221218113131.3752-4-leonard.anderweit@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-02-03 07:30:09 -08:00
Leonard Anderweit a2ba7ee25c hwmon: (aquacomputer_d5next) Restructure flow sensor reading
Read flow sensors the same way for all devices instead of in special
cases. Implemented by Aleksa Savic [1].

[1] 1c10912c5f

Originally-from: Aleksa Savic <savicaleksa83@gmail.com>
Signed-off-by: Leonard Anderweit <leonard.anderweit@gmail.com>
Link: https://lore.kernel.org/r/20221218113131.3752-3-leonard.anderweit@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-02-03 07:30:09 -08:00
Leonard Anderweit 8bcb02bdc6 hwmon: (aquacomputer_d5next) Rename AQC_TEMP_SENSOR_SIZE to AQC_SENSOR_SIZE
Rename AQC_TEMP_SENSOR_SIZE to AQC_SENSOR_SIZE to use with other sensor
types.

Signed-off-by: Leonard Anderweit <leonard.anderweit@gmail.com>
Link: https://lore.kernel.org/r/20221218113131.3752-2-leonard.anderweit@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-02-03 07:30:09 -08:00
Saravanan Sekar ca22c58277 MAINTAINERS: Update the entry for MPQ7932 PMIC driver
Update the MAINTAINERS file to include the path for the MPQ7932

Signed-off-by: Saravanan Sekar <saravanan@linumiz.com>
Link: https://lore.kernel.org/r/20221207173716.123223-5-saravanan@linumiz.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-02-03 07:30:09 -08:00
Saravanan Sekar 61d1eb025b hwmon: (pmbus/mpq7932) Add a support for mpq7932 Power Management IC
The MPQ7932 is a power management IC designed to operate from 5V buses to
power a variety of Advanced driver-assistance system SOCs. Six integrated
buck converters with hardware monitoring capability powers a variety of
target rails configurable over PMBus interface.

Signed-off-by: Saravanan Sekar <saravanan@linumiz.com>
Link: https://lore.kernel.org/r/20221207173716.123223-4-saravanan@linumiz.com
[groeck: Modified multi-line comments to match standard comment style]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-02-03 07:30:09 -08:00
Saravanan Sekar b52acefcf7 hwmon: (pmbus/core) Add min_uV in pmbus regulator helper macro
Some regulator operates in a range of voltage which should not allow
below the lower threshold.

Signed-off-by: Saravanan Sekar <saravanan@linumiz.com>
Link: https://lore.kernel.org/r/20221207173716.123223-2-saravanan@linumiz.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-02-03 07:30:09 -08:00
Nick Hawkins bc7fabde40 ABI: sysfs-class-hwmon: add a description for fanY_fault
Document existing fanY_fault attribute.

Signed-off-by: Nick Hawkins <nick.hawkins@hpe.com>
Link: https://lore.kernel.org/r/20221130200846.4226-3-nick.hawkins@hpe.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-02-03 07:30:09 -08:00
Marcelo Tosatti 0f8b916bc5 hwmon: (coretemp) avoid RDMSR interrupts to isolated CPUs
The coretemp driver uses rdmsr_on_cpu calls to read
MSR_IA32_PACKAGE_THERM_STATUS/MSR_IA32_THERM_STATUS registers,
which contain information about current core temperature.

For certain low latency applications, the RDMSR interruption exceeds
the applications requirements.

So do not create core files in sysfs, for CPUs which have
isolation and nohz_full enabled.

Temperature information from the housekeeping cores should be
sufficient to infer die temperature.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Link: https://lore.kernel.org/r/Y5zT6B1mY9/pnwJV@tpad
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-02-03 07:30:09 -08:00
Herman Fries e247510e1b hwmon: (nzxt-smart2) Add device id
Adding support for new device id
1e71:2019 NZXT NZXT RGB & Fan Controller

Signed-off-by: Herman Fries <baracoder@googlemail.com>
Link: https://lore.kernel.org/r/20221214194627.135692-1-baracoder@googlemail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-02-03 07:30:09 -08:00
Joaquín Ignacio Aramendía 95a56de6ed docs: hwmon: Use file modes explicitly
As stated in the mainling list[1] and by checkpatch output, the file modes
for is_visible_func should be returned explicitly. Change that in the
documentation to avoid confusion.

[1]https://lore.kernel.org/linux-hwmon/506a6e7f-4566-2dcf-37f3-0f41f4ce983b@roeck-us.net/

Signed-off-by: Joaquín Ignacio Aramendía <samsagax@gmail.com>
Link: https://lore.kernel.org/r/20221212141245.52935-1-samsagax@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-02-03 07:30:09 -08:00
Eugene Shalygin e2de0e6abd hwmon: (asus-ec-sensors) add missing mutex path
Add missing mutex path for ProArt X570-CREATOR WIFI.

Fixes: de8fbac5e5 (hwmon: (asus-ec-sensors) implement locking via the ACPI global lock)
Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com>
Link: https://lore.kernel.org/r/20230121111728.168514-2-eugene.shalygin@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-02-03 07:30:00 -08:00
Zev Weiss f00093608f hwmon: (peci/cputemp) Fix off-by-one in coretemp_label allocation
The find_last_bit() call produces the index of the highest-numbered
core in core_mask; because cores are numbered from zero, the number of
elements we need to allocate is one more than that.

Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Cc: stable@kernel.org # v5.18
Fixes: bf3608f338 ("hwmon: peci: Add cputemp driver")
Reviewed-by: Iwona Winiarska <iwona.winiarska@intel.com>
Link: https://lore.kernel.org/r/20230202021825.21486-1-zev@bewilderbeest.net
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-02-03 07:27:25 -08:00
Zev Weiss 2fbb848b65 hwmon: (nct6775) Fix incorrect parenthesization in nct6775_write_fan_div()
Commit 4ef2774511 ("hwmon: (nct6775) Convert register access to
regmap API") fumbled the shifting & masking of the fan_div values such
that odd-numbered fan divisors would always be set to zero.  Fix it so
that we actually OR in the bits we meant to.

Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Fixes: 4ef2774511 ("hwmon: (nct6775) Convert register access to regmap API")
Cc: stable@kernel.org # v5.19+
Link: https://lore.kernel.org/r/20230102212857.5670-1-zev@bewilderbeest.net
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-01-03 13:26:45 -08:00
Armin Wolf ca8fd8c16a hwmon: (ftsteutates) Fix scaling of measurements
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>
2023-01-03 13:26:45 -08:00