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: gpio: expose gpio_utils.h to external GPIO drivers #48609

Closed
mkschreder opened this issue Aug 3, 2022 · 2 comments · Fixed by #51526
Closed

drivers: gpio: expose gpio_utils.h to external GPIO drivers #48609

mkschreder opened this issue Aug 3, 2022 · 2 comments · Fixed by #51526
Labels
area: GPIO Enhancement Changes/Updates/Additions to existing features

Comments

@mkschreder
Copy link

mkschreder commented Aug 3, 2022

Is your enhancement proposal related to a problem? Please describe.
The problem is with external gpio drivers. These helpers are needed but by convention everything that is not under "include" is "private" headers.

Describe the solution you'd like

  • Remove inlines
  • Put this code into drivers/gpio/gpio_util.c
  • Put public interface under include/drivers/gpio/gpio_util.h
  • Add a kconfig option which is enabled by default if GPIO is enabled

Describe alternatives you've considered
Moving the header into the repo with external drivers. Not optimal because it creates duplication.

Additional context
N/A

@mkschreder mkschreder added the Enhancement Changes/Updates/Additions to existing features label Aug 3, 2022
@mkschreder mkschreder changed the title drivers: gpio: expose gpio_utils.h to external drivers drivers: gpio: expose gpio_utils.h to external GPIO drivers Aug 3, 2022
@balajikulkarni
Copy link
Contributor

@mkschreder I would like to pick up this issue. One quick query though, could we have the existing gpio_util.h (with inlines) itself exposed under public header interface?

@mkschreder
Copy link
Author

@mkschreder I would like to pick up this issue. One quick query though, could we have the existing gpio_util.h (with inlines) itself exposed under public header interface?

Lets start with that. It would be a very small change to start with.

balajikulkarni added a commit to balajikulkarni/zephyr that referenced this issue Oct 27, 2022
Expose "gpio_utils.h" header for external GPIO drivers.

Fixes zephyrproject-rtos#48609.

Signed-off-by: Balaji Kulkarni <balaji.kulkarni92@gmail.com>
carlescufi pushed a commit that referenced this issue Oct 27, 2022
Expose "gpio_utils.h" header for external GPIO drivers.

Fixes #48609.

Signed-off-by: Balaji Kulkarni <balaji.kulkarni92@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: GPIO Enhancement Changes/Updates/Additions to existing features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants