hwmon: (pmbus/max34440): block unsupported registers that triggers ALERT on initialization, support max34451etna8+, and support max34452 - #3417
Conversation
nunojsa
left a comment
There was a problem hiding this comment.
Just one comment from me. Please send the patch... Also looks like a Fixes tag is sensible
| */ | ||
| if (data->id == max34451 || data->id == adpm12160 || | ||
| data->id == adpm12200 || data->id == adpm12250) | ||
| return -ENXIO; |
There was a problem hiding this comment.
Just what claude suggested, it means No Such Device or Address so I agreed on the address part.
Now that I think about it, is this address the device itself and not the register addresses within?
But since the driver already uses ENXIO in other parts that also blocks functions, I think this is still ok for consistency.
b9080e0 to
edb01f8
Compare
b99b81f to
9181623
Compare
|
v2: The request was totally removing CML alert triggering, so I had to edit and find all pmbus initialization register access and block all non supported. Aside from the limit registers of VIN/IIN/IOUT/VOUT/TEMP, I also had to block STATUS_BYTE and STATUS_OTHER |
edb01f8 to
2aac463
Compare
1c5f7cc to
5913aa9
Compare
|
added fixes tag to commit 1 added more patches on this series |
168c8e2 to
4e21503
Compare
424e22f to
49faee3
Compare
4e21503 to
97e15ef
Compare
nunojsa
left a comment
There was a problem hiding this comment.
Not really sure what to think about the 4 fixes tag. I guess they make sense... But the tested tag does make much sense if not from someone else!
Also for the latest one , are you just carrying code from Carlos or did you changed some stuff? If you changed, a Co-developed tag would make sense.
| break; | ||
| default: | ||
| ret = -ENODATA; | ||
| break; |
There was a problem hiding this comment.
You can just return directly
| data->id == adpm12200 || data->id == adpm12250) | ||
| return -ENXIO; | ||
| ret = -ENODATA; | ||
| break; |
| break; | ||
| default: | ||
| ret = -ENODATA; | ||
| break; |
There was a problem hiding this comment.
same comments. On top, you can also drop ret
|
noted on the return and stuff i suppose i did edit carlos' code since he made it before I added these changes. Will add the codevelop tag |
721dbd5 to
4010bbc
Compare
92c3391 to
64140c2
Compare
d21303e to
f74258c
Compare
8411d1b to
a17a53a
Compare
64140c2 to
120dc2a
Compare
MAX34451 and ADPM chips do not support standard PMBus VIN/IIN limit registers, manufacturer specific min/max registers, or undercurrent or undertemperature fault limits. STATUS_BYTE and STATUS_OTHER are also not available. Accessing these non-existent registers during driver initialization triggers a CML error and asserts ALERT. Handled by blocking these functions during read/write. Fixes: 7a001db ("hwmon: (pmbus/max34440) Add support for MAX34451.") Fixes: 629cf8f ("hwmon: (pmbus/max34440) Add support for ADPM12160") Fixes: 2e0b52f ("hwmon: (pmbus/max34440): add support adpm12200") Fixes: 479bfeb ("hwmon: (pmbus/max34440): add support adpm12250") Signed-off-by: Alexis Czezar Torreno <alexisczezar.torreno@analog.com> Link: https://lore.kernel.org/r/20260716-max34451_fixes-v1-1-a941b27eaecb@analog.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
The MAX34451 released a newer version called max34451etna8+. This simply changes the direct format coefficients Signed-off-by: Alexis Czezar Torreno <alexisczezar.torreno@analog.com> Link: https://lore.kernel.org/r/20260722-max34451_fixes-v2-2-bbddb18ec1d6@analog.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
120dc2a to
d1de48f
Compare
|
Upstream applied |
Add support for Maxim MAX34452 PMBus 16-Channel V/I Monitor and 12-Channel Sequencer/Marginer. The device is similar to MAX34451 and shares the same configuration function. The MAX34452 supports: - 16 configurable voltage/current monitoring channels - 5 temperature sensors (pages 16-20) - Dynamic channel configuration via MFR_CHANNEL_CONFIG - IOUT average monitoring Signed-off-by: Carlos Jones Jr <carlosjr.jones@analog.com> Co-Developed by: Alexis Czezar Torreno <alexisczezar.torreno@analog.com> Signed-off-by: Alexis Czezar Torreno <alexisczezar.torreno@analog.com> Link: https://lore.kernel.org/r/20260722-max34451_fixes-v2-3-bbddb18ec1d6@analog.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
d1de48f to
fbfdbda
Compare
Commit 1:
MAX34451 and ADPM chips do not support standard PMBus VIN/IIN limit registers, manufacturer specific min/max registers, or undercurrent or undertemperature fault limits. STATUS_BYTE and STATUS_OTHER are also not available. Accessing these non-existent registers during driver initialization triggers a CML error and asserts ALERT. Handled by
blocking these functions during read/write.
Commit 2:
MAX34451 added a new version etna8+. This adjusted the coefficients for direct format
Commit 3:
Carlos created patch to support MAX34452, to avoid possible conflict upstream, submitting his work together in this series
MAX34452 PMBus 16-Channel V/I Monitor and 12-Channel Sequencer/Marginer. The device is similar to MAX34451
and shares the same configuration function.
PR Description
PR Type
PR Checklist