summaryrefslogtreecommitdiff
path: root/drivers/hwmon/pmbus/xdpe12284.c
AgeCommit message (Collapse)Author
2024-05-01hwmon: Drop explicit initialization of struct i2c_device_id::driver_data to 0Uwe Kleine-König
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>
2023-06-08hwmon: Switch i2c drivers back to use .probe()Uwe Kleine-König
After commit b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new() call-back type"), all drivers being converted to .probe_new() and then 03c835f498b5 ("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>
2022-04-04hwmon: (xdpe12284) Fix build warning seen if ↵Guenter Roeck
CONFIG_SENSORS_XDPE122_REGULATOR is disabled 0-day reports: drivers/hwmon/pmbus/xdpe12284.c:127:36: warning: unused variable 'xdpe122_reg_desc' This is seen if CONFIG_SENSORS_XDPE122_REGULATOR is not enabled. Mark xdpe122_reg_desc as __maybe_unused to fix the problem. Fixes: f53bfe4d6984 ("hwmon: (xdpe12284) Add regulator support") Reported-by: kernel test robot <lkp@intel.com> Cc: Marcello Sylvester Bauer <sylv@sylv.io> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2022-03-02hwmon: (xdpe12284) Add regulator supportMarcello Sylvester Bauer
Add simple on/off regulator support for xdpe12284 and other pmbus parts supported by the xdpe12284 driver. Signed-off-by: Marcello Sylvester Bauer <sylv@sylv.io> Link: https://lore.kernel.org/r/f69b8e7fa32cd2bad9516d8fa590abb87c7e4869.1646214248.git.sylv@sylv.io Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2022-03-02hwmon: (xdpe12284) Add support for xdpe11280Marcello Sylvester Bauer
Add support for another Infineon Multi-phase controller chip. The xdpe11280 uses linear instead of vid data format for VOUT. Detect VOUT_MODE format during identification and skip the xdpe122 related adaptions in case it is linear. Signed-off-by: Marcello Sylvester Bauer <sylv@sylv.io> Link: https://lore.kernel.org/r/fa6a4b636a05ecb337d132824efca2545188a2a2.1646214248.git.sylv@sylv.io Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-04-20hwmon: (pmbus) Introduce PMBUS symbol namespaceGuenter Roeck
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>
2020-12-02hwmon: (pmbus) shrink code and remove pmbus_do_remove()Bartosz Golaszewski
The only action currently performed in pmbus_do_remove() is removing the debugfs hierarchy. We can schedule a devm action at probe time and remove pmbus_do_remove() entirely from all pmbus drivers. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Link: https://lore.kernel.org/r/20201026105352.20359-1-brgl@bgdev.pl [groeck: Removed references to pmbus_do_remove from documentation] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-09-23hwmon (pmbus) use simple i2c probe functionStephen Kitt
pmbus_do_probe doesn't use the id information provided in its second argument, so this can be removed, which then allows using the single-parameter i2c probe function ("probe_new") for probes. This avoids scanning the identifier tables during probes. Drivers which didn't use the id are converted as-is; drivers which did are modified as follows: * if the information in i2c_client is sufficient, that's used instead (client->name); * configured v. probed comparisons are performed by comparing the configured name to the detected name, instead of the ids; this involves strcmp but is still cheaper than comparing all the device names when scanning the tables; * anything else is handled by calling i2c_match_id() with the same level of error-handling (if any) as before. Additionally, the mismatch message in the ltc2978 driver is adjusted so that it no longer assumes that the driver_data is an index into ltc2978_id. Signed-off-by: Stephen Kitt <steve@sk2.org> Acked-by: Wolfram Sang <wsa@kernel.org> Link: https://lore.kernel.org/r/20200808210004.30880-1-steve@sk2.org Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-03-08hwmon: (pmbus) Add 'phase' parameter where needed for multi-phase supportGuenter Roeck
In preparation for multi-phase support, add 'phase' parameter to read_word and set_page functions. Actual multi-phase support will be added in a subsequent patch. Cc: Vadim Pasternak <vadimp@mellanox.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-02-25hwmon: (pmbus/xdpe12284) Add callback for vout limits conversionVadim Pasternak
Provide read_word_data() callback for overvoltage and undervoltage output readouts conversion. These registers are presented in 'slinear11' format, while default conversion for 'vout' class for the devices is 'vid'. It is resulted in wrong conversion in pmbus_reg2data() for in{3-4}_lcrit and in{3-4}_crit attributes. ) Fixes: aaafb7c8eb1c ("hwmon: (pmbus) Add support for Infineon Multi-phase xdpe122 family controllers") Signed-off-by: Vadim Pasternak <vadimp@mellanox.com> Link: https://lore.kernel.org/r/20200224225202.19576-1-vadimp@mellanox.com [gropeck: Adjusted to mainline PMBus API] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-02-12hwmon: (pmbus/xdpe12284) fix typo in compatible stringsJohan Hovold
Make sure that the driver compatible strings matches the binding by removing the space between the manufacturer and model. Fixes: aaafb7c8eb1c ("hwmon: (pmbus) Add support for Infineon Multi-phase xdpe122 family controllers") Cc: Vadim Pasternak <vadimp@mellanox.com> Signed-off-by: Johan Hovold <johan@kernel.org> Link: https://lore.kernel.org/r/20200212092426.24012-1-johan@kernel.org Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-01-23hwmon: (pmbus) Add support for Infineon Multi-phase xdpe122 family controllersVadim Pasternak
Add support for devices XDPE12254, XDPE12284. All these device support two pages. The below lists of VOUT_MODE command readout with their related VID protocols, Digital to Analog Converter steps, supported by these devices: VR12.0 mode, 5-mV DAC - 0x01; VR12.5 mode, 10-mV DAC - 0x02; IMVP9 mode, 5-mV DAC - 0x03; AMD mode 6.25mV - 0x10. Signed-off-by: Vadim Pasternak <vadimp@mellanox.com> Link: https://lore.kernel.org/r/20200113150841.17670-5-vadimp@mellanox.com [groeck: Added missing break statement] Signed-off-by: Guenter Roeck <linux@roeck-us.net>