Commit Graph

1279449 Commits

Author SHA1 Message Date
Alex Vdovydchenko
cd228e7b65 hwmon: add MP5920 driver
Add support for MPS Hot-Swap controller mp5920. This driver exposes
telemetry and limit value readings and writings.

Signed-off-by: Alex Vdovydchenko <xzeol@yahoo.com>
Reviewed-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://lore.kernel.org/r/20240702115252.981416-3-xzeol@yahoo.com
[groeck: Use min_t() to limit length of displayed model string]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-07-02 12:36:31 -07:00
Alex Vdovydchenko
a50fbf8a52 dt-bindings: hwmon: Add MPS mp5920
Add support for MPS mp5920 controller

Signed-off-by: Alex Vdovydchenko <xzeol@yahoo.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20240702115252.981416-2-xzeol@yahoo.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-07-02 12:29:24 -07:00
Javier Carrasco
f642714b78 hwmon: (tps23861) Constify struct regmap_config
`tps23861_regmap_config` is not modified and can be declared as const to
move its data to a read-only section.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://lore.kernel.org/r/20240702-hwmon-const-regmap-v1-3-63f6d4765fe0@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-07-02 11:31:30 -07:00
Javier Carrasco
4bc82dd20b hwmon: (tmp513) Constify struct regmap_config
`tmp51x_regmap_config` is not modified and can be declared as const to
move its data to a read-only section.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://lore.kernel.org/r/20240702-hwmon-const-regmap-v1-2-63f6d4765fe0@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-07-02 11:31:02 -07:00
Javier Carrasco
9d047eb05c hwmon: (ina238) Constify struct regmap_config
`ina238_regmap_config` is not modified and can be declared as const to
move its data to a read-only section.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://lore.kernel.org/r/20240702-hwmon-const-regmap-v1-1-63f6d4765fe0@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-07-02 11:30:10 -07:00
Wayne Tung
39b24cced7 hwmon: (adt7475) Fix default duty on fan is disabled
According to the comments on fan is disabled, we change to manual mode
and set the duty cycle to 0.
For setting the duty cycle part, the register is wrong. Fix it.

Fixes: 1c301fc539 ("hwmon: Add a driver for the ADT7475 hardware monitoring chip")
Signed-off-by: Wayne Tung <chineweff@gmail.com>
Link: https://lore.kernel.org/r/20240701073252.317397-1-chineweff@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-07-01 15:45:57 -07:00
Guenter Roeck
b3e992f69c hwmon: (jc42) Strengthen detect function
Configuration register bit 5 must read 0 for all JC42.4 compliant chips.
Several capability register bits must be set for all TSE2004 compliant
chips. Use that information to strengthen the detect function.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-06-30 13:15:26 -07:00
Guenter Roeck
c98cf41dfb hwmon: (jc42) Use common device ID for TSE2004av compliant sensors
TSE2004av standardizes the device ID of compliant temperature sensors to
be 0x22xx, where xx is the device revision. Use a single define for all
TSE2004av compliant temperature sensors, and relax the device id mask to
match the upper 8 bit of the device id register.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-06-30 13:15:23 -07:00
Armin Wolf
ef8df816ee hwmon: (dell-smm) Add Dell OptiPlex 7060 to DMI table
The BIOS on this machine is buggy and will in some cases return
an error when trying to get the fan state, but reading of the
RPM values and the temperature sensors still works.

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

Signed-off-by: Noah Wang <noahwang.wang@outlook.com>
Link: https://lore.kernel.org/r/SEYPR04MB64828A352836982C0184AA10FAD62@SEYPR04MB6482.apcprd04.prod.outlook.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-06-28 10:27:47 -07:00
Noah Wang
45158b93d0 dt-bindings: hwmon: Add MPS mp2891
Add support for MPS mp2891 controller

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Noah Wang <noahwang.wang@outlook.com>
Link: https://lore.kernel.org/r/SEYPR04MB6482BC95D1242A5675FF9DAEFAD62@SEYPR04MB6482.apcprd04.prod.outlook.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-06-28 10:25:30 -07:00
Sean Anderson
52c1e818d6 hwmon: iio: Use iio_read_channel_processed_scale for IIO_POWER
Instead of rescaling power channels after the fact, use the dedicated
scaling API. This should reduce any inaccuracies resulting from the
scaling.

Signed-off-by: Sean Anderson <sean.anderson@linux.dev>
Link: https://lore.kernel.org/r/20240620212005.821805-1-sean.anderson@linux.dev
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-06-21 08:09:32 -07:00
Guenter Roeck
1226a1b2e5 hwmon: (spd5118) Add support for Renesas/ITD SPD5118 hub controllers
The SPD5118 specification says, in its documentation of the page bits
in the MR11 register:

"
This register only applies to non-volatile memory (1024) Bytes) access of
SPD5 Hub device.
For volatile memory access, this register must be programmed to '000'.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
"

Renesas/ITD SPD5118 hub controllers take this literally and disable access
to volatile memory if the page selected in MR11 is != 0. Since the BIOS or
ROMMON will access the non-volatile memory and likely select a page != 0,
this means that the driver will not instantiate since it can not identify
the chip. Even if the driver instantiates, access to volatile registers
is blocked after a nvram read operation which selects a page other than 0.

To solve the problem, add initialization code to select page 0 during
probe. Before doing that, use basic validation to ensure that this is
really a SPD5118 device and not some random EEPROM.

Cc: Sasha Kozachuk <skozachuk@google.com>
Cc: John Hamrick <johnham@google.com>
Cc: Chris Sarra <chrissarra@google.com>
Tested-by: Armin Wolf <W_Armin@gmx.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-06-18 20:07:42 -07:00
Guenter Roeck
27972a4142 hwmon: (spd5118) Use regmap to implement paging
Using regmap for paging significantly improves caching since the regmap
cache no longer needs to be cleared after changing the page, so let's
use it.

Suggested-by: Armin Wolf <W_Armin@gmx.de>
Tested-by: Armin Wolf <W_Armin@gmx.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-06-18 20:07:42 -07:00
Stanislav Jakubek
6993834668 dt-bindings: hwmon: ti,tmp108: document V+ supply, add short description
TMP108 is powered by its V+ supply, document it. The property is called
"vcc-supply" since the plus sign (+) is not an expected character.
While at it, add a short description with a link to its datasheets.

Signed-off-by: Stanislav Jakubek <stano.jakubek@gmail.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/ZnBmDXfnDQXNXz3k@standask-GA-A55M-S2HP
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-06-18 08:13:40 -07:00
Naresh Solanki
842b4d98ae hwmon: (max6639) : Add additional hwmon attributes for fan and pwm
Add additional attributes for fan & pwm i.e.,
fanY_pulses
pwmY_freq

Signed-off-by: Naresh Solanki <naresh.solanki@9elements.com>
Link: https://lore.kernel.org/r/20240614055533.2735210-2-naresh.solanki@9elements.com
[groeck: Fix value range for fanX_pulses]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-06-14 06:37:06 -07:00
Naresh Solanki
0f33272b60 hwmon: (max6639) : Update hwmon init using info structure
Update hwmon init with info instead of group. The hwmon info structure
in more flexible to describe sensor attribute & easy to maintian.

Signed-off-by: Naresh Solanki <naresh.solanki@9elements.com>
Link: https://lore.kernel.org/r/20240614055533.2735210-1-naresh.solanki@9elements.com
[groeck: Replace clamp_val() with range check when writing pwmX_input]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-06-14 06:36:12 -07:00
Thomas Weißschuh
52115fc329 hwmon: (core) Make hwmon_class const
Now that the driver core allows for struct class to be in read-only
memory, mark hwmon_class as const.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://lore.kernel.org/r/20240614-class-const-hwmon-v1-1-27b910d06a90@weissschuh.net
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-06-13 16:44:34 -07:00
Noah Wang
dc5abc2ff0 hwmon: add MP9941 driver
Add support for MPS step-down converter mp9941. This driver exposes
telemetry and limit value readings and writtings.

Signed-off-by: Noah Wang <noahwang.wang@outlook.com>
Link: https://lore.kernel.org/r/SEYPR04MB648294005D55F70736B519F6FAC72@SEYPR04MB6482.apcprd04.prod.outlook.com
[groeck: Include bitfield.h (for FIELD_PREP) and bits.h (for GENMASK)]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-06-12 22:39:34 -07:00
Noah Wang
512554f612 dt-bindings: hwmon: Add MPS mp9941
Add support for MPS mp9941 controller

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Noah Wang <noahwang.wang@outlook.com>
Link: https://lore.kernel.org/r/SEYPR04MB6482612BBD0421F5428092AEFAC72@SEYPR04MB6482.apcprd04.prod.outlook.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-06-12 09:00:17 -07:00
Noah Wang
fc37348c90 hwmon: add MP2993 driver
Add support for MPS VR controller mp2993. This driver exposes
telemetry and limits value readings and writtings.

Signed-off-by: Noah Wang <noahwang.wang@outlook.com>
Link: https://lore.kernel.org/r/SEYPR04MB648203DC017A514837DB1204FAC72@SEYPR04MB6482.apcprd04.prod.outlook.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-06-12 08:59:44 -07:00
Noah Wang
22ac3d2f68 dt-bindings: hwmon: Add MPS mp2993
Add support for MPS mp2993 controller

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Noah Wang <noahwang.wang@outlook.com>
Link: https://lore.kernel.org/r/SEYPR04MB6482EE5CA0C9A3F14863B999FAC72@SEYPR04MB6482.apcprd04.prod.outlook.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-06-12 08:59:16 -07:00
Amna Waseem
ec5d234f19 hwmon: (ina2xx) Add device tree support to pass alert polarity
The INA230 has an Alert pin which is asserted when the alert
function selected in the Mask/Enable register exceeds the
value programmed into the Alert Limit register. Assertion is based
on the Alert Polarity Bit (APOL, bit 1 of the Mask/Enable register).
It is default set to value 0 i.e Normal (active-low open collector).
However, hardware can be designed in such a way that expects Alert pin
to become active high if a user-defined threshold in Alert limit
register has been exceeded. This patch adds a way to pass alert polarity
value to the driver via device tree.

Signed-off-by: Amna Waseem <Amna.Waseem@axis.com>
Link: https://lore.kernel.org/r/20240611-apol-ina2xx-fix-v4-2-8df1d2282fc5@axis.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-06-12 07:15:09 -07:00
Amna Waseem
94e33109f9 dt-bindings: hwmon: ti,ina2xx: Add ti,alert-polarity-active-high property
Add a property to the binding to configure the Alert Polarity.
Alert pin is asserted based on the value of Alert Polarity bit of
Mask/Enable register. It is by default 0 which means Alert pin is
configured to be active low open collector. Value of 1 maps to
Inverted (active high open collector).

Signed-off-by: Amna Waseem <Amna.Waseem@axis.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/r/20240603-apol-ina2xx-fix-v3-1-b9eff3158e4e@axis.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-06-12 07:11:48 -07:00
Guenter Roeck
cbbb76e4b8 hwmon: (pmbus/lm25066) Let enum chips start with index 0
Commit ac0c26bae6 ("hwmon: (lm25066) Use i2c_get_match_data()") changed
enum chips to start with 1 instead of 0, under the assumption that
the data pointer in of_device_id must not start with 0 (NULL) if
i2c_get_match_data() is used. However, that is perfectly fine as long as
there is also an i2c_device_id array with the same data which is used
as fallback in that case.

Let enum chips start with 0 to avoid confusion against other drivers
where the enum starts with 0 and i2c_get_match_data() is used as well.

Cc: Rob Herring <robh@kernel.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-06-11 07:25:13 -07:00
Guenter Roeck
2255893444 hwmon: (nct6775) Let enum kinds start with index 0
Commit 10a0575ea0 ("hwmon: (nct6775-i2c) Use i2c_get_match_data()")
introduced calling i2c_get_match_data() to the nct6775 driver. As part
of that commit, enum kinds was changed to start with 1, based on

    Adjust the 'kinds' enum to not use 0, so that no match data can be
    distinguished from a valid enum value.

The patch had to be fixed later with commit 2792fc8f8c ("hwmon:
(nct6775-core) Explicitly initialize nct6775_device_names indexes") and
commit efe86092ab ("hwmon: (nct6775-platform) Explicitly initialize
nct6775_sio_names indexes").

Various patches submitted later show that the change from 0 to 1 is
not really necessary. As it turns out, it is perfectly fine as long as
there is an i2c_device_id array with the same data as in the of_device_id
array. This data is used as fallback if the data pointer in struct
of_device_id is NULL (0).

Let enum chips start with 0 to avoid confusion against other drivers
where the enum starts with 0 and i2c_get_match_data() is used as well.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-06-11 07:25:13 -07:00
Guenter Roeck
e229c6e80f hwmon: (pmbus/mp2856) Let enum chips start with index 0
Earlier it was assumed that the data pointer in of_device_id must not start
with 0 (NULL) if i2c_get_match_data() is used. However, it turns out that
this is perfectly fine as long as there is also an i2c_device_id array with
the same data, which is used as fallback in that case.

Let enum chips start with 0 to avoid confusion against other drivers
where the enum starts with 0 and i2c_get_match_data() is used as well.

While doing that, remove chip_id from struct mp2856_data since it is only
used in the probe function, and typecast the result of i2c_get_match_data()
to kernel_ulong_t to avoid the double typecast.

Cc: Peter Yin <peteryin.openbmc@gmail.com>
Cc: Potin Lai <potin.lai.pt@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-06-11 07:25:13 -07:00
Guenter Roeck
138d45d967 hwmon: (pmbus/max31827) Explain why enum chips must not start with 0
If a driver calls device_get_match_data(), the .data pointer in its id
data structures must not be NULL/0 because device_get_match_data()
returns NULL if an entry is not found. Explain that in a comment to avoid
confusion why this is required in this driver but not in other drivers.

Cc: Daniel Matyas <daniel.matyas@analog.com>
Acked-by: Nuno Sa <nuno.sa@analog.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-06-11 07:25:03 -07:00
Eugene Shalygin
71ac69e089 hwmon: (asus-ec-sensors) add ProArt X670E-CREATOR WIFI
Provided and tested by a user in a GitHub PR [1].

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

Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com>
Link: https://lore.kernel.org/r/20240608085146.572777-2-eugene.shalygin@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-06-10 09:13:56 -07:00
Guenter Roeck
9ecc129470 hwmon: (spd5118) Add configuration option for auto-detection
With SPD5118 chip detection for the most part handled by the i2c-smbus
core using DMI information, the spd5118 driver no longer needs to
auto-detect spd5118 compliant chips.

Auto-detection by the driver is still needed on systems with no DMI support
or on systems with more than eight DIMMs and can not be removed entirely.
However, it affects boot time and introduces the risk of mis-identifying
chips. Add configuration option to be able to disable it on systems where
chip detection is handled outside the driver.

Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Thomas Weißschuh <linux@weissschuh.net>
Tested-by: Armin Wolf <W_Armin@gmx.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-06-10 09:13:41 -07:00
Guenter Roeck
84d477354b i2c: smbus: Support DDR5 and LPDDR5 SPD EEPROMs
Detect (LP)DDR5 memory and instantiate the SPD5118 driver automatically.

Suggested-by: Thomas Weißschuh <linux@weissschuh.net>
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Armin Wolf <W_Armin@gmx.de>
Reviewed-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-06-10 09:13:41 -07:00
Guenter Roeck
25dff444c6 hwmon: (spd5118) Add support for reading SPD data
Add support for reading SPD NVMEM data from SPD5118 (Jedec JESD300)
compliant memory modules. NVMEM write operation is not supported.

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

Reviewed-by: Thomas Weißschuh <linux@weissschuh.net>
Tested-by: Armin Wolf <W_Armin@gmx.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-06-10 09:13:41 -07:00
Guenter Roeck
d1b4c75508 hwmon: (spd5118) Add suspend/resume support
Add suspend/resume support to ensure that limit and configuration
registers are updated and synchronized after a suspend/resume cycle.

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

Cc: René Rebe <rene@exactcode.de>
Cc: Thomas Weißschuh <linux@weissschuh.net>
Reviewed-by: Thomas Weißschuh <linux@weissschuh.net>
Tested-by: Thomas Weißschuh <linux@weissschuh.net>
Tested-by: Stephen Horvath <s.horvath@outlook.com.au>
Tested-by: Armin Wolf <W_Armin@gmx.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-06-10 09:13:41 -07:00
Guenter Roeck
f3edbbd70b dt-bindings: trivial-devices: Add jedec,spd5118
Add bindings for the SPD hub present in DDR5 modules.
(https://www.jedec.org/standards-documents/docs/jesd300-5b01).

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-06-10 09:13:41 -07:00
Jeff Johnson
fb7a4931ef hwmon: add missing MODULE_DESCRIPTION() macros
make allmodconfig && make W=1 C=1 reports:
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hwmon/asus_atk0110.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hwmon/corsair-cpro.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hwmon/mr75203.o

Add all missing invocations of the MODULE_DESCRIPTION() macro.

Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Link: https://lore.kernel.org/r/20240607-md-drivers-hwmon-v1-1-1ea6d6fe61e3@quicinc.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-06-08 16:07:33 -07:00
Javier Carrasco
1ee1237941 hwmon: (gsc-hwmon) use device_for_each_child_node_scoped()
Switch to the _scoped() version introduced in commit 365130fd47
("device property: Introduce device_for_each_child_node_scoped()")
to remove the need for manual calling of fwnode_handle_put() in the
paths where the code exits the loop early.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://lore.kernel.org/r/20240404-hwmon_device_for_each_child_node_scoped-v1-2-53997abde43c@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-06-08 16:07:33 -07:00
Javier Carrasco
234c07400e hwmon: (ltc2991) use device_for_each_child_node_scoped()
Switch to the _scoped() version introduced in commit 365130fd47
("device property: Introduce device_for_each_child_node_scoped()")
to remove the need for manual calling of fwnode_handle_put() in the
paths where the code exits the loop early.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://lore.kernel.org/r/20240404-hwmon_device_for_each_child_node_scoped-v1-1-53997abde43c@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-06-08 16:07:33 -07:00
Andrew Davis
55076454de hwmon: (w83795): Remove use of i2c_match_id()
The function i2c_match_id() is used to fetch the matching ID from
the i2c_device_id table. This is often used to then retrieve the
matching driver_data. This can be done in one step with the helper
i2c_get_match_data().

This helper has a couple other benefits:
 * It doesn't need the i2c_device_id passed in so we do not need
   to have that forward declared, allowing us to remove those or
   move the i2c_device_id table down to its more natural spot
   with the other module info.
 * It also checks for device match data, which allows for OF and
   ACPI based probing. That means we do not have to manually check
   those first and can remove those checks.

Signed-off-by: Andrew Davis <afd@ti.com>
Link: https://lore.kernel.org/r/20240403203633.914389-32-afd@ti.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-06-08 16:07:33 -07:00
Andrew Davis
00dcf379ff hwmon: (w83781d) Remove use of i2c_match_id()
The function i2c_match_id() is used to fetch the matching ID from
the i2c_device_id table. This is often used to then retrieve the
matching driver_data. This can be done in one step with the helper
i2c_get_match_data().

This helper has a couple other benefits:
 * It doesn't need the i2c_device_id passed in so we do not need
   to have that forward declared, allowing us to remove those or
   move the i2c_device_id table down to its more natural spot
   with the other module info.
 * It also checks for device match data, which allows for OF and
   ACPI based probing. That means we do not have to manually check
   those first and can remove those checks.

Signed-off-by: Andrew Davis <afd@ti.com>
Link: https://lore.kernel.org/r/20240403203633.914389-31-afd@ti.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-06-08 16:07:33 -07:00
Andrew Davis
38a085f9f4 hwmon: (tmp464) Remove use of i2c_match_id()
The function i2c_match_id() is used to fetch the matching ID from
the i2c_device_id table. This is often used to then retrieve the
matching driver_data. This can be done in one step with the helper
i2c_get_match_data().

This helper has a couple other benefits:
 * It doesn't need the i2c_device_id passed in so we do not need
   to have that forward declared, allowing us to remove those or
   move the i2c_device_id table down to its more natural spot
   with the other module info.
 * It also checks for device match data, which allows for OF and
   ACPI based probing. That means we do not have to manually check
   those first and can remove those checks.

Signed-off-by: Andrew Davis <afd@ti.com>
Link: https://lore.kernel.org/r/20240403203633.914389-30-afd@ti.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-06-08 16:07:33 -07:00
Andrew Davis
8b6e514c59 hwmon: (tmp421) Remove use of i2c_match_id()
The function i2c_match_id() is used to fetch the matching ID from
the i2c_device_id table. This is often used to then retrieve the
matching driver_data. This can be done in one step with the helper
i2c_get_match_data().

This helper has a couple other benefits:
 * It doesn't need the i2c_device_id passed in so we do not need
   to have that forward declared, allowing us to remove those or
   move the i2c_device_id table down to its more natural spot
   with the other module info.
 * It also checks for device match data, which allows for OF and
   ACPI based probing. That means we do not have to manually check
   those first and can remove those checks.

Signed-off-by: Andrew Davis <afd@ti.com>
Link: https://lore.kernel.org/r/20240403203633.914389-29-afd@ti.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-06-08 16:07:33 -07:00
Andrew Davis
516d5765a3 hwmon: (tmp401) Remove use of i2c_match_id()
The function i2c_match_id() is used to fetch the matching ID from
the i2c_device_id table. This is often used to then retrieve the
matching driver_data. This can be done in one step with the helper
i2c_get_match_data().

This helper has a couple other benefits:
 * It doesn't need the i2c_device_id passed in so we do not need
   to have that forward declared, allowing us to remove those or
   move the i2c_device_id table down to its more natural spot
   with the other module info.
 * It also checks for device match data, which allows for OF and
   ACPI based probing. That means we do not have to manually check
   those first and can remove those checks.

Signed-off-by: Andrew Davis <afd@ti.com>
Link: https://lore.kernel.org/r/20240403203633.914389-28-afd@ti.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-06-08 16:07:33 -07:00
Andrew Davis
50ba2d3d48 hwmon: (thmc50) Remove use of i2c_match_id()
The function i2c_match_id() is used to fetch the matching ID from
the i2c_device_id table. This is often used to then retrieve the
matching driver_data. This can be done in one step with the helper
i2c_get_match_data().

This helper has a couple other benefits:
 * It doesn't need the i2c_device_id passed in so we do not need
   to have that forward declared, allowing us to remove those or
   move the i2c_device_id table down to its more natural spot
   with the other module info.
 * It also checks for device match data, which allows for OF and
   ACPI based probing. That means we do not have to manually check
   those first and can remove those checks.

Signed-off-by: Andrew Davis <afd@ti.com>
Link: https://lore.kernel.org/r/20240403203633.914389-27-afd@ti.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-06-08 16:07:33 -07:00
Andrew Davis
64306a4719 hwmon: (shtc1) Remove use of i2c_match_id()
The function i2c_match_id() is used to fetch the matching ID from
the i2c_device_id table. This is often used to then retrieve the
matching driver_data. This can be done in one step with the helper
i2c_get_match_data().

This helper has a couple other benefits:
 * It doesn't need the i2c_device_id passed in so we do not need
   to have that forward declared, allowing us to remove those or
   move the i2c_device_id table down to its more natural spot
   with the other module info.
 * It also checks for device match data, which allows for OF and
   ACPI based probing. That means we do not have to manually check
   those first and can remove those checks.

Signed-off-by: Andrew Davis <afd@ti.com>
Link: https://lore.kernel.org/r/20240403203633.914389-26-afd@ti.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-06-08 16:07:33 -07:00
Andrew Davis
f147dbd7ea hwmon: (sht3x) Remove use of i2c_match_id()
The function i2c_match_id() is used to fetch the matching ID from
the i2c_device_id table. This is often used to then retrieve the
matching driver_data. This can be done in one step with the helper
i2c_get_match_data().

This helper has a couple other benefits:
 * It doesn't need the i2c_device_id passed in so we do not need
   to have that forward declared, allowing us to remove those or
   move the i2c_device_id table down to its more natural spot
   with the other module info.
 * It also checks for device match data, which allows for OF and
   ACPI based probing. That means we do not have to manually check
   those first and can remove those checks.

Signed-off-by: Andrew Davis <afd@ti.com>
Link: https://lore.kernel.org/r/20240403203633.914389-25-afd@ti.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-06-08 16:07:33 -07:00
Andrew Davis
77944b479d hwmon: (powr1220) Remove use of i2c_match_id()
The function i2c_match_id() is used to fetch the matching ID from
the i2c_device_id table. This is often used to then retrieve the
matching driver_data. This can be done in one step with the helper
i2c_get_match_data().

This helper has a couple other benefits:
 * It doesn't need the i2c_device_id passed in so we do not need
   to have that forward declared, allowing us to remove those or
   move the i2c_device_id table down to its more natural spot
   with the other module info.
 * It also checks for device match data, which allows for OF and
   ACPI based probing. That means we do not have to manually check
   those first and can remove those checks.

Signed-off-by: Andrew Davis <afd@ti.com>
Link: https://lore.kernel.org/r/20240403203633.914389-24-afd@ti.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-06-08 16:07:33 -07:00
Andrew Davis
f1230f756a hwmon: (mcp3021) Remove use of i2c_match_id()
The function i2c_match_id() is used to fetch the matching ID from
the i2c_device_id table. This is often used to then retrieve the
matching driver_data. This can be done in one step with the helper
i2c_get_match_data().

This helper has a couple other benefits:
 * It doesn't need the i2c_device_id passed in so we do not need
   to have that forward declared, allowing us to remove those or
   move the i2c_device_id table down to its more natural spot
   with the other module info.
 * It also checks for device match data, which allows for OF and
   ACPI based probing. That means we do not have to manually check
   those first and can remove those checks.

Signed-off-by: Andrew Davis <afd@ti.com>
Link: https://lore.kernel.org/r/20240403203633.914389-23-afd@ti.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-06-08 16:07:33 -07:00
Andrew Davis
de5fb06ca7 hwmon: (max6697) Remove use of i2c_match_id()
The function i2c_match_id() is used to fetch the matching ID from
the i2c_device_id table. This is often used to then retrieve the
matching driver_data. This can be done in one step with the helper
i2c_get_match_data().

This helper has a couple other benefits:
 * It doesn't need the i2c_device_id passed in so we do not need
   to have that forward declared, allowing us to remove those or
   move the i2c_device_id table down to its more natural spot
   with the other module info.
 * It also checks for device match data, which allows for OF and
   ACPI based probing. That means we do not have to manually check
   those first and can remove those checks.

Signed-off-by: Andrew Davis <afd@ti.com>
Link: https://lore.kernel.org/r/20240403203633.914389-22-afd@ti.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-06-08 16:07:33 -07:00
Andrew Davis
495e6a9cf5 hwmon: (max1668) Remove use of i2c_match_id()
The function i2c_match_id() is used to fetch the matching ID from
the i2c_device_id table. This is often used to then retrieve the
matching driver_data. This can be done in one step with the helper
i2c_get_match_data().

This helper has a couple other benefits:
 * It doesn't need the i2c_device_id passed in so we do not need
   to have that forward declared, allowing us to remove those or
   move the i2c_device_id table down to its more natural spot
   with the other module info.
 * It also checks for device match data, which allows for OF and
   ACPI based probing. That means we do not have to manually check
   those first and can remove those checks.

Signed-off-by: Andrew Davis <afd@ti.com>
Link: https://lore.kernel.org/r/20240403203633.914389-21-afd@ti.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-06-08 16:07:33 -07:00