Skip to content

Add device reinit config#186

Draft
soburi wants to merge 2 commits into
zephyrproject-rtos:nextfrom
soburi:add_device_reinit_config
Draft

Add device reinit config#186
soburi wants to merge 2 commits into
zephyrproject-rtos:nextfrom
soburi:add_device_reinit_config

Conversation

@soburi
Copy link
Copy Markdown
Member

@soburi soburi commented May 4, 2026

This is a temporary workaround, so an additional patch is applied to disable it by default by adding a Kconfig option.
So, this means, this commit is only control the difference with arduino repo.

@soburi soburi force-pushed the add_device_reinit_config branch 3 times, most recently from af3d172 to 0b00397 Compare May 31, 2026 10:24
facchinm and others added 2 commits June 1, 2026 14:17
Allow Arduino APIs to switch a pin between GPIO and peripheral
functions by re-running the selected device init path when
the requested owner changes.

This is an interim pinmux handoff mechanism for boards where
sketches may move a pin back and forth between
serial/GPIO/PWM-style use.

Co-Authored-by: Martino Facchin <m.facchin@arduino.cc>
Co-Authored-by: pennam <m.pennasilico@arduino.cc>
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Add ARDUINO_DEVICE_REINIT_ON_USE to optionally call the underlying
Zephyr device init callback before Arduino peripheral operations.

This keeps the current pinmux workaround opt-in while boards move
toward a proper pin/function handoff model.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
@soburi soburi force-pushed the add_device_reinit_config branch from 0b00397 to 07f497a Compare June 1, 2026 05:18
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