Skip to content

drivers: nrf: pinctrl: allow SoC-specific hooks #88753

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

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

masz-nordic
Copy link
Collaborator

No description provided.

Migrate to HAL functions in NRF pinctrl.

Signed-off-by: Marcin Szymczyk <[email protected]>
* Move per-peripheral configuration to separate functions.
* Iterate over a table of functions instead of huge switch-case.
* Other minor improvements.

Signed-off-by: Marcin Szymczyk <[email protected]>
Instead of cluttering the generic driver, move SoC-specific
code to separate files.

Signed-off-by: Marcin Szymczyk <[email protected]>
GPD is necessary for nRF54H20 application and radio code.
Provide hooks and select Kconfigs to enable them.

Signed-off-by: Marcin Szymczyk <[email protected]>
Copy link
Collaborator

@bjarki-andreasen bjarki-andreasen left a comment

Choose a reason for hiding this comment

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

I love the refactor, and agree with the goal of the PR, but the locations of some syms seem off to me :)

* SPDX-License-Identifier: Apache-2.0
*/

#include <nrf/gpd.h>
Copy link
Collaborator

Choose a reason for hiding this comment

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

something seems wrong with the includes here, this file should include zephyr/drivers/pinctrl/nrf_pinctrl.h (a file which does not exist yet, but it should, the hooks are device driver specific, not soc specific)

@@ -26,6 +27,18 @@ extern "C" {
/** Type for nRF pin. */
typedef uint32_t pinctrl_soc_pin_t;


struct nrf_pinctrl_pin {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please move this struct and the hook declarations to a device driver specific header in include/zephyr/drivers/pinctrl/

these syms are not soc specific, they are device driver specific :) The SoC "merely" implements them :)

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