Skip to content

Conversation

kseerp
Copy link
Member

@kseerp kseerp commented Sep 23, 2025

PR Description

Add MAX17616/MAX17616A Current-Limiter with Overvoltage/Surge, Undervoltage, Reverse Polarity, Loss of Ground Protection with PMBus Interface

PR Type

  • Bug fix (a change that fixes an issue)
  • New feature (a change that adds new functionality)
  • Breaking change (a change that affects other repos or cause CIs to fail)

PR Checklist

  • I have conducted a self-review of my own code changes
  • I have tested the changes on the relevant hardware
  • I have updated the documentation outside this repo accordingly (if there is the case)

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>
Copy link
Collaborator

@nunojsa nunojsa left a 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
Copy link
Collaborator

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");
Copy link
Collaborator

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),
Copy link
Collaborator

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()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants