Fix voltage scaling for chips that have 10.9mV ADCs, where scaling was
not performed.
Fixes: ead8080351 ("hwmon: (it87) Add support for IT8732F")
Signed-off-by: Frank Crawford <frank@crawford.emu.id.au>
Link: https://lore.kernel.org/r/20230318080543.1226700-2-frank@crawford.emu.id.au
[groeck: Update subject and description to focus on bug fix]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Smatch reports:
drivers/hwmon/xgene-hwmon.c:757 xgene_hwmon_probe() warn:
'ctx->pcc_comm_addr' from ioremap() not released on line: 757.
This is because in drivers/hwmon/xgene-hwmon.c:701 xgene_hwmon_probe(),
ioremap and memremap is not released, which may cause a leak.
To fix this, ioremap and memremap is modified to devm_ioremap and
devm_memremap.
Signed-off-by: Tianyi Jing <jingfelix@hust.edu.cn>
Reviewed-by: Dongliang Mu <dzm91@hust.edu.cn>
Link: https://lore.kernel.org/r/20230318143851.2191625-1-jingfelix@hust.edu.cn
[groeck: Fixed formatting and subject]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
It is not sufficient to check of_node in current device.
In some cases, this would cause the sensor registration to fail.
This patch looks for device's ancestors to find a valid of_node if any.
Fixes: d560168b5d ("hwmon: (core) New hwmon registration API")
Signed-off-by: Phinex Hung <phinex@realtek.com>
Link: https://lore.kernel.org/r/20230321060224.3819-1-phinex@realtek.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
The ltc2992 drivers uses a mutex and I2C bus access in its GPIO chip `set`
and `get` implementation. This means these functions can sleep and the GPIO
chip should set the `can_sleep` property to true.
This will ensure that a warning is printed when trying to set or get the
GPIO value from a context that potentially can't sleep.
Fixes: 9ca26df1ba ("hwmon: (ltc2992) Add support for GPIOs.")
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Link: https://lore.kernel.org/r/20230314093146.2443845-2-lars@metafoo.de
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
The adm1266 driver uses I2C bus access in its GPIO chip `set` and `get`
implementation. This means these functions can sleep and the GPIO chip
should set the `can_sleep` property to true.
This will ensure that a warning is printed when trying to set or get the
GPIO value from a context that potentially can't sleep.
Fixes: d98dfad35c ("hwmon: (pmbus/adm1266) Add support for GPIOs")
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Link: https://lore.kernel.org/r/20230314093146.2443845-1-lars@metafoo.de
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
The driver will match mostly by DT table (even thought there is regular
ID table) so there is little benefit in of_match_ptr (this also allows
ACPI matching via PRP0001, even though it might not be relevant here).
This also fixes !CONFIG_OF error:
drivers/hwmon/tmp513.c:610:34: error: ‘tmp51x_of_match’ defined but not used [-Werror=unused-const-variable=]
Fixes: 59dfa75e5d ("hwmon: Add driver for Texas Instruments TMP512/513 sensor chips.")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230312193723.478032-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
When probing the ucd90320 access to some of the registers randomly fails.
Sometimes it NACKs a transfer, sometimes it returns just random data and
the PEC check fails.
Experimentation shows that this seems to be triggered by a register access
directly back to back with a previous register write. Experimentation also
shows that inserting a small delay after register writes makes the issue go
away.
Use a similar solution to what the max15301 driver does to solve the same
problem. Create a custom set of bus read and write functions that make sure
that the delay is added.
Fixes: a470f11c5b ("hwmon: (pmbus/ucd9000) Add support for UCD90320 Power Sequencer")
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Link: https://lore.kernel.org/r/20230312160312.2227405-1-lars@metafoo.de
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
In xgene_hwmon_probe, &ctx->workq is bound with xgene_hwmon_evt_work.
Then it will be started.
If we remove the driver which will call xgene_hwmon_remove to clean up,
there may be unfinished work.
The possible sequence is as follows:
Fix it by finishing the work before cleanup in xgene_hwmon_remove.
CPU0 CPU1
|xgene_hwmon_evt_work
xgene_hwmon_remove |
kfifo_free(&ctx->async_msg_fifo);|
|
|kfifo_out_spinlocked
|//use &ctx->async_msg_fifo
Fixes: 2ca492e22c ("hwmon: (xgene) Fix crash when alarm occurs before driver probe")
Signed-off-by: Zheng Wang <zyytlz.wz@163.com>
Link: https://lore.kernel.org/r/20230310084007.1403388-1-zyytlz.wz@163.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
The wrong bits are masked in the hysteresis register; indices 0 and 2
should zero bits [7:4] and preserve bits [3:0], and index 1 should zero
bits [3:0] and preserve bits [7:4].
Fixes: 1c301fc539 ("hwmon: Add a driver for the ADT7475 hardware monitoring chip")
Signed-off-by: Tony O'Brien <tony.obrien@alliedtelesis.co.nz>
Link: https://lore.kernel.org/r/20230222005228.158661-3-tony.obrien@alliedtelesis.co.nz
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Throughout the ADT7475 driver, attributes relating to the temperature
sensors are displayed in the order Remote 1, Local, Remote 2. Make
temp_st_show() conform to this expectation so that values set by
temp_st_store() can be displayed using the correct attribute.
Fixes: 8f05bcc33e ("hwmon: (adt7475) temperature smoothing")
Signed-off-by: Tony O'Brien <tony.obrien@alliedtelesis.co.nz>
Link: https://lore.kernel.org/r/20230222005228.158661-2-tony.obrien@alliedtelesis.co.nz
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
- Change MFD support status from Supported to Maintained
- New Drivers
- Add support for the Intel Platform Management Component Interface (PMCI)
- Remove Drivers
- HTC PASIC3 LED/DS1WM
- Toshiba T7L66XB, TC6387XB and TC6393XB TMIO
- New Device Support
- Add support for N6000 Flash to Intel M10 BMC PMCI
- Add support for Lenovo Yoga Tab 3 to Intel CHTWC PMIC
- New Functionality
- Provide Reset support to Syscon
- Fix-ups
- Explicitly provide missing include files
- Pass platform type data/info via the SPI/I2C/DT registration strategy
- Lots of DT documentation / adaptions
- Replace scnprintf() with preferred sysfs_emit()
- Remove unused / superfluous code
- Fix some trivial whitesspace / spelling / grammatical issues
- Replace pm_power_off with new and improved register_sys_off_handler() API
- Bug Fixes
- Reintroduce RK808-clkout registration - fixing Wi-Fi and Bluetooth
- Repair the order of AXPxxx IRQ PEK RISE/FALL definitions
- Refuse to build CS5535 on unsupported UML architectures
- Fix memory leaks in error return paths
- Prevent refcount leaks in error return paths
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAmP3KQ8ACgkQUa+KL4f8
d2FAFw//deQpWVTX8CBdgHtCTxkLymussYgvnlJwJhoD8RYpTyFme9drVSBX9Msi
C3rRX3RQCu114xUVMt5JIVTZbbbx2zjDI9HGSmh3lOIW0vh9/oW6/bUO/PFw6/C3
v4AkzMYIwE9O4g9DbM9WWR/uickYyKobS8VXMupyWYnVbF361UOCFChCMrm+3Kl1
S+grj1/fKxiCJxF/L+Iij06PQtCGGZBxN2JNqsTHj7IyUjA2JZyvXvV3pJ/MtIQv
w+hb+xYK13uCG4JUI6xOHkJU7/gNCwpsz1TJoR7CuXl6JBIP/oVIw9fJ4N1eZ1Zr
ioBEBIrEmKF1Hihd8iP5prE1BV5WvE6s9hqTdqn3qJPaH9+Rp8sExuDcq6gzE7Lc
c5eVhA0uSXQM62pz4rqwkfzPX8BFMvZ1Ii9ukyWaAb1Lyz2f5tFu5E2gd6vjXVVP
yId3H43eQVrutlZAbP+txhN7VDSf/OunUrOEDw9VbLe2sB/rBta2De0tFfpE5lAg
McOfyNvclqwTXuakNB0sg2Sg3DhxMTKQhnQQAj7E/DmcYVhQTFQPVj69BtERIldf
9VHsAg3Kp93A/w5/J/3HOqMexHWpZ6eiW05Xu1zwGtWhx70c1YWMmMhMJk1zf/T+
G8Drk+fuhsycsGu/7MkY+NuqIqIM3JVb4Hqa/HYN+L/iPJXLAxI=
=f0fr
-----END PGP SIGNATURE-----
Merge tag 'mfd-next-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd
Pull MFD updates from Lee Jones:
"Core Framework:
- Change MFD support status from Supported to Maintained
New Drivers:
- Add support for the Intel Platform Management Component Interface
(PMCI)
Removed Drivers:
- HTC PASIC3 LED/DS1WM
- Toshiba T7L66XB, TC6387XB and TC6393XB TMIO
New Device Support:
- Add support for N6000 Flash to Intel M10 BMC PMCI
- Add support for Lenovo Yoga Tab 3 to Intel CHTWC PMIC
New Functionality:
- Provide Reset support to Syscon
Fix-ups:
- Explicitly provide missing include files
- Pass platform type data/info via the SPI/I2C/DT registration
strategy
- Lots of DT documentation / adaptions
- Replace scnprintf() with preferred sysfs_emit()
- Remove unused / superfluous code
- Fix some trivial whitesspace / spelling / grammatical issues
- Replace pm_power_off with new and improved
register_sys_off_handler() API
Bug Fixes:
- Reintroduce RK808-clkout registration - fixing Wi-Fi and Bluetooth
- Repair the order of AXPxxx IRQ PEK RISE/FALL definitions
- Refuse to build CS5535 on unsupported UML architectures
- Fix memory leaks in error return paths
- Prevent refcount leaks in error return paths"
* tag 'mfd-next-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (40 commits)
dt-bindings: mfd: qcom,tcsr: Add compatible for IPQ5332
dt-bindings: mfd: Add NXP BBNSM
mfd: ntxec: Add version number for EC in Tolino Vision
dt-bindings: mfd: syscon: Add mt8365-syscfg
mfd: Remove toshiba tmio drivers
mfd: arizona: Use pm_runtime_resume_and_get() to prevent refcnt leak
mfd: syscon: Allow reset control for syscon devices
dt-bindings: mfd/syscon: Add resets property
dt-bindings: mfd: syscon: Add amd,pensando-elba-syscon compatible
dt-bindings: mfd: qcom,tcsr: Add compatible for MSM8226
mfd: simple-mfd-i2c: Fix incoherent comment regarding DT registration
mfd: axp20x: Switch to the sys-off handler API
mfd: core: Spelling s/compement/complement/
mfd: max8925: Remove the unused function irq_to_max8925()
mfd: qcom-pm8xxx: Remove set but unused variable 'rev'
dt-bindings: mfd: syscon: Document GXP register compatible
mfd: twl4030-power: Drop empty platform remove function
mfd: twl: Fix TWL6032 phy vbus detection
mfd: pcf50633-adc: Fix potential memleak in pcf50633_adc_async_read()
MAINTAINERS: Move MFD from a Supported to Maintaied state
...
Updates to the usual drivers (ufs, lpfc, qla2xxx, libsas). The major
core change is a rework to remove the two helpers around
scsi_execute_cmd and use it as the only submission interface along
with other minor fixes and updates.
Signed-off-by: James E.J. Bottomley <jejb@linux.ibm.com>
-----BEGIN PGP SIGNATURE-----
iJwEABMIAEQWIQTnYEDbdso9F2cI+arnQslM7pishQUCY/Z7BSYcamFtZXMuYm90
dG9tbGV5QGhhbnNlbnBhcnRuZXJzaGlwLmNvbQAKCRDnQslM7pishfF9AP9HzZaZ
0XumuxjchcJHRntcIAzb9kE62SSWFxBrgZQCtAEAyhAO1zK284esgCa+arkzEC7p
uhxpufQSGnYvbasStsU=
=VsH1
-----END PGP SIGNATURE-----
Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI updates from James Bottomley:
"Updates to the usual drivers (ufs, lpfc, qla2xxx, libsas).
The major core change is a rework to remove the two helpers around
scsi_execute_cmd and use it as the only submission interface along
with other minor fixes and updates"
* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (142 commits)
scsi: ufs: core: Fix an error handling path in ufshcd_read_desc_param()
scsi: ufs: core: Fix device management cmd timeout flow
scsi: aic94xx: Add missing check for dma_map_single()
scsi: smartpqi: Replace one-element array with flexible-array member
scsi: mpt3sas: Fix a memory leak
scsi: qla2xxx: Remove the unused variable wwn
scsi: ufs: core: Fix kernel-doc syntax
scsi: ufs: core: Add hibernation callbacks
scsi: snic: Fix memory leak with using debugfs_lookup()
scsi: ufs: core: Limit DMA alignment check
scsi: Documentation: Correct spelling
scsi: Documentation: Correct spelling
scsi: target: Documentation: Correct spelling
scsi: aacraid: Allocate cmd_priv with scsicmd
scsi: ufs: qcom: dt-bindings: Add SM8550 compatible string
scsi: ufs: ufs-qcom: Clear qunipro_g4_sel for HW version major 5
scsi: ufs: qcom: fix platform_msi_domain_free_irqs() reference
scsi: ufs: core: Enable DMA clustering
scsi: ufs: exynos: Fix the maximum segment size
scsi: ufs: exynos: Fix DMA alignment for PAGE_SIZE != 4096
...
- New drivers
* Infineon TDA38640 Voltage Regulator
* NXP MC34VR500 PMIC
* GXP fan controller
* MPQ7932 Power Management IC
- New chip or board support added to existing drivers
* it87: IT87952E; also other cleanup/improvements
* intel-m10-bmc-hwmon: N6000
* pmbus/max16601: MAX16600
* aquacomputer_d5next: Aquacomputer Aquastream Ultimate, Aquacomputer Poweradjust 3,
Aquacomputer Aquaero
* nct6775: Support for B650/B660/X670 ASUS boards
* oxp-sensors: AYANEO AIR and AIR Pro
- Other notable changes
* Various kernel documentation fixes
* Various devicetree bindings fixes
* Explicitly deprecated [devm_]hwmon_device_register_with_groups
* ftsteutates: Support for fanX_fault and other cleanup
* ltc2945: Support for setting shunt resistor and other cleanup/fixes
* coretemp: Avoid RDMSR interrupts to isolated CPUs,
and simplify platform device handling
- Vaious other minoc cleanups and fixes
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEEiHPvMQj9QTOCiqgVyx8mb86fmYEFAmP09dcACgkQyx8mb86f
mYGXqxAArB9RNWemn18582Fg49ME9wkRDT+ZFPMKDSupjOgW+EXZZi86FPfIzl/c
PO9g4E/I3PZBgJddc16F2JPmg10JZlExQ+iOwCWQrviAEoBdxjBGoXWC5JhcnU6O
VCsn2nCsBwBcbBk2wqVuksvsRQIvRX/BeiTE0xw6yIQgGqEava7au2Av3W0NEX0+
ItPNQ9vqzp4ikufeY6Y2FoGM0PfVWSIulqDZoDhhqTdSDI4VnAcOdiies9Z4oaG2
pN+AwO+iNqQcbUiZyhUJz39j6+ywkhSxZJOsprsG6KA0shFwaR0N/3vCqZAxo8so
KaKJCGM6mkUqOBfmAeX6/kj1DuSvkR6+WixABbmk15AJIIoFHCeG9kTEHwTj7Ovk
vZ3rpZFCpTtCtlTCbMFFe/EW7ssbkucOJVtpaqWBtC7X/+rZO2LGMXQSA9tJW9N1
qGKbbxlwsxnVc1rIb7FM5QdoxMhbv+h4N7fJ/M6WDHg35xiEfugI9R9KvMv0P5+A
Z4CvIjeeUm8XjET1+3pKhpScXdVGdueuRO2SZ/NSAb7x4zdB/GPX4NELASWHvxXl
rFrfe7tvEtkIDAONeqYrA9wBCaH0YfqJHyTBz9UqQegp+3nA7mA+4PxVpAA6ntUq
0CuzS4NGxFVX7bPy3ONCQ+kViCQ76nXG2F4/TLL8lmwRZqkaTOM=
=yXoY
-----END PGP SIGNATURE-----
Merge tag 'hwmon-for-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
Pull hwmon updates from Guenter Roeck:
"New drivers:
- Infineon TDA38640 Voltage Regulator
- NXP MC34VR500 PMIC
- GXP fan controller
- MPQ7932 Power Management IC
New chip or board support added to existing drivers:
- it87: IT87952E; also other cleanup/improvements
- intel-m10-bmc-hwmon: N6000
- pmbus/max16601: MAX16600
- aquacomputer_d5next: Aquacomputer Aquastream Ultimate, Aquacomputer
Poweradjust 3, Aquacomputer Aquaero
- nct6775: Support for B650/B660/X670 ASUS boards
- oxp-sensors: AYANEO AIR and AIR Pro
Other notable changes:
- Various kernel documentation fixes
- Various devicetree bindings fixes
- Explicitly deprecated [devm_]hwmon_device_register_with_groups
- ftsteutates: Support for fanX_fault and other cleanup
- ltc2945: Support for setting shunt resistor and other cleanup/fixes
- coretemp: Avoid RDMSR interrupts to isolated CPUs, and simplify
platform device handling
... and various other minor cleanups and fixes"
* tag 'hwmon-for-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (66 commits)
hwmon: Deprecate [devm_]hwmon_device_register_with_groups
hwmon: (mlxreg-fan) Return zero speed for broken fan
hwmon: (gxp-fan-ctrl) use devm_platform_get_and_ioremap_resource()
hwmon: (aquacomputer_d5next) Add support for Aquacomputer Aquastream Ultimate
hwmon: (aquacomputer_d5next) Add support for Aquacomputer Poweradjust 3
hwmon: (iio_hwmon) use dev_err_probe
hwmon: intel-m10-bmc-hwmon: Add N6000 sensors
Docs/hwmon/index: Add missing SPDX License Identifier
hwmon: (it87) Updated documentation for recent updates to it87
hwmon: (it87) Add new chipset IT87952E
hwmon: (it87) Allow multiple chip IDs for force_id
hwmon: (it87) Add chip_id in some info message
hwmon: (it87) List full chip model name
hwmon: (it87) Disable configuration exit for certain chips
hwmon: (it87) Allow disabling exiting of configuration mode
Documentation: hwmon: correct spelling
hwmon: (pmbus/max16601) Add support for MAX16600
hwmon: (ltc2945) Allow setting shunt resistor
hwmon: (ltc2945) Handle error case in ltc2945_value_store
hwmon: (ltc2945) Add devicetree match table
...
Currently for broken fan driver returns value calculated based on error
code (0xFF) in related fan speed register.
Thus, for such fan user gets fan{n}_fault to 1 and fan{n}_input with
misleading value.
Add check for fan fault prior return speed value and return zero if
fault is detected.
Fixes: 65afb4c8e7 ("hwmon: (mlxreg-fan) Add support for Mellanox FAN driver")
Signed-off-by: Vadim Pasternak <vadimp@nvidia.com>
Link: https://lore.kernel.org/r/20230212145730.24247-1-vadimp@nvidia.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.
Signed-off-by: Ye Xingchen <ye.xingchen@zte.com.cn>
Link: https://lore.kernel.org/r/202302081546067270324@zte.com.cn
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Extend aquacomputer_d5next driver to expose various hardware sensors of the
Aquacomputer Aquastream Ultimate watercooling pump, which communicates
through a proprietary USB HID protocol.
Coolant temp and external temp sensor readings are available, along with
speed, power, voltage and current of both the pump and optionally connected
fan. It also exposes pressure and flow speed readings.
Additionally, serial number and firmware version are exposed through
debugfs.
Tested by a user on Github [1].
[1] https://github.com/aleksamagicka/aquacomputer_d5next-hwmon/issues/50
Signed-off-by: Aleksa Savic <savicaleksa83@gmail.com>
Link: https://lore.kernel.org/r/20230203120324.579808-1-savicaleksa83@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Extend aquacomputer_d5next driver to expose the temp sensor of the
Aquacomputer Poweradjust 3 fan controller, which communicates
through a proprietary USB HID protocol.
The Poweradjust 3 is not currently known to expose firmware version
and serial number, so don't create debugfs entries if their values
can't be retrieved.
Tested by a user on Github [1].
[1] https://github.com/aleksamagicka/aquacomputer_d5next-hwmon/issues/57
Signed-off-by: Aleksa Savic <savicaleksa83@gmail.com>
Link: https://lore.kernel.org/r/20230131101210.8095-1-savicaleksa83@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Instead of just returning an error code, add an error message as well.
While at it, simplify the code and use a common return path.
Upon deferral this also nicely lists the following message in
/sys/kernel/debug/devices_deferred:
adc iio_hwmon: Failed to get channels
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Link: https://lore.kernel.org/r/20230131103359.625081-1-alexander.stein@ew.tq-group.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Add IT87952E, a new chip ID (DEV ID 0x8695), which appears to be an
updated version of the IT8792E and takes the same configuration.
The model name comes from the model name printed on the chip.
There is no datasheet publicly available.
Signed-off-by: Frank Crawford <frank@crawford.emu.id.au>
Link: https://lore.kernel.org/r/20230128060308.1549707-7-frank@crawford.emu.id.au
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Extend the force_id module parameter to allow specifying one or both
chip IDs separately. If only a single parameter is given it defaults
to using that value for all chips, similar to previous usage.
Signed-off-by: Frank Crawford <frank@crawford.emu.id.au>
Link: https://lore.kernel.org/r/20230128060308.1549707-6-frank@crawford.emu.id.au
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
ITE model names do not always match the chip ID.
Convert from just adding a suffix to specifying the full model name.
Signed-off-by: Frank Crawford <frank@crawford.emu.id.au>
Link: https://lore.kernel.org/r/20230128060308.1549707-4-frank@crawford.emu.id.au
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
IT8790E and IT8792E/IT8795E have been identified as chips that can have
issues when disabling configuration mode.
Set to never exit configuration mode.
Signed-off-by: Frank Crawford <frank@crawford.emu.id.au>
Link: https://lore.kernel.org/r/20230128060308.1549707-3-frank@crawford.emu.id.au
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Disabling configuration mode on some chips can result in system
hang-ups and access failures to the Super-IO chip at the
second SIO address. Never exit configuration mode on these
chips to avoid the problem.
This patch should be applied in conjunction with a previous one to
initialise the second chip for certain mother boards.
Signed-off-by: Frank Crawford <frank@crawford.emu.id.au>
Link: https://lore.kernel.org/r/20230128060308.1549707-2-frank@crawford.emu.id.au
[groeck: Change feature bit from 28 to 19 to be continuous]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>