-
Notifications
You must be signed in to change notification settings - Fork 8.2k
drivers: regulator: add support for AXP2101 power management IC #82474
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
Conversation
6426c15 to
16d230b
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.
you are missing a top-level compatible here, this is a MFD device. It's ok to just add support for regulators now, but DT layout needs to be designed according to how device is.
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.
| if (ret != 0) { | |
| if (ret < 0) { |
others as well
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.
Hi @gmarull
thanks, I changed the if statements
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.
Is instance level logging really needed? Very few drivers do this, and, in most cases, I'd say there's only a single regulator instance on a system.
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.
Hi @gmarull,
I remove the per instance logging.
f02b2fc to
24296fd
Compare
24296fd to
479ff76
Compare
Indeed, sorry, didn't check before submitting this one. |
|
Your and Ranranff's codes are obviously similar because they are copied from regulator_axp192.c. Since the implementation is almost the same, and only the definition is different, I think it is preferable to support it as an extension of regulator_axp192.c. I tried making something based on your code. soburi@6c74c9d I have yet to test it, but I hope it helps. |
|
@soburi
|
479ff76 to
8090c68
Compare
soburi
left a comment
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.
LGTM.
It would help if you still addressed pointed by @gmarull #82474 (comment).
8090c68 to
78b2ccf
Compare
Thanks! |
78b2ccf to
c90deed
Compare
30eba8f to
c7553b6
Compare
|
@soburi I still have no hardware that uses a DC/DC besides DCDC1, sorry.
|
c7553b6 to
c19a915
Compare
Please note this in the commit message about this. |
soburi
left a comment
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.
LGTM
|
@gmarull |
c19a915 to
9ea5d0d
Compare
a5e6394 to
fcf787c
Compare
drivers/mfd/mfd_axp192.c
Outdated
|
|
||
| DT_INST_FOREACH_STATUS_OKAY(MFD_AXP192_DEFINE); | ||
| DT_FOREACH_STATUS_OKAY_VARGS(x_powers_axp192, MFD_AXP192_DEFINE, 192); | ||
| DT_FOREACH_STATUS_OKAY_VARGS(x_powers_axp2101, MFD_AXP192_DEFINE, 2101); |
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.
rename definition macro to make it clear that covers 2 pmic
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.
I hope I understood it right: I renamed MFD_AXP192_DEFINE to MFD_AXP192__AXP2101_DEFINE to indicate it applies to axp192 and axp2101.
| #include <zephyr/logging/log_instance.h> | ||
| #include <zephyr/drivers/mfd/axp192.h> | ||
|
|
||
| LOG_MODULE_REGISTER(regulator_axp192, CONFIG_REGULATOR_LOG_LEVEL); |
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 moving this?
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.
Hi, moved it back, sorry.
7bf4fd4 to
f211b83
Compare
Add initial support for the AXP2101 power management IC from X-powers. Remark: only DC/DC1 and ALDO have been tested on real hardware. Co-authored-by: TOKITA Hiroshi <[email protected]> Co-authored-by: Gerard Marull-Paretas <[email protected]> Signed-off-by: Lothar Felten <[email protected]>
f211b83 to
d162cda
Compare
|
Rebased to current main branch |
Add initial support for the AXP2101 power management IC from X-powers