diff options
author | Konstantin Aladyshev <aladyshev22@gmail.com> | 2024-01-26 23:57:14 +0300 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2024-01-26 13:07:10 -0800 |
commit | c60fe56c169eb552113a4711db3a5f99e3acd4c1 (patch) | |
tree | 49c7953448a6c7c5453a42b52da876ed6cff2f90 /lib/test_fortify/write_overflow-strncpy-src.c | |
parent | 97aab852c4b9e1b378de48a55f8c9b8d76c36ccc (diff) |
hwmon: (pmbus/mp2975) Fix driver initialization for MP2975 device
The commit 1feb31e810b0 ("hwmon: (pmbus/mp2975) Simplify VOUT code")
has introduced a bug that makes it impossible to initialize MP2975
device:
"""
mp2975 5-0020: Failed to identify chip capabilities
i2c i2c-5: new_device: Instantiated device mp2975 at 0x20
i2c i2c-5: delete_device: Deleting device mp2975 at 0x20
"""
Since the 'read_byte_data' function was removed from the
'pmbus_driver_info ' structure the driver no longer reports correctly
that VOUT mode is direct. Therefore 'pmbus_identify_common' fails
with error, making it impossible to initialize the device.
Restore 'read_byte_data' function to fix the issue.
Tested:
- before: it is not possible to initialize MP2975 device with the
'mp2975' driver,
- after: 'mp2975' correctly initializes MP2975 device and all sensor
data is correct.
Fixes: 1feb31e810b0 ("hwmon: (pmbus/mp2975) Simplify VOUT code")
Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
Link: https://lore.kernel.org/r/20240126205714.2363-1-aladyshev22@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy-src.c')
0 files changed, 0 insertions, 0 deletions