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

pinctrl: gecko: add low power support #83398

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

RomainPelletant
Copy link
Contributor

  • Add low power pin configuration support in gecko

Fixes #83397

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.

where's e.g. GECKO_GET_LP used?

@RomainPelletant RomainPelletant force-pushed the pinctrl/gecko/add-low-power-support branch 3 times, most recently from cd46ed5 to ec87230 Compare January 3, 2025 11:57
Romain Pelletant added 2 commits January 3, 2025 13:05
- Add low power pin configuration support in gecko

Signed-off-by: Romain Pelletant <[email protected]>
- Add low power pinctrl configuration support for gecko platform

Signed-off-by: Romain Pelletant <[email protected]>
@RomainPelletant RomainPelletant force-pushed the pinctrl/gecko/add-low-power-support branch from ec87230 to f6543e8 Compare January 3, 2025 12:05
/** Input. */
#define GECKO_LP_DISABLE 0U
/** Output. */
#define GECKO_LP_ENABLE 1U
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it does not make sense to define symbols that are finally just another name for boolean.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

you are right: it is just more "futurproof" if more bits are required for low-power feature: I let you decide.
I followed the nordic implementation (pinctrl-nrf)

Copy link
Contributor

Choose a reason for hiding this comment

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

YAGNI. So, I suggest to drop them.

GPIO_PinModeSet(pin_config.port, pin_config.pin, pin_config.mode,
pin_config.out);
continue;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I am a bit annoyed psels is ignored if low-power-enable is set.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree: if psels is not ignored, we have to define a low power pin configuration for each psels features. Maybe another way could be to call his function after psels/fun actions

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I could suggest to encapsulate GPIO_PinModeSet with all flags passing and low power flags will proceed his own pin control settings with a switch case to be psels aware. Do you prefer that way?

Copy link
Contributor

Choose a reason for hiding this comment

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

I have read a bit more about GPIO_PinModeSet(). I am now a bit confused. What do you expect when low-power-enable is set?

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.

gecko: add low power pinctrl support
4 participants