Commit Graph

5 Commits

Author SHA1 Message Date
Uwe Kleine-König
2fa365974c hwmon: Drop explicit initialization of struct i2c_device_id::driver_data to 0 (part 2)
These drivers don't use the driver_data member of struct i2c_device_id,
so don't explicitly initialize this member.

This prepares putting driver_data in an anonymous union which requires
either no initialization or named designators. But it's also a nice
cleanup on its own.

This is a follow up to commit d8a66f3621 ("hwmon: Drop explicit
initialization of struct i2c_device_id::driver_data to 0") which I
created before identifying a few corner cases in my conversion script.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20240508072027.2119857-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-05-09 12:56:06 -07:00
Uwe Kleine-König
d8a66f3621 hwmon: Drop explicit initialization of struct i2c_device_id::driver_data to 0
These drivers don't use the driver_data member of struct i2c_device_id,
so don't explicitly initialize this member.

This prepares putting driver_data in an anonymous union which requires
either no initialization or named designators. But it's also a nice
cleanup on its own.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20240430085654.1028864-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2024-05-01 07:47:49 -07:00
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
Guenter Roeck
b94ca77eea hwmon: (pmbus) Introduce PMBUS symbol namespace
Exported pmbus symbols are only supposed to be used from PMBus code.
Introduce PMBUS symbol namespace to prevent misuse from other code.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-04-20 06:50:14 -07:00
Erik Rosen
1e4063329f hwmon: (pmbus) Add pmbus driver for MAX15301
Add pmbus driver support for Maxim MAX15301 InTune Automatically
Compensated Digital PoL Controller with Driver and PMBus Telemetry

Even though the specification does not specifically mention it,
extensive empirical testing has revealed that auto-detection of
limit-registers will fail in a random fashion unless the delay
parameter is set to above about 80us. The default delay is set
to 100us to include some safety margin.

This patch is tested on a Flex BMR461 converter module.

Signed-off-by: Erik Rosen <erik.rosen@metormote.com>
Link: https://lore.kernel.org/r/20210419101251.24840-1-erik.rosen@metormote.com
[groeck: Added rationale for delay to driver header]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-04-20 06:50:14 -07:00