Skip to content
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

drivers: entropy: stm32: Add power management constraints #42375

Merged
merged 1 commit into from
Feb 22, 2022

Conversation

wcappelle
Copy link

Add power managment constraints to the entropy driver.
This prevents the hardware block to lose it's clock when going into any stop mode of the cpu, which would cause the clock error flag to be set while filling the pool.

This is a part of #42374

@github-actions github-actions bot added the platform: STM32 ST Micro STM32 label Feb 1, 2022
drivers/entropy/entropy_stm32.c Outdated Show resolved Hide resolved
drivers/entropy/entropy_stm32.c Outdated Show resolved Hide resolved
drivers/entropy/entropy_stm32.c Outdated Show resolved Hide resolved
drivers/entropy/entropy_stm32.c Outdated Show resolved Hide resolved
drivers/entropy/entropy_stm32.c Outdated Show resolved Hide resolved
@wcappelle wcappelle force-pushed the entropy_stm32_pm_fix branch from 555baf9 to e1c6576 Compare February 2, 2022 08:40
@wcappelle
Copy link
Author

@erwango , @gmarull Thanks for the review, I've updated the requested changes & reverted the clang formatting as it didn't do it quite right.
Could you find some time to rereview?

@wcappelle wcappelle requested review from erwango and gmarull February 2, 2022 08:43
@wcappelle wcappelle force-pushed the entropy_stm32_pm_fix branch from e1c6576 to 1bf90f3 Compare February 2, 2022 08:51
@wcappelle wcappelle requested a review from erwango February 2, 2022 09:06
gmarull
gmarull previously approved these changes Feb 2, 2022
Copy link
Member

@gmarull gmarull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just one comment: I see 2 pm_constraint_set calls and 1 pm_constraint_release call, I suppose the driver takes care of sequencing, e.g. never call 2 sets and 1 release, etc. (or API is used in a way that this is prevented)

@wcappelle
Copy link
Author

wcappelle commented Feb 2, 2022

LGTM, just one comment: I see 2 pm_constraint_set calls and 1 pm_constraint_release call, I suppose the driver takes care of sequencing, e.g. never call 2 sets and 1 release, etc. (or API is used in a way that this is prevented)

Well, I think you might be right. with reverting the flag, I think the pm_constraint_set can indeed be set multiple times now before releasing. Let me check further/fix that

Add power management constraints to the entropy driver.
This prevents the hardware block to lose it's clock when
going into any stop mode of the cpu, which would cause the
clock error flag to be set while filling the pool.

Signed-off-by: Wouter Cappelle <wouter.cappelle@crodeon.com>
@wcappelle wcappelle force-pushed the entropy_stm32_pm_fix branch from 1bf90f3 to 52c2c39 Compare February 2, 2022 09:26
@wcappelle
Copy link
Author

@gmarull , i've fixed the possible double set.

@wcappelle
Copy link
Author

@erwango , I've added the comment. Do you have and further review comments?

@erwango erwango added this to the v3.1.0 milestone Feb 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants