Skip to content

drivers: serial: native_tty: config_get support #93149

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

Merged
merged 1 commit into from
Jul 24, 2025

Conversation

vytvir
Copy link
Contributor

@vytvir vytvir commented Jul 15, 2025

This commit adds config_get support for native_tty. This is helpful as some driver code (e.g. u_blox m8) will error out if they can't read the current configuration.

@github-actions github-actions bot added area: native port Host native arch port (native_sim) area: UART Universal Asynchronous Receiver-Transmitter labels Jul 15, 2025
@github-actions github-actions bot requested review from aescolar and dcpleung July 15, 2025 12:49
@vytvir vytvir force-pushed the main branch 2 times, most recently from db5efa6 to 717c119 Compare July 15, 2025 13:00
@aescolar
Copy link
Member

aescolar commented Jul 15, 2025

(Just for info) Related to #69101
CC @MarkoSagadin

@vytvir
Copy link
Contributor Author

vytvir commented Jul 15, 2025

(Just for info) Related to #69101 CC @MarkoSagadin

Oh, didn't notice that.

@aescolar
Copy link
Member

aescolar commented Jul 16, 2025

Thanks for the PR @vytvir.
Any reason to not just return the value provided during config?
(see discussion on the same topic here:
#69101 (review)
#69101 (comment)
#69101 (comment)
)

@vytvir
Copy link
Contributor Author

vytvir commented Jul 16, 2025

Thanks for the PR @vytvir. Any reason to not just return the value provided during config? (see discussion on the same topic here: #69101 (review) #69101 (comment) #69101 (comment) )

From @dcpleung comment:

However, if the underlying hardware (in this case the underlying TTY) changes stuff on its own, it will be better to grab bits from the hardware so a proper and correct config can be programmed later.

This was my assumption too. I guess for the sake of completeness it's a nice-to-have, but not strictly neccecary?

That said, I just wanted the u_blox m8 driver to run without error'ing out. So I'm fine with either option.

Copy link
Member

@aescolar aescolar left a comment

Choose a reason for hiding this comment

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

Thanks @vytvir just a few minor silly things.

@vytvir
Copy link
Contributor Author

vytvir commented Jul 17, 2025

Requested changes by @aescolar completed.

This commit adds config_get support for native_tty. This is helpful as
some driver code (e.g. u_blox m8) will error out if they can't read the
current configuration.

Signed-off-by: Vytautas Virvičius <vytautas@virvicius.dev>
Copy link

Comment on lines +346 to +348
int err = 0;

err = errno;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
int err = 0;
err = errno;
int err = errno;

Just saw this now, but you don't need to bother with it if you don't need to push again

@vytvir
Copy link
Contributor Author

vytvir commented Jul 23, 2025

Hi @dcpleung , could you give this a review?

@nashif nashif merged commit e1eaa0e into zephyrproject-rtos:main Jul 24, 2025
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: native port Host native arch port (native_sim) area: UART Universal Asynchronous Receiver-Transmitter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants