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: i3c: shell: fixups and streamline codebase #78376

Merged
merged 4 commits into from
Sep 17, 2024

Conversation

ndrs-pst
Copy link
Contributor

Several fixups and streamline codebase as follows:

  • fix compilation error in cmd_i3c_ccc_getmxds
  • fix unhandled <id> argument parsing
  • align struct shell * argument name to sh
  • use shell_fprintf_normal instead of shell_fprintf

Resolved a compilation error where `maxwr`, `maxrd`, and
`max_read_turnaround` were incorrectly referenced.

The code was updated to correctly access these fields from
the `data_speed` structure.

Signed-off-by: Pisit Sawangvonganan <[email protected]>
The `<id>` argument was included in `cmd_i3c_ccc_getvendor`,
`cmd_i3c_ccc_setvendor`, and `cmd_i3c_ccc_setvendor_bc` but
was not processed.

Utilized `shell_strtoul` for proper parsing of the `<id>` argument
in these functions.

Signed-off-by: Pisit Sawangvonganan <[email protected]>
Aligned the `struct shell *` argument name from `shell_ctx` to `sh`
for consistency with other drivers' usage of `sh`, and to match
the `shell_cmd_handler` argument name.

Signed-off-by: Pisit Sawangvonganan <[email protected]>
…intf`

Due to the introduction of `shell_fprintf_normal` in PR zephyrproject-rtos#77192, we can
minimize caller overhead by eliminating direct `color` parameter passing.

Signed-off-by: Pisit Sawangvonganan <[email protected]>
@XenuIsWatching
Copy link
Member

We really should get this shell in the CI somehow so I don't make copy and paste mistakes between forks 😅

@nashif nashif merged commit 7a59ebf into zephyrproject-rtos:main Sep 17, 2024
26 checks passed
@ndrs-pst ndrs-pst deleted the pr_drivers_i3c_shell_fixups branch September 17, 2024 09:32
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.

5 participants