Commit graph

5161 commits

Author SHA1 Message Date
Uwe Kleine-König
90fc660e84 hwmon: max31827: Switch back to use struct i2c_driver::probe
struct i2c_driver::probe_new is about to go away. Switch the driver to
use the probe callback with the same prototype.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230626085145.554616-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-06-26 06:45:54 -07:00
Jerrod Frost
4dbbaf8fbd hwmon: (oxp-sensors) Add support for AOKZOE A1 PRO
This device is an iteration over the AOKZOE A1 with the same EC mapping
and features.

It also has support for tt_toggle.

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

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

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

Signed-off-by: Wilken Gottwalt <wilken.gottwalt@posteo.net>
Link: https://lore.kernel.org/r/ZJSASByXpzoZ0XyH@monster.localdomain
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-06-22 10:42:39 -07:00
Guenter Roeck
dd5219ce4f hwmon: (pmbus/adm1275) Disable ADC while updating PMON_CONFIG
According to ADI, changing PMON_CONFIG while the ADC is running can have
unexpected results. ADI recommends halting the ADC with PMON_CONTROL
before setting PMON_CONFIG and then resume after. Follow ADI
recommendation and disable ADC while PMON_CONFIG is updated.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20230614163605.3688964-3-linux@roeck-us.net
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-06-22 10:39:58 -07:00
Guenter Roeck
98ac8af4e7 hwmon: (pmbus/adm1275) Prepare for protected write to PMON_CONFIG
According to ADI, changing PMON_CONFIG while ADC is running can have
unexpected results. ADI recommends halting the ADC with PMON_CONTROL
before setting PMON_CONFIG and then resume after.

To prepare for this change, rename adm1275_read_pmon_config()
and adm1275_write_pmon_config() to adm1275_read_samples() and
adm1275_write_samples() to more accurately reflect the functionality
of the code. Introduce new function adm1275_write_pmon_config()
and use it for all code writing into the PMON_CONFIG register.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20230614163605.3688964-2-linux@roeck-us.net
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-06-22 10:39:41 -07:00
Joaquín Ignacio Aramendía
37f665ffa8 hwmon: (oxp-sensors) Simplify logic of error return
Take return logic on error out of if-else, eliminating
duplicated code in tt_togle_store() function.

Signed-off-by: Joaquín Ignacio Aramendía <samsagax@gmail.com>
Link: https://lore.kernel.org/r/20230617181159.32844-3-samsagax@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-06-18 08:54:31 -07:00
Joaquín Ignacio Aramendía
d7696214b0 hwmon: (oxp-sensors) Remove unused header
We are not using <dev_printk.h>, remove that.

Signed-off-by: Joaquín Ignacio Aramendía <samsagax@gmail.com>
Link: https://lore.kernel.org/r/20230617181159.32844-2-samsagax@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-06-18 08:53:52 -07:00
Guenter Roeck
aee395bb19 hwmon: (nct6755) Add support for NCT6799D
NCT6799D is mostly compatible to NCT6798D, with minor variations.

Note that NCT6798D and NCT6799D have a new means to select temperature
sources, and to report temperatures from those sources. This is not
currently implemented, meaning that most likely not all temperatures
are reported.

Cc: Sebastian Arnhold <sebastian.arnhold@posteo.de>
Cc: Ahmad Khalifa <ahmad@khalifa.ws>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Sebastian Arnhold <sebastian.arnhold@posteo.de>
Tested-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Link: https://lore.kernel.org/r/20221228135744.281752-1-linux@roeck-us.net
2023-06-17 20:50:30 -07:00
Joaquín Ignacio Aramendía
be144ee491 hwmon: (oxp-sensors) Add tt_toggle attribute on supported boards
OneXPlayer boards from the last generation (both for OneXPlayer and AOK
ZOE brands) have a toggle in the EC to switch the "Turbo/Silent" button
into a different keyboard event.

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

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

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

Signed-off-by: Joaquín Ignacio Aramendía <samsagax@gmail.com>
Link: https://lore.kernel.org/r/20230611143332.40590-2-samsagax@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-06-17 20:49:18 -07:00
JuenKit Yip
fbb5a7fee0 hwmon: (sht3x) complement sysfs interface for sts3x
Compared to sht3x, sts3x has the similar functions and operations
but it has no humidity sensor.

Signed-off-by: JuenKit Yip <JuenKit_Yip@hotmail.com>
Link: https://lore.kernel.org/r/DB4PR10MB6261B912ADFA6BB78240596F9258A@DB4PR10MB6261.EURPRD10.PROD.OUTLOOK.COM
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-06-17 09:14:55 -07:00
JuenKit Yip
af5ab55012 hwmon: (sht3x) Add new non-stardard sysfs attribute
Add "repeatability" attribute to sysfs, it could be
read or written to control the sensor.

Signed-off-by: JuenKit Yip <JuenKit_Yip@hotmail.com>
Link: https://lore.kernel.org/r/DB4PR10MB6261B507C7656E3568DA33E39258A@DB4PR10MB6261.EURPRD10.PROD.OUTLOOK.COM
[groeck: Fixed multi-line alignment; dropped check of unsigned against < 0]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-06-17 09:14:39 -07:00
JuenKit Yip
3d2c211c0d hwmon: (sht3x) add medium repeatability support
Add support for medium repeatability.

Per datasheet:

The stated repeatability is 3 times the standard deviation (3σ)
of multiple consecutive measurements at the stated repeatability
and at constant ambient conditions. It is a measure for the noise
on the physical sensor output. Different measurement modes allow
for high/medium/low repeatability.

For the humidity sensor, repeatability is documented as
0.25% RH for low repeatability, 0.15% RH for medium repeatability,
and 0.10% RH for high repeatability. Support all three modes.

Signed-off-by: JuenKit Yip <JuenKit_Yip@hotmail.com>
Link: https://lore.kernel.org/r/DB4PR10MB6261A70CD0444248ADDCC3219258A@DB4PR10MB6261.EURPRD10.PROD.OUTLOOK.COM
[groeck: Added details to description]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-06-17 08:56:42 -07:00
JuenKit Yip
7d6d53ba3b hwmon: (sht3x)replace "high-precision" property to "repeatability"
Replace use of "precision" with "repeatability" to match
datasheet terminology.

No functional change.

Signed-off-by: JuenKit Yip <JuenKit_Yip@hotmail.com>
Link: https://lore.kernel.org/r/DB4PR10MB626113BFFA66DE32C3479D229258A@DB4PR10MB6261.EURPRD10.PROD.OUTLOOK.COM
[groeck: Added commit description]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-06-17 08:54:34 -07:00
JuenKit Yip
5bca68ac63 hwmon: (sht3x) remove blocking_io property
Due to no support on clock-strench, blocking mode was removed and
now single-shot mode only uses non-blocking mode.

Signed-off-by: JuenKit Yip <JuenKit_Yip@hotmail.com>
Link: https://lore.kernel.org/r/DB4PR10MB6261DA9202AF37B4F6ECDD6C9258A@DB4PR10MB6261.EURPRD10.PROD.OUTLOOK.COM
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-06-17 08:51:23 -07:00
JuenKit Yip
fc669e922e hwmon: (sht3x) remove sht3x_platform_data
Since no in-tree driver supports it, sht3x_platform_data has been
removed and the relevant properties have been moved to sht3x_data.

Signed-off-by: JuenKit Yip <JuenKit_Yip@hotmail.com>
Link: https://lore.kernel.org/r/DB4PR10MB626126FB7226D5AF341197449258A@DB4PR10MB6261.EURPRD10.PROD.OUTLOOK.COM
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-06-17 08:50:05 -07:00
Ilpo Järvinen
e9c154eed8 mfd: intel-m10-bmc: Move m10bmc_sys_read() away from header
Move m10bmc_sys_read() out from the header to prepare it for adding
more code into the function which would make it too large to be a
static inline any more.

While at it, replace the vague wording in function comment with more
precise statements.

Reviewed-by: Russ Weight <russell.h.weight@intel.com>
Acked-by: Guenter Roeck <linux@roeck-us.net> # For hwmon
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: Xu Yilun <yilun.xu@intel.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230417092653.16487-4-ilpo.jarvinen@linux.intel.com
2023-06-15 09:19:36 +01:00
Guenter Roeck
450d1a8ce1 hwmon: (pmbus/max16601) Add support for new revisions of MAX16508
New revisions of MAX16508 report MAX16508.xx or MAX16508y.xx as device ID,
but are functionally similar to MAX16508. Add support for those chip
variants.

Cc: Vlad Sytchenko <vsytch@google.com>
Cc: Steve Foreman <foremans@google.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-06-10 08:28:14 -07:00
Mark Brown
7357b1876b hwmon: (tmp464) Use maple tree register cache
The tmp464 is only capable of performing single register read and write
operations which means it gains no advantage from using a rbtree register
cache, convert it to using the more modern maple tree register cache
instead. This should be more efficient.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230609-hwmon-maple-v1-5-8edacce86b28@kernel.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-06-10 07:37:02 -07:00
Mark Brown
e68953fcc6 hwmon: (tmp108) Use maple tree register cache
The tmp108 is only capable of performing single register read and write
operations which means it gains no advantage from using a rbtree register
cache, convert it to using the more modern maple tree register cache
instead. This should be more efficient.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230609-hwmon-maple-v1-4-8edacce86b28@kernel.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-06-10 07:37:02 -07:00
Mark Brown
729f1f738a hwmon: (tmp102) Use maple tree register cache
The tmp102 is only capable of performing single register read and write
operations which means it gains no advantage from using a rbtree register
cache, convert it to using the more modern maple tree register cache
instead. This should be more efficient.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230609-hwmon-maple-v1-3-8edacce86b28@kernel.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-06-10 07:37:02 -07:00
Mark Brown
6ef3811c40 hwmon: (lm95245) Use maple tree register cache
The lm95245 is only capable of performing single register read and write
operations which means it gains no advantage from using a rbtree register
cache, convert it to using the more modern maple tree register cache
instead. This should be more efficient.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230609-hwmon-maple-v1-2-8edacce86b28@kernel.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-06-10 07:37:02 -07:00
Mark Brown
30841ce373 hwmon: (lm75) Use maple tree register cache
The lm75 is only capable of performing single register read and write
operations which means it gains no advantage from using a rbtree register
cache, convert it to using the more modern maple tree register cache
instead. This should be more efficient.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230609-hwmon-maple-v1-1-8edacce86b28@kernel.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-06-10 07:37:02 -07:00
Frank Crawford
317840cfd6 hwmon: (it87) Generalise support for FAN_CTL ON/OFF
Support for FAN_CTL ON/OFF is currently disabled only for IT8603E but
there are severl chips that don't support the configuration bits to turn
off fan control entirely.  Generalise this support for any chip.

Add feature flag FEAT_FANCTL_ONOFF for chips that support configuration
bits for management of fan control off and assign all chips that support
the configuration.

Signed-off-by: Frank Crawford <frank@crawford.emu.id.au>
Link: https://lore.kernel.org/r/20230527094756.3464256-1-frank@crawford.emu.id.au
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-06-08 06:44:14 -07:00
Osama Muhammad
a1b6f13578 hwmon: (pmbus/adm1266) Drop unnecessary error check for debugfs_create_dir
This patch removes the error checking for debugfs_create_dir
in adm1266.c. This is because the debugfs_create_dir() does not
return NULL but an ERR_PTR after an error.
The DebugFS kernel API is developed in a way that the
caller can safely ignore the errors that occur during
the creation of DebugFS nodes.The debugfs Api handles
it gracefully. The check is unnecessary.

Link to the comment above debugfs_create_dir:
https://elixir.bootlin.com/linux/latest/source/fs/debugfs/inode.c#L565

Signed-off-by: Osama Muhammad <osmtendev@gmail.com>
Link: https://lore.kernel.org/r/20230526163938.9903-1-osmtendev@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-06-08 06:43:00 -07:00
Osama Muhammad
ca866920b0 hwmon: (pmbus/ucd9000) Drop unnecessary error check for debugfs_create_dir
This patch removes the error checking for debugfs_create_dir
in ucd9000.c. This is because the debugfs_create_dir() does not
return NULL but an ERR_PTR after an error.
The DebugFS kernel API is developed in a way that the
caller can safely ignore the errors that occur during
the creation of DebugFS nodes.The debugfs Api handles
it gracefully. The check is unnecessary.

Link to the comment above debugfs_create_dir:
https://elixir.bootlin.com/linux/latest/source/fs/debugfs/inode.c#L565

Signed-off-by: Osama Muhammad <osmtendev@gmail.com>
Link: https://lore.kernel.org/r/20230526154906.6370-1-osmtendev@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-06-08 06:43:00 -07:00
Arnd Bergmann
153c9a023b hwmon: (hp-wmi-sensors) fix debugfs check
Checking for Kconfig symbols with #if is wrong:

drivers/hwmon/hp-wmi-sensors.c:1141:5: error: "CONFIG_DEBUG_FS" is not defined, evaluates to 0 [-Werror=undef]

This could be an #ifdef, but an IS_ENABLED() check is even better to
give the best compile coverage.

Fixes: 23902f98f8 ("hwmon: add HP WMI Sensors driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: James Seo <james@equiv.tech>
Link: https://lore.kernel.org/r/20230601213216.3220550-1-arnd@kernel.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-06-08 06:42:53 -07:00
James Seo
23902f98f8 hwmon: add HP WMI Sensors driver
Hewlett-Packard (and some HP Compaq) business-class computers report
hardware monitoring information via WMI. This driver exposes that
information to hwmon.

Initial support is provided for temperature, fan speed, and intrusion
sensor types. Provisional support is provided for voltage and current
sensor types.

HP's WMI implementation permits many other types of numeric sensors.
Therefore, a debugfs interface is also provided to enumerate and
inspect all numeric sensors visible on the WMI side. This should
facilitate adding support for other sensor types in the future.

Tested on a HP Z420, a HP EliteOne 800 G1, and a HP Compaq Elite 8300
SFF.

Note that provisionally supported sensor types are untested and seem
to be rare-to-nonexistent in the wild, having been encountered
neither on test systems nor in ACPI dumps from the Linux Hardware
Database. They are included because their popularity in general makes
their presence on past or future HP systems plausible and because no
doubt exists as to how the sensors themselves would be represented in
WMI (alarm attributes will need to wait for hardware to be located).
A 2005 HP whitepaper gives the relevant sensor object MOF definition
and sensor value scaling calculation, and both this driver and the
official HP Performance Advisor utility comply with them (confirmed
in the latter case by reverse engineering).

Link: https://h20331.www2.hp.com/hpsub/downloads/cmi_whitepaper.pdf
Signed-off-by: James Seo <james@equiv.tech>
Link: https://lore.kernel.org/r/20230522115645.509701-1-james@equiv.tech
[groeck: Set error return value for intrusion writes to -EINVAL.
	 Always accept writes of 0 even if there was no intrusion. ]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-06-08 06:41:19 -07:00
Joaquín Ignacio Aramendía
7590e659e0 hwmon: (oxp-sensors) Stop passing device structure
We don't need to pass device structure to write_to_ec() so we remove
that from the function declaration.
The same is valid for pwm_enable() and pwm_disable() as we were passing
the pointer to hand it off to write_to_ec().

Signed-off-by: Joaquín Ignacio Aramendía <samsagax@gmail.com>
Link: https://lore.kernel.org/r/20230525142652.41981-1-samsagax@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-06-08 06:41:18 -07:00
Daniel Matyas
16d60ba8fd hwmon: Add MAX31827 driver
MAX31827 is a low-power temperature switch with I2C interface.

The device is a ±1°C accuracy from -40°C to +125°C
(12 bits) local temperature switch and sensor with I2C/SM-
Bus interface. The combination of small 6-bump wafer-lev-
el package (WLP) and high accuracy makes this temper-
ature sensor/switch ideal for a wide range of applications.

Signed-off-by: Daniel Matyas <daniel.matyas@analog.com>
Link: https://lore.kernel.org/r/20230524160131.14081-2-daniel.matyas@analog.com
[groeck: Improved define alignment, return -EINVAL after bad user input,
 fixed up compatible statement]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-06-08 06:41:18 -07:00
Kirill Yatsenko
d2abcb5cc8 hwmon: (aht10) Add support for compatible aht20
Add support for compatible AHT20 temperature/humidity sensor. The only
difference between the two is that AHT20 has additional crc8 byte.

It seems like AHT15 is also supported by the driver but it wasn't
verified and tested yet.

Tested on Beaglebone black rev C.

Signed-off-by: Kirill Yatsenko <kiriyatsenko@gmail.com>
Link: https://lore.kernel.org/r/20230524201912.815993-1-kiriyatsenko@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-06-08 06:41:18 -07:00
Joaquín Ignacio Aramendía
7d0c2c61b1 hwmon: (oxp-sensors) Add new DMI match for OXP Mini
A newer BIOS version for the OneXPlayer Mini AMD modified vendor and
board name strings. Add those to the match table and set the same board
model as older OXP Mini AMD.

Signed-off-by: Joaquín Ignacio Aramendía <samsagax@gmail.com>
Link: https://lore.kernel.org/r/20230517183540.187383-1-samsagax@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-06-08 06:41:18 -07:00
Aleksa Savic
b3d3be6c4c hwmon: (aquacomputer_d5next) Add support for Aquacomputer Leakshield
Extend aquacomputer_d5next driver to expose various hardware sensors of the
Aquacomputer Leakshield leak prevention system, which communicates
through a proprietary USB HID protocol. Implemented by Noah Bergbauer [1].

Two temperature sensors are exposed, along with pressure (current, min, max
and target), reservoir volume (total and filled), pump speed and flow. Pump
speed and flow values are user provided and allow the Leakshield to
optimize its operation. Writing them to the device is subject of future
patches.

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

Originally-from: Noah Bergbauer <main@ehvag.de>
Signed-off-by: Aleksa Savic <savicaleksa83@gmail.com>
Link: https://lore.kernel.org/r/20230520095447.509287-3-savicaleksa83@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-06-08 06:41:18 -07:00
Aleksa Savic
fdbfd330c4 hwmon: (aquacomputer_d5next) Rename AQC_TEMP_SENSOR_DISCONNECTED
Rename the macro in question to AQC_SENSOR_NA because
more than just temperature sensors use this value to
indicate that they don't have a reading. Implemented by
Noah Bergbauer [1].

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

Originally-from: Noah Bergbauer <main@ehvag.de>
Signed-off-by: Aleksa Savic <savicaleksa83@gmail.com>
Link: https://lore.kernel.org/r/20230520095447.509287-2-savicaleksa83@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-06-08 06:41:18 -07:00
Kirill Yatsenko
014714b8a6 hwmon: (aht10) Refactor aht10_read_values function
Exit from the function immediately if the poll time hasn't yet expired.
Therefore the code after the check can be moved one tab to the left which
improves readability.

Signed-off-by: Kirill Yatsenko <kiriyatsenko@gmail.com>
Link: https://lore.kernel.org/r/20230511202633.299174-2-kiriyatsenko@gmail.com
[groeck: Dropped else after return]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-06-08 06:41:18 -07:00
Kirill Yatsenko
0cb01ec315 hwmon: (aht10) Fix typos in comments
Fix typos in the description of the return value section of the
functions. The word 'succesfull' is incorrect, it should be 'successful'.

Signed-off-by: Kirill Yatsenko <kiriyatsenko@gmail.com>
Link: https://lore.kernel.org/r/20230511202633.299174-1-kiriyatsenko@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-06-08 06:41:18 -07:00
James Seo
3b9da0422a hwmon: (core) Finish renaming groups parameter in API to extra_groups
Commit 848ba0a2f2 ("hwmon: (core) Rename groups parameter in API to
extra_groups") renames the 'groups' parameter of
devm_hwmon_device_register_with_info() to 'extra_groups' in
hwmon-kernel-api.txt (later .rst) and hwmon.h, but this change was not
propagated to the function code itself in hwmon.c. Finish the job.

Note that hwmon_device_register_with_info() has the same
parameter, and the name of that parameter was changed in all
three files. Harmonizing the name between these related
functions also removes a potential source of confusion.

Signed-off-by: James Seo <james@equiv.tech>
Link: https://lore.kernel.org/r/20230507151051.1861929-1-james@equiv.tech
[groeck: Fixed up SHA reference in description]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-06-08 06:41:18 -07:00
James Seo
fe6ac23777 hwmon: (core) Add missing beep-related standard attributes
beep_enable, inX_beep, currX_beep, fanX_beep, and tempX_beep
are standard attributes mentioned in the sysfs interface
specification but not implemented in the hwmon core. Since
these are not deprecated, implement them.

Adding beep_mask is not necessary, as it is deprecated and
the drivers already using it are manually defining it.

Signed-off-by: James Seo <james@equiv.tech>
Link: https://lore.kernel.org/r/20230507152216.1862653-1-james@equiv.tech
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-06-08 06:41:17 -07:00
Gopal Prasad
7c415ed867 hwmon: (nct6683) Add another customer ID for NCT6687D sensor chip on some MSI boards.
This value was found on a MSI Z690-A PRO DDR5 with NCT6687D.

Signed-off-by: Gopal Prasad <llyyr.public@gmail.com>
Link: https://lore.kernel.org/r/20230517042025.16942-1-llyyr.public@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-06-08 06:41:17 -07:00
Uwe Kleine-König
1975d16786 hwmon: Switch i2c drivers back to use .probe()
After commit b8a1a4cd5a ("i2c: Provide a temporary .probe_new()
call-back type"), all drivers being converted to .probe_new() and then
03c835f498 ("i2c: Switch .probe() to not take an id parameter") convert
back to (the new) .probe() to be able to eventually drop .probe_new() from
struct i2c_driver.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230505131718.1210071-1-u.kleine-koenig@pengutronix.de
[groeck: Added missing change in pmbus/acbel-fsg032.c]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-06-08 06:41:17 -07:00
Frank Crawford
339c8f2484 hwmon: (it87) Allow for chips with only 4 temp sensors
Some chips are known to only have 4 temperature sensors and there is no
requirement to test for more.  Currently only the IT8622E fits this
category.

Signed-off-by: Frank Crawford <frank@crawford.emu.id.au>
Link: https://lore.kernel.org/r/20230430045032.1723288-1-frank@crawford.emu.id.au
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-06-08 06:41:17 -07:00
Chris Packham
6a01a12d7e hwmon: (adt7475) Convert to use device_property APIs
Instead of of_property_read_*() use the equivalent
device_property_read_*() API. This will allow these properties to be
used on DT unaware platforms. For DT aware platforms this will be a
noop.

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Link: https://lore.kernel.org/r/20230418233656.869055-3-chris.packham@alliedtelesis.co.nz
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-06-08 06:41:17 -07:00
Frank Crawford
bd5940221b hwmon: (it87) Update IT8732F chip for 4 fans and PWMs
Add support for 4 fans and 4 PWMs to chipset IT8732F.

Signed-off-by: Frank Crawford <frank@crawford.emu.id.au>
Link: https://lore.kernel.org/r/20230429115205.1547251-4-frank@crawford.emu.id.au
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-06-08 06:41:17 -07:00
Frank Crawford
39a6dcf640 hwmon: (it87) Add controls for chips with only 4 PWMs
Add feature and support for chips with only 4 PWMs.

Signed-off-by: Frank Crawford <frank@crawford.emu.id.au>
Link: https://lore.kernel.org/r/20230429115205.1547251-3-frank@crawford.emu.id.au
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-06-08 06:41:17 -07:00
Frank Crawford
5a4417bc67 hwmon: (it87) Add controls for chips with only 4 fans
Add feature and support for chips with only 4 fans.

Reorder macro definitions to bring all fan definitions together.

Signed-off-by: Frank Crawford <frank@crawford.emu.id.au>
Link: https://lore.kernel.org/r/20230429115205.1547251-2-frank@crawford.emu.id.au
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-06-08 06:41:17 -07:00
Joaquín Ignacio Aramendía
5d06ec4279 hwmon: (oxp-sensors) Use less convoluted enum cast
Change

  .driver_data = (void *) &(enum type) {enum_literal};

to more readable form:

  .driver_data = (void *) enum_literal;

and corresponding cast usage as board type flag.

Signed-off-by: Joaquín Ignacio Aramendía <samsagax@gmail.com>
Link: https://lore.kernel.org/r/20230429142547.328125-1-samsagax@gmail.com
[groeck: Use double cast for assignment from driver_data to fix clang build warning]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-06-08 06:41:16 -07:00
Michael Carns
790dec13c0 hwmon: (asus-ec-sensors) add ROG Crosshair X670E Hero.
Only the temp sensors that I can verify are present.  HWINFO in
Windows shows other accumulated data and statistics (time since
installed, total power used, etc) that I have not attempted to find.

Signed-off-by: Michael Carns <mike@carns.com>
Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com>
Link: https://lore.kernel.org/r/20230426200345.65765-1-eugene.shalygin@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-06-08 06:41:16 -07:00
Joaquín Ignacio Aramendía
f415cb6c0f hwmon: (oxp-sensors) Add AYANEO 2 and Geek models
Add support for handhelds with same EC registers
  - AYANEO 2
  - AYANEO GEEK

All functionality tests succeed on AYANEO 2 by "pastaq" user on Discord
and AYANEO GEEK tested by "oneoc" Discord user.

Signed-off-by: Joaquín Ignacio Aramendía <samsagax@gmail.com>
Link: https://lore.kernel.org/r/20230426184420.99945-1-samsagax@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-06-08 06:41:16 -07:00
Guenter Roeck
b153a0bb41 hwmon: (pmbus/adm1275) Fix problems with temperature monitoring on ADM1272
The PMON_CONFIG register on ADM1272 is a 16 bit register. Writing a 8 bit
value into it clears the upper 8 bits of the register, resulting in
unexpected side effects. Fix by writing the 16 bit register value.

Also, it has been reported that temperature readings are sometimes widely
inaccurate, to the point where readings may result in device shutdown due
to errant overtemperature faults. Improve by enabling temperature sampling.

While at it, move the common code for ADM1272 and ADM1278 into a separate
function, and clarify in the error message that an attempt was made to
enable both VOUT and temperature monitoring.

Last but not least, return the error code reported by the underlying I2C
controller and not -ENODEV if updating the PMON_CONFIG register fails.
After all, this does not indicate that the chip is not present, but an
error in the communication with the chip.

Fixes: 4ff0ce227a ("hwmon: (pmbus/adm1275) Add support for ADM1272")
Fixes: 9da9c2dc57 ("hwmon: (adm1275) enable adm1272 temperature reporting")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20230602213447.3557346-1-linux@roeck-us.net
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-06-08 06:38:48 -07:00
Tim Harvey
a6d80df47e hwmon: (gsc-hwmon) fix fan pwm temperature scaling
The GSC fan pwm temperature register is in centidegrees celcius but the
Linux hwmon convention is to use milidegrees celcius. Fix the scaling.

Fixes: 3bce5377ef ("hwmon: Add Gateworks System Controller support")
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Link: https://lore.kernel.org/r/20230606153004.1448086-1-tharvey@gateworks.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-06-08 06:35:52 -07:00
James Clark
c5f7548445 hwmon: pmbus: Use devm_krealloc_array
Now that it exists, use it instead of doing the multiplication manually.

Acked-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: James Clark <james.clark@arm.com>
Link: https://lore.kernel.org/r/20230509094942.396150-3-james.clark@arm.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-30 21:07:15 +01:00
Arnd Bergmann
a9ae9c526c ARM: pxa: fix missing-prototypes warnings
The PXA platform has a number of configurations that end up with
a warning like these when building with W=1:

drivers/hwmon/max1111.c:83:5: error: no previous prototype for 'max1111_read_channel' [-Werror=missing-prototypes]
arch/arm/mach-pxa/reset.c:86:6: error: no previous prototype for 'pxa_restart' [-Werror=missing-prototypes]
arch/arm/mach-pxa/mfp-pxa2xx.c:254:5: error: no previous prototype for 'keypad_set_wake' [-Werror=missing-prototypes]
drivers/clk/pxa/clk-pxa25x.c:70:14: error: no previous prototype for 'pxa25x_get_clk_frequency_khz' [-Werror=missing-prototypes]
drivers/clk/pxa/clk-pxa25x.c:325:12: error: no previous prototype for 'pxa25x_clocks_init' [-Werror=missing-prototypes]
drivers/clk/pxa/clk-pxa27x.c:74:14: error: no previous prototype for 'pxa27x_get_clk_frequency_khz' [-Werror=missing-prototypes]
drivers/clk/pxa/clk-pxa27x.c:102:6: error: no previous prototype for 'pxa27x_is_ppll_disabled' [-Werror=missing-prototypes]
drivers/clk/pxa/clk-pxa27x.c:470:12: error: no previous prototype for 'pxa27x_clocks_init' [-Werror=missing-prototypes]
arch/arm/mach-pxa/pxa27x.c:44:6: error: no previous prototype for 'pxa27x_clear_otgph' [-Werror=missing-prototypes]
arch/arm/mach-pxa/pxa27x.c:58:6: error: no previous prototype for 'pxa27x_configure_ac97reset' [-Werror=missing-prototypes]
arch/arm/mach-pxa/spitz_pm.c:170:15: error: no previous prototype for 'spitzpm_read_devdata' [-Werror=missing-prototypes]

The problem is that there is a declaration for each of these, but
it's only seen by the caller and not the callee. Moving these
into appropriate header files ensures that both use the same
calling conventions and it avoids the warnings.

Acked-by: Stephen Boyd <sboyd@kernel.org>
Link: https://lore.kernel.org/r/20230516153109.514251-11-arnd@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-05-26 13:33:05 +02:00
Nikita Zhandarovich
0babf89c9c hwmon: (f71882fg) prevent possible division by zero
In the unlikely event that something goes wrong with the device and
its registers, the fan_from_reg() function may return 0. This value
will cause a division-by-zero error in the show_pwm() function.

To prevent this, test the value of
fan_from_reg(data->fan_full_speed[nr]) against 0 before performing
the division. If the division-by-zero error is avoided, assign 0 to
the val variable.

Found by Linux Verification Center (linuxtesting.org) with static
analysis tool SVACE.

Fixes: df9ec2dae0 ("hwmon: (f71882fg) Reorder symbols to get rid of a few forward declarations")
Signed-off-by: Nikita Zhandarovich <n.zhandarovich@fintech.ru>
Link: https://lore.kernel.org/r/20230510143537.145060-1-n.zhandarovich@fintech.ru
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-05-19 05:59:37 -07:00
Mario Limonciello
7d8accfaa0 hwmon: (k10temp) Add PCI ID for family 19, model 78h
Enable k10temp on this system.

  [ bp: Massage. ]

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20230427053338.16653-3-mario.limonciello@amd.com
2023-05-08 11:36:19 +02:00
Linus Torvalds
556eb8b791 Driver core changes for 6.4-rc1
Here is the large set of driver core changes for 6.4-rc1.
 
 Once again, a busy development cycle, with lots of changes happening in
 the driver core in the quest to be able to move "struct bus" and "struct
 class" into read-only memory, a task now complete with these changes.
 
 This will make the future rust interactions with the driver core more
 "provably correct" as well as providing more obvious lifetime rules for
 all busses and classes in the kernel.
 
 The changes required for this did touch many individual classes and
 busses as many callbacks were changed to take const * parameters
 instead.  All of these changes have been submitted to the various
 subsystem maintainers, giving them plenty of time to review, and most of
 them actually did so.
 
 Other than those changes, included in here are a small set of other
 things:
   - kobject logging improvements
   - cacheinfo improvements and updates
   - obligatory fw_devlink updates and fixes
   - documentation updates
   - device property cleanups and const * changes
   - firwmare loader dependency fixes.
 
 All of these have been in linux-next for a while with no reported
 problems.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCZEp7Sw8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ykitQCfamUHpxGcKOAGuLXMotXNakTEsxgAoIquENm5
 LEGadNS38k5fs+73UaxV
 =7K4B
 -----END PGP SIGNATURE-----

Merge tag 'driver-core-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core

Pull driver core updates from Greg KH:
 "Here is the large set of driver core changes for 6.4-rc1.

  Once again, a busy development cycle, with lots of changes happening
  in the driver core in the quest to be able to move "struct bus" and
  "struct class" into read-only memory, a task now complete with these
  changes.

  This will make the future rust interactions with the driver core more
  "provably correct" as well as providing more obvious lifetime rules
  for all busses and classes in the kernel.

  The changes required for this did touch many individual classes and
  busses as many callbacks were changed to take const * parameters
  instead. All of these changes have been submitted to the various
  subsystem maintainers, giving them plenty of time to review, and most
  of them actually did so.

  Other than those changes, included in here are a small set of other
  things:

   - kobject logging improvements

   - cacheinfo improvements and updates

   - obligatory fw_devlink updates and fixes

   - documentation updates

   - device property cleanups and const * changes

   - firwmare loader dependency fixes.

  All of these have been in linux-next for a while with no reported
  problems"

* tag 'driver-core-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (120 commits)
  device property: make device_property functions take const device *
  driver core: update comments in device_rename()
  driver core: Don't require dynamic_debug for initcall_debug probe timing
  firmware_loader: rework crypto dependencies
  firmware_loader: Strip off \n from customized path
  zram: fix up permission for the hot_add sysfs file
  cacheinfo: Add use_arch[|_cache]_info field/function
  arch_topology: Remove early cacheinfo error message if -ENOENT
  cacheinfo: Check cache properties are present in DT
  cacheinfo: Check sib_leaf in cache_leaves_are_shared()
  cacheinfo: Allow early level detection when DT/ACPI info is missing/broken
  cacheinfo: Add arm64 early level initializer implementation
  cacheinfo: Add arch specific early level initializer
  tty: make tty_class a static const structure
  driver core: class: remove struct class_interface * from callbacks
  driver core: class: mark the struct class in struct class_interface constant
  driver core: class: make class_register() take a const *
  driver core: class: mark class_release() as taking a const *
  driver core: remove incorrect comment for device_create*
  MIPS: vpe-cmp: remove module owner pointer from struct class usage.
  ...
2023-04-27 11:53:57 -07:00
Linus Torvalds
5e0ca0bfc3 Thermal control updates for 6.4-rc1
- Add a thermal zone 'devdata' accessor and modify several drivers to
    use it (Daniel Lezcano).
 
  - Prevent drivers from using the 'device' internal thermal zone
    structure field directly (Daniel Lezcano).
 
  - Clean up the hwmon thermal driver (Daniel Lezcano).
 
  - Add thermal zone id accessor and thermal zone type accessor
    and prevent drivers from using thermal zone fields directly (Daniel
    Lezcano).
 
  - Clean up the acerhdf and tegra thermal drivers (Daniel Lezcano).
 
  - Add lower bound check for sysfs input to the x86_pkg_temp_thermal
    Intel thermal driver (Zhang Rui).
 
  - Add more thermal zone device encapsulation: prevent setting structure
    field directly, access the sensor device instead the thermal zone's
    device for trace, relocate the traces in drivers/thermal (Daniel
    Lezcano).
 
  - Use the generic trip point for the i.MX and remove the get_trip_temp
    ops (Daniel Lezcano).
 
  - Use the devm_platform_ioremap_resource() in the Hisilicon driver
    (Yang Li).
 
  - Remove R-Car H3 ES1.* handling as public has only access to the ES2
    version and the upstream support for the ES1 has been shutdown (Wolfram
    Sang).
 
  - Add a delay after initializing the bank in order to let the time to
    the hardware to initialze itself before reading the temperature
    (Amjad Ouled-Ameur).
 
  - Add MT8365 support (Amjad Ouled-Ameur).
 
  - Preparational cleanup and DT bindings for RK3588 support (Sebastian
    Reichel).
 
  - Add driver support for RK3588 (Finley Xiao).
 
  - Use devm_reset_control_array_get_exclusive() for the Rockchip driver
    (Ye Xingchen).
 
  - Detect power gated thermal zones and return -EAGAIN when reading the
    temperature (Mikko Perttunen).
 
  - Remove thermal_bind_params structure as it is unused (Zhang Rui)
 
  - Drop unneeded quotes in DT bindings allowing to run yamllint (Rob
    Herring).
 
  - Update the power allocator documentation according to the thermal
    trace relocation (Lukas Bulwahn).
 
  - Fix sensor 1 interrupt status bitmask for the Mediatek LVTS sensor
    (Chen-Yu Tsai).
 
  - Use the dev_err_probe() helper in the Amlogic driver (Ye Xingchen).
 
  - Add AP domain support to LVTS thermal controllers for mt8195
    (Balsam CHIHI).
 
  - Remove buggy call to thermal_of_zone_unregister() (Daniel Lezcano).
 
  - Make thermal_of_zone_[un]register() private to the thermal OF code
    (Daniel Lezcano).
 
  - Create a private copy of the thermal zone device parameters
    structure when registering a thermal zone (Daniel Lezcano).
 
  - Fix a kernel NULL pointer dereference in thermal_hwmon (Zhang Rui).
 
  - Revert recent message adjustment in thermal_hwmon (Rafael Wysocki).
 
  - Use of_property_present() for testing DT property presence in
    thermal control code (Rob Herring).
 
  - Clean up thermal_list_lock locking in the thermal core (Rafael
    Wysocki).
 
  - Add DLVR support for RFIM control in the int340x Intel thermal
    driver (Srinivas Pandruvada).
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEE4fcc61cGeeHD/fCwgsRv/nhiVHEFAmRGvsYSHHJqd0Byand5
 c29ja2kubmV0AAoJEILEb/54YlRxekAQAJ/hhUZyY2hcFveNfrutkO8OGY+/rtz8
 ozMxyfwAdHoD6/zg9zZQTHSQy3W9rx2FC3tYtwHlJopDYFQuNPsfrhYE97EfO9uT
 Baou3OhoXV+ZJ0EZqIuTNuLaDPD/Hg8KSNmZvb6p/30bLR3Y/gKZutX9+S0x8qpG
 y7JcA8qPDYTvNfxkDjYv3M7HlfpwIwpi/xPFuw9nI2Fdw0SYRWpHAQlNj6oaF0xT
 EaNIg5zh4rR81T34/DpaOm1mfrg3Lg9xOJMU0laS5sKkn5Ea8s0E5s3vb5Quup61
 eXL3DhxmsIv51+1URZMZIQo2FmogvLmgnIPQyaeSvtlic0t39YS70tL2i8JY6kfL
 Tkhm8bS8jKQ6Y8GUvUbE/qadWFgkV4/lFTREVkKuq0XUU/YEpl5iQJAc0iEa0soy
 SISucs/ugoFjqdlN1pNDv7mLIzqyYIF6tZekLZTVa1U++MHKRakY9folD3brc6xO
 ewp1yO6e/fYZJx0K8LNlBRzXqNuV1Tl+kBDvUNHDNAEN8jONiZ2v+pDQ+VqYYxIc
 1A2KVw0l3m0MQ97w3E8LqYJTH6f8bxSLxjXnHLSN0eAXJkn10olfz/RYNsqi+dUb
 YBnFU8t3plGMVGrDcoDtO6hkujUw3oF7pibWeXXFEvIyRUcOA2e94kd57i9a1zLS
 5yyH9UchFcQq
 =XNJE
 -----END PGP SIGNATURE-----

Merge tag 'thermal-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull thermal control updates from Rafael Wysocki:
 "These mostly continue to prepare the thermal control subsystem for
  using unified representation of trip points, which includes cleanups,
  code refactoring and similar and update several drivers (for other
  reasons), which includes new hardware support.

  Specifics:

   - Add a thermal zone 'devdata' accessor and modify several drivers to
     use it (Daniel Lezcano)

   - Prevent drivers from using the 'device' internal thermal zone
     structure field directly (Daniel Lezcano)

   - Clean up the hwmon thermal driver (Daniel Lezcano)

   - Add thermal zone id accessor and thermal zone type accessor and
     prevent drivers from using thermal zone fields directly (Daniel
     Lezcano)

   - Clean up the acerhdf and tegra thermal drivers (Daniel Lezcano)

   - Add lower bound check for sysfs input to the x86_pkg_temp_thermal
     Intel thermal driver (Zhang Rui)

   - Add more thermal zone device encapsulation: prevent setting
     structure field directly, access the sensor device instead the
     thermal zone's device for trace, relocate the traces in
     drivers/thermal (Daniel Lezcano)

   - Use the generic trip point for the i.MX and remove the
     get_trip_temp ops (Daniel Lezcano)

   - Use the devm_platform_ioremap_resource() in the Hisilicon driver
     (Yang Li)

   - Remove R-Car H3 ES1.* handling as public has only access to the ES2
     version and the upstream support for the ES1 has been shutdown
     (Wolfram Sang)

   - Add a delay after initializing the bank in order to let the time to
     the hardware to initialze itself before reading the temperature
     (Amjad Ouled-Ameur)

   - Add MT8365 support (Amjad Ouled-Ameur)

   - Preparational cleanup and DT bindings for RK3588 support (Sebastian
     Reichel)

   - Add driver support for RK3588 (Finley Xiao)

   - Use devm_reset_control_array_get_exclusive() for the Rockchip
     driver (Ye Xingchen)

   - Detect power gated thermal zones and return -EAGAIN when reading
     the temperature (Mikko Perttunen)

   - Remove thermal_bind_params structure as it is unused (Zhang Rui)

   - Drop unneeded quotes in DT bindings allowing to run yamllint (Rob
     Herring)

   - Update the power allocator documentation according to the thermal
     trace relocation (Lukas Bulwahn)

   - Fix sensor 1 interrupt status bitmask for the Mediatek LVTS sensor
     (Chen-Yu Tsai)

   - Use the dev_err_probe() helper in the Amlogic driver (Ye Xingchen)

   - Add AP domain support to LVTS thermal controllers for mt8195
     (Balsam CHIHI)

   - Remove buggy call to thermal_of_zone_unregister() (Daniel Lezcano)

   - Make thermal_of_zone_[un]register() private to the thermal OF code
     (Daniel Lezcano)

   - Create a private copy of the thermal zone device parameters
     structure when registering a thermal zone (Daniel Lezcano)

   - Fix a kernel NULL pointer dereference in thermal_hwmon (Zhang Rui)

   - Revert recent message adjustment in thermal_hwmon (Rafael Wysocki)

   - Use of_property_present() for testing DT property presence in
     thermal control code (Rob Herring)

   - Clean up thermal_list_lock locking in the thermal core (Rafael
     Wysocki)

   - Add DLVR support for RFIM control in the int340x Intel thermal
     driver (Srinivas Pandruvada)"

* tag 'thermal-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (55 commits)
  thermal: intel: int340x: Add DLVR support for RFIM control
  thermal/core: Alloc-copy-free the thermal zone parameters structure
  thermal/of: Unexport unused OF functions
  thermal/drivers/bcm2835: Remove buggy call to thermal_of_zone_unregister
  thermal/drivers/mediatek/lvts_thermal: Add AP domain for mt8195
  dt-bindings: thermal: mediatek: Add AP domain to LVTS thermal controllers for mt8195
  thermal: amlogic: Use dev_err_probe()
  thermal/drivers/mediatek/lvts_thermal: Fix sensor 1 interrupt status bitmask
  MAINTAINERS: adjust entry in THERMAL/POWER_ALLOCATOR after header movement
  dt-bindings: thermal: Drop unneeded quotes
  thermal/core: Remove thermal_bind_params structure
  thermal/drivers/tegra-bpmp: Handle offline zones
  thermal/drivers/rockchip: use devm_reset_control_array_get_exclusive()
  dt-bindings: rockchip-thermal: Support the RK3588 SoC compatible
  thermal/drivers/rockchip: Support RK3588 SoC in the thermal driver
  thermal/drivers/rockchip: Support dynamic sized sensor array
  thermal/drivers/rockchip: Simplify channel id logic
  thermal/drivers/rockchip: Use dev_err_probe
  thermal/drivers/rockchip: Simplify clock logic
  thermal/drivers/rockchip: Simplify getting match data
  ...
2023-04-25 18:32:43 -07:00
Christophe JAILLET
1c19ac768b hwmon: lochnagar: Remove the unneeded include <linux/i2c.h>
This driver does not use i2c, so there is no point in including
<linux/i2c.h>

Remove it.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/df555e724d1b52bd9958c0bd729a774dfe0cf150.1682237387.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-23 08:22:28 -07:00
Tomáš Pecka
93822f5161 hwmon: (pmbus/fsp-3y) Fix functionality bitmask in FSP-3Y YM-2151E
The bit flags in pmbus_driver_info functionality for YM-2151E chip were
joined with a comma operator instead of a bitwise OR. This means that
the last constant PMBUS_HAVE_IIN was not OR-ed with the other
PM_BUS_HAVE_* constants for this page but it initialized the next element
of the func array (which was not accessed from anywhere because of the
number of pages).

However, there is no need for setting PMBUS_HAVE_IIN in the 5Vsb page
because this command does not seem to be paged. Obviously, the device
only has one IIN sensor, so it doesn't make sense to query it again from
the second page.

Fixes: 1734b4135a ("hwmon: Add driver for fsp-3y PSUs and PDUs")
Signed-off-by: Jan Kundrát <jan.kundrat@cesnet.cz>
Signed-off-by: Tomáš Pecka <tomas.pecka@cesnet.cz>
Link: https://lore.kernel.org/r/20230420171939.212040-1-tomas.pecka@cesnet.cz
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-21 07:27:23 -07:00
Chris Packham
2a8e41ad33 hwmon: (adt7475) Use device_property APIs when configuring polarity
On DT unaware platforms of_property_read_u32_array() returns -ENOSYS
which wasn't handled by the code treating adi,pwm-active-state as
optional. Update the code to use device_property_read_u32_array() which
deals gracefully with DT unaware platforms.

Fixes: 86da28eed4 ("hwmon: (adt7475) Add support for inverting pwm output")
Reported-by: Mariusz Białończyk <manio@skyboo.net>
Link: https://lore.kernel.org/linux-hwmon/52e26a67-9131-2dc0-40cb-db5c07370027@alliedtelesis.co.nz/T/#mdd0505801e0a4e72340de009a47c0fca4f771ed3
Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Link: https://lore.kernel.org/r/20230418233656.869055-2-chris.packham@alliedtelesis.co.nz
Cc: stable@vger.kernel.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-21 07:27:23 -07:00
Aleksa Savic
19692f17cd hwmon: (aquacomputer_d5next) Add support for Aquacomputer Aquastream XT
Extend aquacomputer_d5next driver to expose various hardware sensors of the
Aquacomputer Aquastream XT watercooling pump, which communicates
through a proprietary USB HID protocol. Implemented by Leonard Anderweit
[1] [2].

Coolant temp, fan IC and external temp sensor readings are available, along
with speed and voltage of both the pump and optionally connected fan.
It also exposes pump current.

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

[1] https://github.com/aleksamagicka/aquacomputer_d5next-hwmon/pull/46
[2] https://github.com/aleksamagicka/aquacomputer_d5next-hwmon/pull/49

Originally-from: Leonard Anderweit <leonard.anderweit@gmail.com>
Signed-off-by: Aleksa Savic <savicaleksa83@gmail.com>
Link: https://lore.kernel.org/r/20230416181702.9892-1-savicaleksa83@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-21 07:27:23 -07:00
Frank Crawford
0be1007717 hwmon: (it87) Disable/enable SMBus access for IT8622E chipset
Configure the IT8622E chip to disable/re-enable access via an SMBus when
reading or writing the chip's registers.

Signed-off-by: Frank Crawford <frank@crawford.emu.id.au>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-21 07:27:23 -07:00
Frank Crawford
376e1a937b hwmon: (it87) Add calls to smbus_enable/smbus_disable as required
Disable/re-enable access through SMBus for chip registers when they are
are being read or written.

For simple cases this is done at the same time as when a mutex is set,
however, within loops or during initialisation it is done separately.

Signed-off-by: Frank Crawford <frank@crawford.emu.id.au>
[groeck: Fixed multi-line alignment]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-21 07:27:23 -07:00
Frank Crawford
0282ba4a4f hwmon: (it87) Test for error in it87_update_device
Handle errors from it87_update_device(), which currently only occurs if
SMBus access locking fails.

Signed-off-by: Frank Crawford <frank@crawford.emu.id.au>
[groeck: Fixed handling in show_temp_type()]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-21 07:27:08 -07:00
Frank Crawford
9989b3c0ff hwmon: (it87) Disable SMBus access for environmental controller registers.
Add functions to disable and re-enable access by the SMBus for specific
chips.

Signed-off-by: Frank Crawford <frank@crawford.emu.id.au>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:40 -07:00
Lakshmi Yadlapati
d89d6c093a hwmon: (pmbus/acbel-fsg032) Add Acbel power supply
Add the driver to support ACBEL FSG032 power supply.

Signed-off-by: Lakshmi Yadlapati <lakshmiy@us.ibm.com>
Link: https://lore.kernel.org/r/20230413132627.3444119-4-lakshmiy@us.ibm.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:40 -07:00
Christophe JAILLET
fb23f23096 hwmon: (sfctemp) Simplify error message
dev_err_probe() already display the error code. There is no need to
duplicate it explicitly in the error message.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/f32a6e877f399e11ca130476002f85c2b48ba7ec.1681575790.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:40 -07:00
Eddie James
1680796b21 hwmon: (pmbus/ibm-cffps) Use default debugfs attributes and lock function
Switch the driver to use the default debugfs attributes instead of
ones that provide the same data under different names. Use the lock
functions for the debugfs and led attributes, and simplify the input
history operation by dropping the timer and lock.

Signed-off-by: Eddie James <eajames@linux.ibm.com>
Link: https://lore.kernel.org/r/20230412161526.252294-3-eajames@linux.ibm.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:40 -07:00
Eddie James
a7ac37183a hwmon: (pmbus/core) Add lock and unlock functions
Debugfs operations may set the page number, which must be done
atomically with the subsequent i2c operation. Lock the update_lock
in the debugfs functions and provide a function for pmbus drivers
to lock and unlock the update_lock.

Signed-off-by: Eddie James <eajames@linux.ibm.com>
Link: https://lore.kernel.org/r/20230412161526.252294-2-eajames@linux.ibm.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:40 -07:00
Guenter Roeck
ab3e00416a hwmon: (pmbus/core) Request threaded interrupt with IRQF_ONESHOT
0-day rightfully complains:

drivers/hwmon/pmbus/pmbus_core.c:3164:7-32: WARNING:
	Threaded IRQ with no primary handler requested without IRQF_ONESHOT
	(unless it is nested IRQ)

Without IRQF_ONESHOT, the primary interrupt may end up in a loop,
and the threaded interrupt handler may never execute. Request interrupt
with IRQF_ONESHOT and assume that the interrupt will cleared and re-enabled
by clearing the fault condition in the threaded interrupt handler.

Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/linux-hwmon/6436efbb.08+e+yEDqvRxvHDP%25lkp@intel.com/T/#u
Cc: Patrick Rudolph <patrick.rudolph@9elements.com>
Cc: Naresh Solanki <Naresh.Solanki@9elements.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:40 -07:00
Denis Pauk
5dcd53e315 hwmon: (nct6775) update ASUS WMI monitoring list A620/B760/W790
Boards such as
* B360M-BASALT,
* B360M-D3H,
* EX-B360M-V,
* EX-B360M-V3,
* EX-B360M-V5,
* EX-B760M-V5 D4,
* PRIME A620M-A,
* PRIME B460I-PLUS,
* PRIME B460M-A,
* PRIME B460M-K,
* PRIME B550-PLUS AC-HES,
* PRIME B660M-A AC D4,
* PRIME B760M-A,
* PRIME B760M-A AX D4,
* PRIME B760M-A D4,
* PRIME B760M-AJ D4,
* PRIME B760M-A WIFI,
* PRIME B760M-A WIFI D4,
* PRIME B760M-K D4,
* PRIME B760-PLUS,
* PRIME B760-PLUS D4,
* PRIME H310I-PLUS,
* PRIME H310M-A,
* PRIME H310M-C,
* PRIME H310M-D,
* PRIME H310M-DASH,
* PRIME H310M-E,
* PRIME H310M-E/BR,
* PRIME H310M-F,
* PRIME H310M-K,
* PRIME H310-PLUS,
* PRIME H310T,
* PRIME H370-A,
* PRIME H370M-PLUS,
* PRIME H370-PLUS,
* PRIME H410I-PLUS,
* PRIME H470M-PLUS,
* PRIME H470-PLUS,
* PRIME H510M-R,
* PRIME H510T2/CSM,
* PRIME H570M-PLUS,
* PRIME H570-PLUS,
* PRIME H610M-R D4,
* PRIME H670-PLUS D4,
* PRIME H770-PLUS D4,
* PRIME Q370M-C,
* ProArt B760-CREATOR D4,
* Pro B760M-C,
* Pro B760M-CT,
* PRO Q470M-C,
* Pro Q670M-C,
* Pro WS W790-ACE,
* Pro WS W790E-SAGE SE,
* ROG MAXIMUS Z690 FORMULA,
* ROG MAXIMUS Z690 HERO,
* ROG STRIX B360-F GAMING,
* ROG STRIX B360-G GAMING,
* ROG STRIX B360-H GAMING,
* ROG STRIX B360-H GAMING/OPTANE,
* ROG STRIX B360-I GAMING,
* ROG STRIX B760-A GAMING WIFI,
* ROG STRIX B760-A GAMING WIFI D4,
* ROG STRIX B760-F GAMING WIFI,
* ROG STRIX B760-G GAMING WIFI,
* ROG STRIX B760-G GAMING WIFI D4,
* ROG STRIX B760-I GAMING WIFI,
* ROG STRIX H370-F GAMING,
* ROG STRIX H370-I GAMING,
* ROG STRIX H470-I GAMING,
* ROG STRIX Z690-E GAMING WIFI,
* ROG STRIX Z690-F GAMING WIFI,
* ROG STRIX Z690-G GAMING WIFI,
* TUF B360M-E GAMING,
* TUF B360M-PLUS GAMING,
* TUF B360M-PLUS GAMING/BR,
* TUF B360M-PLUS GAMING S,
* TUF B360-PLUS GAMING,
* TUF B360-PRO GAMING,
* TUF B360-PRO GAMING (WI-FI),
* TUF GAMING A620M-PLUS,
* TUF GAMING A620M-PLUS WIFI,
* TUF GAMING B660M-PLUS D4,
* TUF GAMING B660M-PLUS WIFI D4,
* TUF GAMING B760M-BTF WIFI D4,
* TUF GAMING B760M-E D4,
* TUF GAMING B760M-PLUS,
* TUF GAMING B760M-PLUS D4,
* TUF GAMING B760M-PLUS WIFI,
* TUF GAMING B760M-PLUS WIFI D4,
* TUF GAMING B760-PLUS WIFI,
* TUF GAMING B760-PLUS WIFI D4,
* TUF GAMING H470-PRO,
* TUF GAMING H470-PRO (WI-FI),
* TUF GAMING H570-PRO,
* TUF GAMING H570-PRO WIFI,
* TUF GAMING H670-PRO WIFI D4,
* TUF GAMING H770-PRO WIFI,
* TUF GAMING X570-PRO WIFI II,
* TUF H310M-PLUS GAMING,
* TUF H310M-PLUS GAMING/BR,
* TUF H310-PLUS GAMING,
* TUF H370-PRO GAMING,
* TUF H370-PRO GAMING (WI-FI),
have got a nct6775 chip, but by default there's no use of it
because of resource conflict with WMI method.

This commit adds such boards to the WMI monitoring list.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=204807
Signed-off-by: Denis Pauk <pauk.denis@gmail.com>
Link: https://lore.kernel.org/r/20230408162228.4291-1-pauk.denis@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:40 -07:00
Svyatoslav Ryhel
ad20248a2d hwmon: ina2xx: add optional regulator support
TI ina2xx sensors according to datasheets have dedicated
vs supplies. Add it for proper work.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Link: https://lore.kernel.org/r/20230407160508.20479-3-clamor95@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:40 -07:00
Naresh Solanki
7a0c7b9ff2 hwmon: (pmbus/core) Notify regulator events
Notify regulator events in PMBus irq handler.

Signed-off-by: Naresh Solanki <Naresh.Solanki@9elements.com>
Link: https://lore.kernel.org/r/20230328150335.90238-3-Naresh.Solanki@9elements.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:39 -07:00
Patrick Rudolph
f74f06f406 hwmon: (pmbus/core) Add regulator event support
Add regulator events corresponding to regulator error in regulator flag
map.
Also capture the same in pmbus_regulator_get_flags.

Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Signed-off-by: Naresh Solanki <Naresh.Solanki@9elements.com>
Link: https://lore.kernel.org/r/20230328150335.90238-2-Naresh.Solanki@9elements.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:39 -07:00
Naresh Solanki
ffe36eb557 hwmon: (pmbus/core) Add rdev in pmbus_data struct
Add regulator device in pmbus_data & initialize the same during PMBus
regulator register.

Signed-off-by: Naresh Solanki <Naresh.Solanki@9elements.com>
Link: https://lore.kernel.org/r/20230328150335.90238-1-Naresh.Solanki@9elements.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:39 -07:00
Emil Renner Berthing
7f2958e845 hwmon: (sfctemp) Add StarFive JH71x0 temperature sensor
Add driver for the StarFive JH71x0 temperature sensor. You
can enable/disable it and read temperature in milli Celcius
through sysfs.

Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
Co-developed-by: Samin Guo <samin.guo@starfivetech.com>
Signed-off-by: Samin Guo <samin.guo@starfivetech.com>
Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
Link: https://lore.kernel.org/r/20230321022644.107027-3-hal.feng@starfivetech.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:39 -07:00
Zhang Rui
a2930f6dc9 hwmon: (coretemp) Delete an obsolete comment
The refinement of tjmax value retrieved from MSR_IA32_TEMPERATURE_TARGET
has been changed for several times.

Now, the raw value from MSR is used without refinement. Thus remove the
obsolete comment.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Link: https://lore.kernel.org/r/20230330103346.6044-2-rui.zhang@intel.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:39 -07:00
Zhang Rui
6c2b659913 hwmon: (coretemp) Delete tjmax debug message
After commit c0c67f8761 ("hwmon: (coretemp) Add support for dynamic
tjmax"), tjmax value is retrieved from MSR every time the temperature is
read.
This means that, with debug message enabled, the tjmax debug message is
printed out for every single temperature read for any CPU. This spams
the syslog.

Ideally, as tjmax is package scope unique, the debug message should show
once when tjmax is changed for one package. But this requires inventing
some new per-package data in the coretemp driver, and this is overkill.

To keep the code simple, delete the tjmax debug message.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Link: https://lore.kernel.org/r/20230330103346.6044-1-rui.zhang@intel.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:39 -07:00
Eugene Shalygin
3a31e09203 hwmon: (asus-ec-sensors) add ROG STRIX Z390-F GAMING
The definition comes from a LHM PR [1], and the mutex path from
the ACPI dump, kindly provided by the PR author [2]

[1] https://github.com/LibreHardwareMonitor/LibreHardwareMonitor/pull/1031
[2] https://github.com/zeule/asus-ec-sensors/issues/36

Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com>
Link: https://lore.kernel.org/r/20230405224339.358675-3-eugene.shalygin@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:39 -07:00
fireflame90051
c7ba3e26fd hwmon: (asus-ec-sensors) add ProArt B550-Creator
Add support for the ASUS ProArt B550-Creator board, was tested
with the hardware [1].

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

Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com>
Signed-off-by: fireflame90051 <cacoukoulis@gmail.com>
Link: https://lore.kernel.org/r/20230405224339.358675-2-eugene.shalygin@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:39 -07:00
James Seo
b0eb085b4f hwmon: fix typo in Makefile
Fix the spelling of "ACPI" in Makefile.

Signed-off-by: James Seo <james@equiv.tech>
Link: https://lore.kernel.org/r/20230405073056.53466-3-james@equiv.tech
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:39 -07:00
James Seo
38c92a3110 hwmon: remove trailing whitespace in Kconfig
Remove an unneeded trailing space.

Signed-off-by: James Seo <james@equiv.tech>
Link: https://lore.kernel.org/r/20230405073056.53466-2-james@equiv.tech
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:39 -07:00
Krzysztof Kozlowski
3bf8437be3 hwmon: w83773g: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:39 -07:00
Krzysztof Kozlowski
b418bd0a31 hwmon: w83627ehf: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:39 -07:00
Krzysztof Kozlowski
7325fea5a5 hwmon: tps23861: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:39 -07:00
Krzysztof Kozlowski
b39c94a1f6 hwmon: tmp513: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:39 -07:00
Krzysztof Kozlowski
98bc085cae hwmon: tmp464: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:39 -07:00
Krzysztof Kozlowski
1198c51f8f hwmon: tmp108: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:38 -07:00
Krzysztof Kozlowski
a705bc4688 hwmon: tmp103: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:38 -07:00
Krzysztof Kozlowski
fc3ad66804 hwmon: tmp102: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:38 -07:00
Krzysztof Kozlowski
5b5d8ae019 hwmon: sy7636a: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:38 -07:00
Krzysztof Kozlowski
dc8811447c hwmon: sparx5-temp: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:38 -07:00
Krzysztof Kozlowski
d302988c98 hwmon: smpro: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:38 -07:00
Krzysztof Kozlowski
7f46e9883f hwmon: sl28cpld: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:38 -07:00
Krzysztof Kozlowski
11c1dff58c hwmon: sht4x: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:38 -07:00
Krzysztof Kozlowski
1ff3d23d00 hwmon: sch5627: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:38 -07:00
Krzysztof Kozlowski
eeda3a4453 hwmon: sbtsi_temp: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:38 -07:00
Krzysztof Kozlowski
29423978b7 hwmon: sbrmi: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:38 -07:00
Krzysztof Kozlowski
70df9a5543 hwmon: raspberrypi: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:38 -07:00
Krzysztof Kozlowski
42d273bcf4 hwmon: powr1220: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:38 -07:00
Krzysztof Kozlowski
0c15d66d07 hwmon: peci: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:38 -07:00
Krzysztof Kozlowski
195030d34e hwmon: oxp-sensors: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:38 -07:00
Krzysztof Kozlowski
98ce1fc134 hwmon: nzxt: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:37 -07:00
Krzysztof Kozlowski
9add51f2bc hwmon: ntc_thermistor: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:37 -07:00
Krzysztof Kozlowski
ed30302c3b hwmon: npcm750-pwm: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:37 -07:00
Krzysztof Kozlowski
2a06edbe33 hwmon: nct7904: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:37 -07:00
Krzysztof Kozlowski
bb54a54b5c hwmon: mlxreg: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:37 -07:00
Krzysztof Kozlowski
d716e0cf67 hwmon: mcp3021: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:37 -07:00
Krzysztof Kozlowski
11305fd37b hwmon: mc34vr500: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:37 -07:00
Krzysztof Kozlowski
1c80f98754 hwmon: max6650: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:37 -07:00
Krzysztof Kozlowski
a7bae59766 hwmon: max6621: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:37 -07:00
Krzysztof Kozlowski
b3fcd02c60 hwmon: max6620: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:37 -07:00
Krzysztof Kozlowski
822ce415ba hwmon: max31790: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:37 -07:00
Krzysztof Kozlowski
02681a9f33 hwmon: max31760: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:37 -07:00
Krzysztof Kozlowski
c70164adbb hwmon: max31730: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:37 -07:00
Krzysztof Kozlowski
2b1aec842e hwmon: max127: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:37 -07:00
Krzysztof Kozlowski
894fce118b hwmon: ltq-cputemp: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:37 -07:00
Krzysztof Kozlowski
38ab6d602e hwmon: ltc4245: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:37 -07:00
Krzysztof Kozlowski
8cbafa6efe hwmon: ltc2992: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:36 -07:00
Krzysztof Kozlowski
53dc67eb93 hwmon: ltc2947: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:36 -07:00
Krzysztof Kozlowski
bf36b752ca hwmon: lochnagar: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:36 -07:00
Krzysztof Kozlowski
043f90c8d1 hwmon: lm95245: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:36 -07:00
Krzysztof Kozlowski
1d0cfeb2ea hwmon: lm95241: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:36 -07:00
Krzysztof Kozlowski
3c370243cb hwmon: lm83: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:36 -07:00
Krzysztof Kozlowski
3ee2ceca3f hwmon: lm75: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:36 -07:00
Krzysztof Kozlowski
2d9011813e hwmon: lan966x: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:36 -07:00
Krzysztof Kozlowski
55f4466382 hwmon: k8temp: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:36 -07:00
Krzysztof Kozlowski
4dd50f3c1d hwmon: k10temp: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:36 -07:00
Krzysztof Kozlowski
b3dc5eee6b hwmon: jc42: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:35 -07:00
Krzysztof Kozlowski
e374c4100b hwmon: intel-m10-bmc: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:35 -07:00
Krzysztof Kozlowski
3243997538 hwmon: ina3221: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:35 -07:00
Krzysztof Kozlowski
bf9b7f92df hwmon: ina238: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:35 -07:00
Krzysztof Kozlowski
92b978fe76 hwmon: i5500_temp: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:35 -07:00
Krzysztof Kozlowski
d6171e4d32 hwmon: gxp-fan: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:35 -07:00
Krzysztof Kozlowski
06c3779625 hwmon: ftsteutates: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:35 -07:00
Krzysztof Kozlowski
c1686de1db hwmon: emc2305: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:35 -07:00
Krzysztof Kozlowski
b9adb6b665 hwmon: drivetemp: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:35 -07:00
Krzysztof Kozlowski
f4ddd8f2e1 hwmon: dell-smm: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:35 -07:00
Krzysztof Kozlowski
42bd7a59f3 hwmon: corsair: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:35 -07:00
Krzysztof Kozlowski
edcde8cfef hwmon: bt1-pvt: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:34 -07:00
Krzysztof Kozlowski
a1e308bfae hwmon: axi-fan: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:34 -07:00
Krzysztof Kozlowski
69a1ffca98 hwmon: as370: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:34 -07:00
Krzysztof Kozlowski
832dc5106e hwmon: aquacomputer: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:34 -07:00
Krzysztof Kozlowski
b9ab28a774 hwmon: aht10: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:34 -07:00
Krzysztof Kozlowski
d7bb04c3e2 hwmon: adt7x10: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:34 -07:00
Krzysztof Kozlowski
ce94ff2ef9 hwmon: adt7470: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:34 -07:00
Krzysztof Kozlowski
07aa164a50 hwmon: adt7411: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:34 -07:00
Krzysztof Kozlowski
013adc9852 hwmon: adm9240: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:34 -07:00
Krzysztof Kozlowski
63bde65918 hwmon: adm1177: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:34 -07:00
Denis Pauk
a4fffe48e4 hwmon: (nct6775) update ASUS WMI monitoring list B360/H410/H610/Z390...
Boards such as
* EX-B460M-V5,
* EX-H410M-V3,
* PRIME B360M-D,
* PRIME B360M-K,
* PRIME H410M-A,
* PRIME H410M-D,
* PRIME H410M-E,
* PRIME H410M-F,
* PRIME H410M-K,
* PRIME H410M-K R2.0,
* PRIME H510M-K R2.0,
* PRIME Z390-A,
* PRIME Z390-A/H10,
* PRIME Z390-P,
* PRIME Z390M-PLUS,
* PRIME Z490-A,
* PRIME Z490-P,
* PRIME Z490-V,
* PRIME Z490M-PLUS,
* PRO B460M-C,
* PRO H410M-C,
* ROG MAXIMUS XI APEX,
* ROG MAXIMUS XI CODE,
* ROG MAXIMUS XI EXTREME,
* ROG MAXIMUS XI FORMULA,
* ROG MAXIMUS XI GENE,
* ROG MAXIMUS XI HERO,
* ROG MAXIMUS XI HERO (WI-FI),
* ROG MAXIMUS XII APEX,
* ROG MAXIMUS XII EXTREME,
* ROG MAXIMUS XII FORMULA,
* ROG MAXIMUS XII HERO (WI-FI),
* ROG STRIX B460-F GAMING,
* ROG STRIX B460-G GAMING,
* ROG STRIX B460-H GAMING,
* ROG STRIX B460-I GAMING,
* TUF GAMING B460-PLUS,
* TUF GAMING B460-PRO (WI-FI),
* TUF GAMING B460M-PLUS,
* TUF GAMING B460M-PLUS (WI-FI),
* TUF GAMING B460M-PRO,
* TUF GAMING B550-PLUS (WI-FI),
* TUF GAMING B550M ZAKU (WI-FI),
* TUF Z390-PLUS GAMING,
* TUF Z390-PLUS GAMING (WI-FI),
* TUF Z390-PRO GAMING,
* TUF Z390M-PRO GAMING,
* TUF Z390M-PRO GAMING (WI-FI),
* WS Z390 PRO,
* B560M-P,
* EX-B560M-V5,
* EX-H510M-V3,
* EX-H610M-V3 D4,
* PRIME B560-PLUS,
* PRIME B560-PLUS AC-HES,
* PRIME B560M-A,
* PRIME B560M-A AC,
* PRIME B560M-K,
* PRIME B660-PLUS D4,
* PRIME H510M-A,
* PRIME H510M-A WIFI,
* PRIME H510M-D,
* PRIME H510M-E,
* PRIME H510M-F,
* PRIME H510M-K,
* PRIME H610I-PLUS D4,
* PRIME H610M-A D4,
* PRIME H610M-A WIFI D4,
* PRIME H610M-D D4,
* PRIME H610M-E D4,
* PRIME H610M-F D4,
* PRIME H610M-K D4,
* PRIME Z690-A,
* PRIME Z690-P,
* PRIME Z690-P D4,
* PRIME Z690-P WIFI,
* PRIME Z690-P WIFI D4,
* PRIME Z690M-PLUS D4,
* PRIME Z790-A WIFI,
* PRIME Z790-P,
* PRIME Z790-P D4,
* PRIME Z790-P WIFI,
* PRIME Z790-P WIFI D4,
* PRIME Z790M-PLUS,
* PRIME Z790M-PLUS D4,
* Pro B560M-C,
* Pro B560M-CT,
* Pro H510M-C,
* Pro H510M-CT,
* Pro H610M-C,
* Pro H610M-C D4,
* Pro H610M-CT D4,
* Pro H610T D4,
* ProArt Z690-CREATOR WIFI,
* ROG MAXIMUS Z690 HERO EVA,
* ROG MAXIMUS Z790 APEX,
* ROG MAXIMUS Z790 HERO,
* ROG STRIX B560-A GAMING WIFI,
* ROG STRIX B560-E GAMING WIFI,
* ROG STRIX B560-F GAMING WIFI,
* ROG STRIX B560-G GAMING WIFI,
* ROG STRIX B560-I GAMING WIFI,
* ROG STRIX Z690-A GAMING WIFI,
* ROG STRIX Z690-I GAMING WIFI,
* ROG STRIX Z790-A GAMING WIFI,
* ROG STRIX Z790-A GAMING WIFI D4,
* ROG STRIX Z790-E GAMING WIFI,
* ROG STRIX Z790-F GAMING WIFI,
* ROG STRIX Z790-H GAMING WIFI,
* ROG STRIX Z790-I GAMING WIFI,
* TUF GAMING B560-PLUS WIFI,
* TUF GAMING B560M-E,
* TUF GAMING B560M-PLUS,
* TUF GAMING B560M-PLUS WIFI,
* TUF GAMING Z690-PLUS,
* TUF GAMING Z690-PLUS D4,
* TUF GAMING Z690-PLUS WIFI,
* TUF GAMING Z690-PLUS WIFI D4,
* TUF GAMING Z790-PLUS D4,
* TUF GAMING Z790-PLUS WIFI,
* TUF GAMING Z790-PLUS WIFI D4,
have got a nct6775 chip, but by default there's no use of it
because of resource conflict with WMI method.

This commit adds such boards to the WMI monitoring list.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=204807
Signed-off-by: Denis Pauk <pauk.denis@gmail.com>
Tested-by: Alejandro González <alejandro.gonzalez.correo@gmail.com>
Tested-by: bruno <bmilreu@gmail.com>
Tested-by: renedis <renedis@hotmail.com>
Link: https://lore.kernel.org/r/20230323212751.2474-3-pauk.denis@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:33 -07:00
Denis Pauk
c05403e64d hwmon: (nct6775) Fix ROG B550-XE WIFI and Pro B660M-C D4 names
ROG STRIX B550-XE GAMING WIFI motherboard is incorrectly named as
ROG STRIX B550-XE GAMING (WI-FI).

Pro B660M-C D4 motherboard is incorrectly named as
Pro B660M-C-D4.

Validated by dmidecode output from https://github.com/linuxhw/DMI/

Link: https://bugzilla.kernel.org/show_bug.cgi?id=204807
Signed-off-by: Denis Pauk <pauk.denis@gmail.com>
Link: https://lore.kernel.org/r/20230323212751.2474-2-pauk.denis@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:33 -07:00
Denis Pauk
0282592678 hwmon: (nct6775) Sort ASUS board list
Rearrange board list in alphabetical order by: LC_ALL=C sort -u

Link: https://bugzilla.kernel.org/show_bug.cgi?id=204807
Signed-off-by: Denis Pauk <pauk.denis@gmail.com>
Link: https://lore.kernel.org/r/20230323212751.2474-1-pauk.denis@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:33 -07:00
Tom Rix
8ea57c51e5 hwmon: remove unused superio_outb function
clang with W=1 reports
drivers/hwmon/vt1211.c:198:20: error: unused function
  'superio_outb' [-Werror,-Wunused-function]
static inline void superio_outb(int sio_cip, int reg, int val)
                   ^
This function is not used so remove it.

Signed-off-by: Tom Rix <trix@redhat.com>
Acked-by: Juerg Haefliger <juergh@proton.me>
Link: https://lore.kernel.org/r/20230323211535.2637939-1-trix@redhat.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:33 -07:00
Lorenz Brun
a7da8a8bf1 hwmon: (pwm-fan) set usage_power on PWM state
PWM fans are controlled solely by the duty cycle of the PWM signal, they
do not care about the exact timing. Thus set usage_power to true to
allow less flexible hardware to work as a PWM source for fan control.

Signed-off-by: Lorenz Brun <lorenz@brun.one>
Link: https://lore.kernel.org/r/20230309011009.2109696-1-lorenz@brun.one
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:33 -07:00
Frank Crawford
dedbe4c149 hwmon: (it87) Use voltage scaling macro where appropriate
Apply scaling macro to match the labels for internal voltage sensors.

Signed-off-by: Frank Crawford <frank@crawford.emu.id.au>
Link: https://lore.kernel.org/r/20230318080543.1226700-3-frank@crawford.emu.id.au
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:33 -07:00
Denis Pauk
bcd2fbec8a hwmon: (nct6775) update ASUS WMI monitoring list A520/B360/B460/B550...
Boards such as
* EX-B660M-V5 D4,
* PRIME A520M-A,
* PRIME A520M-A II,
* PRIME A520M-E,
* PRIME A520M-K,
* PRIME B360M-A,
* PRIME B360M-C,
* PRIME B460M-A R2.0,
* PRIME B550M-A AC,
* PRIME B550M-A WIFI II,
* PRIME B550M-K,
* PRIME B650M-A AX II,
* PRIME Z590-P WIFI,
* PRIME Z590-V,
* Pro A520M-C,
* ProArt B650-CREATOR,
* ProArt Z790-CREATOR WIFI,
* Pro B660M-C,
* Pro WS W680-ACE,
* Pro WS W680-ACE IPMI,
* ROG MAXIMUS XIII APEX,
* ROG MAXIMUS XIII EXTREME,
* ROG MAXIMUS XIII HERO,
* ROG MAXIMUS Z690 APEX,
* ROG MAXIMUS Z790 EXTREME,
* ROG STRIX B660-A GAMING WIFI,
* ROG STRIX Z590-A GAMING WIFI,
* ROG STRIX Z590-E GAMING WIFI,
* ROG STRIX Z590-F GAMING WIFI,
* ROG STRIX Z590-I GAMING WIFI,
* TUF GAMING A520M-PLUS,
* TUF GAMING A520M-PLUS II,
* TUF GAMING A520M-PLUS WIFI,
* TUF GAMING B660M-E D4,
* TUF GAMING B660-PLUS WIFI D4,
* TUF GAMING X570-PLUS_BR,
* TUF GAMING Z590-PLUS,
* Z490-GUNDAM (WI-FI),
* Z590 WIFI GUNDAM EDITION
have got a nct6775 chip, but by default there's no use of it
because of resource conflict with WMI method.

This commit adds such boards to the WMI monitoring list.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=204807
Signed-off-by: Denis Pauk <pauk.denis@gmail.com>
Tested-by: Nick Owens <mischief@offblast.org>
Tested-by: A. M. <de99like@mennucci.debian.net>
Link: https://lore.kernel.org/r/20230315225128.1236-1-pauk.denis@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:33 -07:00
Denis Pauk
23e8a379cf hwmon: (nct6775) Fix TUF GAMING B550M-E WIFI name
TUF GAMING B550M-E WIFI motherboard is incorrectly named as
TUF GAMING B550M-E (WI-FI).

Validated by dmidecode output from https://github.com/linuxhw/DMI/

Link: https://bugzilla.kernel.org/show_bug.cgi?id=204807
Signed-off-by: Denis Pauk <pauk.denis@gmail.com>
Link: https://lore.kernel.org/r/20230315210135.2155-1-pauk.denis@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:33 -07:00
Holger Kiehl
ea00552690 hwmon: (nct6775) add Asus Pro A520M-C II/CSM
An NCT6798D chip is now detected:

   dmesg|grep nct6775
   [   23.765392] nct6775: Found NCT6798D or compatible chip at 0x2e:0x290

And sensors now shows:

   nct6798-isa-0290
   Adapter: ISA adapter
   in0:                      312.00 mV (min =  +0.00 V, max =  +1.74 V)
   in1:                        1.02 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
   in2:                        3.42 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
   in3:                        3.38 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
   in4:                        1.03 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
   in5:                        1.02 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
   in6:                      200.00 mV (min =  +0.00 V, max =  +0.00 V)  ALARM
   in7:                        3.42 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
   in8:                        3.28 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
   in9:                      920.00 mV (min =  +0.00 V, max =  +0.00 V)  ALARM
   in10:                     512.00 mV (min =  +0.00 V, max =  +0.00 V)  ALARM
   in11:                     504.00 mV (min =  +0.00 V, max =  +0.00 V)  ALARM
   in12:                       1.03 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
   in13:                     256.00 mV (min =  +0.00 V, max =  +0.00 V)  ALARM
   in14:                       1.47 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
   fan1:                        0 RPM  (min =    0 RPM)
   fan2:                        0 RPM  (min =    0 RPM)
   fan3:                      355 RPM  (min =    0 RPM)
   fan7:                        0 RPM  (min =    0 RPM)
   SYSTIN:                    +25.0°C  (high = +80.0°C, hyst = +75.0°C)  sensor = thermistor
   CPUTIN:                    +26.5°C  (high = +80.0°C, hyst = +75.0°C)  sensor = thermistor
   AUXTIN0:                   +97.0°C    sensor = thermistor
   AUXTIN1:                   +25.0°C    sensor = thermistor
   AUXTIN2:                   +25.0°C    sensor = thermistor
   AUXTIN3:                    +1.0°C    sensor = thermistor
   PECI Agent 0 Calibration:  +26.0°C
   PCH_CHIP_CPU_MAX_TEMP:      +0.0°C
   PCH_CHIP_TEMP:              +0.0°C
   PCH_CPU_TEMP:               +0.0°C
   TSI0_TEMP:                 +27.9°C
   intrusion0:               ALARM
   intrusion1:               OK
   beep_enable:              disabled

Signed-off-by: Holger Kiehl <holger.kiehl@dwd.de>
Tested-by: Holger Kiehl <holger.kiehl@dwd.de>

Link: https://lore.kernel.org/r/868bdc4f-9d45-475c-963e-f5232a8b95@praktifix.dwd.de
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:33 -07:00
Patrick Rudolph
f469bde9af hwmon: (pmbus/core) Notify hwmon events
Notify hwmon events using the pmbus irq handler.

Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Signed-off-by: Naresh Solanki <naresh.solanki@9elements.com>
Link: https://lore.kernel.org/r/20230301164434.1928237-4-Naresh.Solanki@9elements.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:32 -07:00
Patrick Rudolph
221819ca4c hwmon: (pmbus/core) Add interrupt support
Implement PMBUS irq handler.

Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Signed-off-by: Naresh Solanki <naresh.solanki@9elements.com>
Link: https://lore.kernel.org/r/20230301164434.1928237-3-Naresh.Solanki@9elements.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:32 -07:00
Naresh Solanki
df5f6b6af0 hwmon: (pmbus/core) Generalise pmbus get status
Add function pmbus get status that can be used to get both pmbus
specific status & regulator status

Signed-off-by: Naresh Solanki <naresh.solanki@9elements.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
...
Change in V4
- None
Changes in V3:
- Add pmbus_is_enabled function
Changes in V2:
- Add __maybe attribute for pmbus_get_status function
- Remove unrelated changes
Link: https://lore.kernel.org/r/20230301164434.1928237-2-Naresh.Solanki@9elements.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:32 -07:00
Naresh Solanki
7ab0da3a77 hwmon: (pmbus/core) Generalize pmbus status flag map
The PMBus status flag map(pmbus_regulator_status_flag_map) is moved
outside of the regulator #if block and the associated variable/struct
name updated to reflect as generic PMBus status.

This will make the PMBus status flag map more versatile and easier to
incorporate into different contexts and functions.

Signed-off-by: Naresh Solanki <naresh.solanki@9elements.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20230301164434.1928237-1-Naresh.Solanki@9elements.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:32 -07:00
Leonard Anderweit
bd1e92f997 hwmon: (aquacomputer_d5next) Add fan PWM control for Aquaero
Add the option to control fan PWM on Aquacomputer Aquaero. The Aquaero is
the most complex Aquacomputer device, control is therefore more complicated
then on already supported devices.
Setting PWM requires multiple steps. First, an internal static PWM
controller is set to the desired PWM value. Second, the fan is set to use
that PWM controller. Last, the minimum and maximum accepted PWM values
of the fan are set to allow all possible PWM values.

Signed-off-by: Leonard Anderweit <leonard.anderweit@gmail.com>
Link: https://lore.kernel.org/r/20230214220221.15003-7-leonard.anderweit@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:32 -07:00
Leonard Anderweit
866e630a3b hwmon: (aquacomputer_d5next) Add temperature offset control for Aquaero
Adds control over the Aquacomputer Aquaero temperature offset for all eight
temperature sensors.

Signed-off-by: Leonard Anderweit <leonard.anderweit@gmail.com>
Link: https://lore.kernel.org/r/20230214220221.15003-6-leonard.anderweit@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:32 -07:00
Leonard Anderweit
6c83ccb10c hwmon: (aquacomputer_d5next) Add infrastructure for Aquaero control reports
Add information on the Aquacomputer Aquaero control report and disable the
control report checksum for Aquaero. The Aquaero does not use the checksum
so it must be disabled to avoid overwriting the last two bytes of the
control report.

Signed-off-by: Leonard Anderweit <leonard.anderweit@gmail.com>
Link: https://lore.kernel.org/r/20230214220221.15003-5-leonard.anderweit@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:32 -07:00
Leonard Anderweit
b29090bac9 hwmon: (aquacomputer_d5next) Device dependent control report settings
Add device dependent control report id, secondary control report id,
secondary control report size and secondary control report for devices
which need different control report settings. All currently supported
devices use the same values.

Signed-off-by: Leonard Anderweit <leonard.anderweit@gmail.com>
Link: https://lore.kernel.org/r/20230214220221.15003-4-leonard.anderweit@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:32 -07:00
Leonard Anderweit
4d09d155a5 hwmon: (aquacomputer_d5next) Support writing multiple control values at once
Add new function aqc_set_ctrl_vals() to support changing multiple control
values at once while sending only one control report.

Signed-off-by: Leonard Anderweit <leonard.anderweit@gmail.com>
Link: https://lore.kernel.org/r/20230214220221.15003-3-leonard.anderweit@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:32 -07:00
Leonard Anderweit
d0450fc1e3 hwmon: (aquacomputer_d5next) Support one byte control values
Add support for one byte control values. This extends aqc_set_ctrl_val()
and aqc_get_ctrl_val() with a type. Currently supported types are AQC_8
(one byte) and AQC_BE16 (two bytes big endian). More types will be added
in the future.

Signed-off-by: Leonard Anderweit <leonard.anderweit@gmail.com>
Link: https://lore.kernel.org/r/20230214220221.15003-2-leonard.anderweit@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:31 -07:00
Erik Ekman
90b86248d3 hwmon: (nct6775) ASUS PRIME Z590 boards support
Tested on Z590M-PLUS.

dmesg log:
nct6775: Found NCT6798D or compatible chip at 0x2e:0x290

sensors output:
nct6798-isa-0290
Adapter: ISA adapter
in0:                      672.00 mV (min =  +0.00 V, max =  +1.74 V)
in1:                      1000.00 mV (min =  +0.00 V, max =  +0.00 V)  ALARM
in2:                        3.38 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in3:                        3.28 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in4:                        1.01 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in5:                      808.00 mV (min =  +0.00 V, max =  +0.00 V)  ALARM
in6:                      1000.00 mV (min =  +0.00 V, max =  +0.00 V)  ALARM
in7:                        3.38 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in8:                        3.20 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in9:                      528.00 mV (min =  +0.00 V, max =  +0.00 V)  ALARM
in10:                     672.00 mV (min =  +0.00 V, max =  +0.00 V)  ALARM
in11:                     528.00 mV (min =  +0.00 V, max =  +0.00 V)  ALARM
in12:                       1.21 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in13:                     992.00 mV (min =  +0.00 V, max =  +0.00 V)  ALARM
in14:                       1.02 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
fan1:                      971 RPM  (min =    0 RPM)
fan2:                     1525 RPM  (min =    0 RPM)
fan3:                        0 RPM  (min =    0 RPM)
fan4:                     1094 RPM  (min =    0 RPM)
fan5:                        0 RPM  (min =    0 RPM)
fan6:                        0 RPM  (min =    0 RPM)
fan7:                        0 RPM  (min =    0 RPM)
SYSTIN:                    +36.0°C  (high = +80.0°C, hyst = +75.0°C)  sensor = thermistor
CPUTIN:                    +40.0°C  (high = +80.0°C, hyst = +75.0°C)  sensor = thermistor
AUXTIN0:                   +26.0°C    sensor = thermistor
AUXTIN1:                    +8.0°C    sensor = thermistor
AUXTIN2:                   +22.0°C    sensor = thermistor
AUXTIN3:                   +25.0°C    sensor = thermistor
PECI Agent 0 Calibration:  +40.0°C
PCH_CHIP_CPU_MAX_TEMP:      +0.0°C
PCH_CHIP_TEMP:             +55.0°C
PCH_CPU_TEMP:               +0.0°C
intrusion0:               OK
intrusion1:               ALARM
beep_enable:              disabled

Signed-off-by: Erik Ekman <erik@kryo.se>
Link: https://lore.kernel.org/r/20230227090312.91091-1-erik@kryo.se
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:31 -07:00
Kang Chen
92e58a87a2 hwmon: (g762) add a check of devm_add_action in g762_of_clock_enable
devm_add_action may fails, check it and do the cleanup.

Signed-off-by: Kang Chen <void0red@gmail.com>
Link: https://lore.kernel.org/r/20230227030913.893004-1-void0red@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:31 -07:00
Kang Chen
dbfeafdad3 hwmon: (nzxt-smart2) handle failure of devm_add_action in nzxt_smart2_hid_probe
1. replace the devm_add_action with devm_add_action_or_reset to ensure
the mutex lock can be destroyed when it fails.
2. use local wrapper function mutex_fini instead of mutex_destroy to
avoid undefined behaviours.
3. add a check of devm_add_action_or_reset and return early when it fails.

Link: https://lore.kernel.org/all/f5043281-9b3e-e454-16fe-ef4cde36dfdb@roeck-us.net
Signed-off-by: Kang Chen <void0red@gmail.com>
Link: https://lore.kernel.org/r/20230227091534.907101-1-void0red@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:31 -07:00
Rob Herring
914b2fd2cd hwmon: (ibmpowernv, pwm-fan) Use of_property_present() for testing DT property presence
It is preferred to use typed property access functions (i.e.
of_property_read_<type> functions) rather than low-level
of_get_property/of_find_property functions for reading properties. As
part of this, convert of_get_property/of_find_property calls to the
recently added of_property_present() helper when we just want to test
for presence of a property and nothing more.

Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230310144706.1542434-1-robh@kernel.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:31 -07:00
Rob Herring
50c3480b6d hwmon: (ltc4245) Use of_property_read_bool() for boolean properties
It is preferred to use typed property access functions (i.e.
of_property_read_<type> functions) rather than low-level
of_get_property/of_find_property functions for reading properties.
Convert reading boolean properties to of_property_read_bool().

Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230310144707.1542525-1-robh@kernel.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:31 -07:00
Andy Shevchenko
08d40c1d57 hwmon: (nct6775) Drop unneeded casting and conjunction
The 64-bit result will be cut to 32-bit automatically (by compiler)
due to the type of the destination value. No need to have an explicit
casting and especially additional conjunction which does the same.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230217191600.24837-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:31 -07:00
Aleksandr Mezin
4a148e9b1e hwmon: (nzxt-smart2) add another USB ID
This seems to be a new revision of the device. RGB controls have changed,
but this driver doesn't touch them anyway.

Fan speed control reported to be working with existing userspace (hidraw)
software, so I assume it's compatible. Fan channel count is the same.

Recently added (0x1e71, 0x2019) seems to be the same device.

Discovered in liquidctl project:

https://github.com/liquidctl/liquidctl/issues/541

Signed-off-by: Aleksandr Mezin <mezin.alexander@gmail.com>
Link: https://lore.kernel.org/r/20230219105924.333007-1-mezin.alexander@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:31 -07:00
Krzysztof Kozlowski
8107fe9389 hwmon: (gpio-fan) drop of_match_ptr for ID table
The driver can match only via the DT table so the table should be always
used and the of_match_ptr does not have any sense (this also allows ACPI
matching via PRP0001, even though it might not be relevant here).  This
also fixes !CONFIG_OF error:

  drivers/hwmon/gpio-fan.c:484:34: error: ‘of_gpio_fan_match’ defined but not used [-Werror=unused-const-variable=]

Note(groeck): The build error is only seen if Kconfig dependencies
are messed up. The driver depends on OF_GPIO which should depend
on OF. This was temporarily broken in linux-next, and it was
possible to select CONFIG_OF=n and CONFIG_SENSORS_GPIO_FAN=y.
Nevertheless, this is a sensible fix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230312193723.478032-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:08:31 -07:00
Guenter Roeck
629f57a7d5 Merge branch 'hwmon-const' into HEAD 2023-04-19 07:08:24 -07:00
Babu Moger
0c07238534 hwmon: (k10temp) Check range scale when CUR_TEMP register is read-write
Spec says, when CUR_TEMP_TJ_SEL == 3 and CUR_TEMP_RANGE_SEL == 0,
it should use RangeUnadjusted is 0, which is (CurTmp*0.125 -49) C. The
CUR_TEMP register is read-write when CUR_TEMP_TJ_SEL == 3 (bit 17-16).

Add the check to detect it.

Sensors command's output before the patch.
$sensors
 k10temp-pci-00c3
 Adapter: PCI adapter
 Tctl:         +76.6°C <- Wrong value
 Tccd1:        +26.5°C
 Tccd2:        +27.5°C
 Tccd3:        +27.2°C
 Tccd4:        +27.5°C
 Tccd5:        +26.0°C
 Tccd6:        +26.2°C
 Tccd7:        +25.0°C
 Tccd8:        +26.5°C

Sensors command's output after the patch.
$sensors
 k10temp-pci-00c3
 Adapter: PCI adapter
 Tctl:         +28.8°C <- corrected value
 Tccd1:        +27.5°C
 Tccd2:        +28.5°C
 Tccd3:        +28.5°C
 Tccd4:        +28.5°C
 Tccd5:        +27.0°C
 Tccd6:        +27.5°C
 Tccd7:        +27.0°C
 Tccd8:        +27.5°C

Signed-off-by: Babu Moger <babu.moger@amd.com>
Fixes: 1b59788979 ("hwmon: (k10temp) Add temperature offset for Ryzen 2700X")
Link: https://lore.kernel.org/r/20230413213958.847634-1-babu.moger@amd.com
Cc: stable@vger.kernel.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-19 07:06:38 -07:00
Krzysztof Kozlowski
d8cc9415a4 hwmon: constify pointers to hwmon_channel_info
HWmon core receives an array of pointers to hwmon_channel_info and it
does not modify it, thus it can be array of const pointers for safety.
This allows drivers to make them also const.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-04-07 08:45:17 -07:00
Greg Kroah-Hartman
2243acd50a driver core: class: remove struct class_interface * from callbacks
The add_dev and remove_dev callbacks in struct class_interface currently
pass in a pointer back to the class_interface structure that is calling
them, but none of the callback implementations actually use this pointer
as it is pointless (the structure is known, the driver passed it in in
the first place if it is really needed again.)

So clean this up and just remove the pointer from the callbacks and fix
up all callback functions.

Cc: Jean Delvare <jdelvare@suse.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Paolo Abeni <pabeni@redhat.com>
Cc: Kurt Schwemmer <kurt.schwemmer@microsemi.com>
Cc: Jon Mason <jdmason@kudzu.us>
Cc: Dave Jiang <dave.jiang@intel.com>
Cc: Allen Hubbe <allenbh@gmail.com>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: Matt Porter <mporter@kernel.crashing.org>
Cc: Alexandre Bounine <alex.bou9@gmail.com>
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Doug Gilbert <dgilbert@interlog.com>
Cc: John Stultz <jstultz@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Stephen Boyd <sboyd@kernel.org>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Wang Weiyang <wangweiyang2@huawei.com>
Cc: Yang Yingliang <yangyingliang@huawei.com>
Cc: Jakob Koschel <jakobkoschel@gmail.com>
Cc: Cai Xinchen <caixinchen1@huawei.com>
Acked-by: Rafael J. Wysocki <rafael@kernel.org>
Acked-by: Logan Gunthorpe <logang@deltatee.com>
Link: https://lore.kernel.org/r/2023040250-pushover-platter-509c@gregkh
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-03 21:42:52 +02:00
Greg Kroah-Hartman
cd8fe5b6db Merge 6.3-rc5 into driver-core-next
We need the fixes in here for testing, as well as the driver core
changes for documentation updates to build on.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-03 09:33:30 +02:00
Rafael J. Wysocki
d4d8516624 Merge back Intel thermal driver changes for 6.4-rc1. 2023-03-31 19:32:43 +02:00
Rafael J. Wysocki
ce07727aff Merge back thermal control material for 6.4-rc1. 2023-03-27 13:46:13 +02:00
Frank Crawford
968b66ffeb hwmon (it87): Fix voltage scaling for chips with 10.9mV ADCs
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>
2023-03-21 19:14:55 -07:00
Tianyi Jing
813cc94c78 hwmon: (xgene) Fix ioremap and memremap leak
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>
2023-03-21 07:50:24 -07:00
Phinex Hung
2315332efc hwmon: fix potential sensor registration fail if of_node is missing
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>
2023-03-21 07:45:33 -07:00
Iwona Winiarska
2b91c4a870 hwmon: (peci/cputemp) Fix miscalculated DTS for SKX
For Skylake, DTS temperature of the CPU is reported in S10.6 format
instead of S8.8.

Reported-by: Paul Fertser <fercerpav@gmail.com>
Link: https://lore.kernel.org/lkml/ZBhHS7v+98NK56is@home.paul.comp/
Signed-off-by: Iwona Winiarska <iwona.winiarska@intel.com>
Link: https://lore.kernel.org/r/20230321090410.866766-1-iwona.winiarska@intel.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-03-21 07:39:20 -07:00
Greg Kroah-Hartman
10a03c36b7 drivers: remove struct module * setting from struct class
There is no need to manually set the owner of a struct class, as the
registering function does it automatically, so remove all of the
explicit settings from various drivers that did so as it is unneeded.

This allows us to remove this pointer entirely from this structure going
forward.

Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Link: https://lore.kernel.org/r/20230313181843.1207845-2-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-17 15:16:27 +01:00
Lars-Peter Clausen
ab00709310 hwmon: (ltc2992) Set can_sleep flag for GPIO chip
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>
2023-03-15 19:15:00 -07:00
Lars-Peter Clausen
a5bb73b3f5 hwmon: (adm1266) Set can_sleep flag for GPIO chip
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>
2023-03-15 19:14:04 -07:00
Krzysztof Kozlowski
00d85e8179 hwmon: tmp512: drop of_match_ptr for ID table
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>
2023-03-12 14:14:16 -07:00
Lars-Peter Clausen
8d655e6523 hwmon: (ucd90320) Add minimum delay between bus accesses
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>
2023-03-12 14:05:40 -07:00
Marcus Folkesson
c93f5e2ab5 hwmon: (ina3221) return prober error code
ret is set to 0 which do not indicate an error.
Return -EINVAL instead.

Fixes: a9e9dd9c6d ("hwmon: (ina3221) Read channel input source info from DT")
Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
Link: https://lore.kernel.org/r/20230310075035.246083-1-marcus.folkesson@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2023-03-12 11:13:25 -07:00
Zheng Wang
cb090e64cf hwmon: (xgene) Fix use after free bug in xgene_hwmon_remove due to race condition
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>
2023-03-12 11:13:25 -07:00
Tony O'Brien
48e8186870 hwmon: (adt7475) Fix masking of hysteresis registers
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>
2023-03-05 15:08:06 -08:00
Tony O'Brien
5f8d1e3b6f hwmon: (adt7475) Display smoothing attributes in correct order
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>
2023-03-05 15:08:06 -08:00
Daniel Lezcano
3034f859b9 thermal: Add a thermal zone id accessor
In order to get the thermal zone id but without directly accessing the
thermal zone device structure, add an accessor.

Use the accessor in the hwmon_scmi and acpi_thermal.

No functional change intented.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2023-03-03 20:45:02 +01:00
Daniel Lezcano
0ce637a546 thermal/core: Use the thermal zone 'devdata' accessor in hwmon located drivers
The thermal zone device structure is exposed to the different drivers
and obviously they access the internals while that should be
restricted to the core thermal code.

In order to self-encapsulate the thermal core code, we need to prevent
the drivers accessing directly the thermal zone structure and provide
accessor functions to deal with.

Use the devdata accessor introduced in the previous patch.

No functional changes intended.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Guenter Roeck <linux@roeck-us.net> #hwmon
Acked-by: Mark Brown <broonie@kernel.org>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2023-03-03 20:45:02 +01:00
Linus Torvalds
c2c23dc7d5 - Core Frameworks
- 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
  ...
2023-02-23 15:03:05 -08:00
Linus Torvalds
8762069330 SCSI misc on 20230222
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
  ...
2023-02-22 13:41:41 -08:00