-
Notifications
You must be signed in to change notification settings - Fork 904
add MAX17616/MAX17616A driver #2949
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Add Analog Devices MAX17616/MAX17616A Current-Limiter with Overvoltage/Surge, Undervoltage, Reverse Polarity, Loss of Ground Protection with PMBus Interface. Signed-off-by: Kim Seer Paller <kimseer.paller@analog.com>
Add support for the Analog Devices MAX17616/MAX17616A Current-Limiter with Overvoltage/Surge, Undervoltage, Reverse Polarity, Loss of Ground Protection with PMBus Interface. The PMBus interface allows monitoring of input/output voltages, output current and temperature. Signed-off-by: Kim Seer Paller <kimseer.paller@analog.com>
c3062cc
to
4b58025
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also missing kconfig.adi patch. And you know the drill already :). Please send this upstream.
compatible: | ||
enum: | ||
- adi,max17616 | ||
- adi,max17616a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why 2 compatibles? What's the difference between the variants? It seems that in terms of SW there's none (apart from the name)...
return dev_err_probe(dev, ret, "Failed to read MFR_MODEL\n"); | ||
|
||
if ((strncmp(buf + 1, "MAX17616", 8) && strncmp(buf + 1, "MAX17616A", 9))) | ||
return dev_err_probe(dev, -ENODEV, "Unsupported device\n"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really want to have the above? And I guess that if ((strncmp(buf + 1, "MAX17616", 8))
should be enough, no? AFAICT, the two variants are pretty much compatible?
static struct i2c_driver max17616_driver = { | ||
.driver = { | ||
.name = "max17616", | ||
.of_match_table = of_match_ptr(max17616_of_match), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please drop of_match_ptr()
PR Description
Add MAX17616/MAX17616A Current-Limiter with Overvoltage/Surge, Undervoltage, Reverse Polarity, Loss of Ground Protection with PMBus Interface
PR Type
PR Checklist