Skip to content

Commit

Permalink
drivers: i3c: shell: add parse args func for rstact
Browse files Browse the repository at this point in the history
Add the parse args function for the rstact

Signed-off-by: Ryan McClelland <[email protected]>
  • Loading branch information
XenuIsWatching authored and MaureenHelm committed Sep 30, 2024
1 parent aac1584 commit 7e21f2e
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions drivers/i3c/i3c_shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -1064,21 +1064,9 @@ static int cmd_i3c_ccc_rstact(const struct shell *sh, size_t argc, char **argv)
int ret;
uint8_t data;

dev = device_get_binding(argv[ARGV_DEV]);
if (!dev) {
shell_error(sh, "I3C: Device driver %s not found.", argv[ARGV_DEV]);
return -ENODEV;
}

tdev = device_get_binding(argv[ARGV_TDEV]);
if (!tdev) {
shell_error(sh, "I3C: Device driver %s not found.", argv[ARGV_TDEV]);
return -ENODEV;
}
desc = get_i3c_attached_desc_from_dev_name(dev, tdev->name);
if (!desc) {
shell_error(sh, "I3C: Device %s not attached to bus.", tdev->name);
return -ENODEV;
ret = i3c_parse_args(sh, argv, &dev, &tdev, &desc);
if (ret != 0) {
return ret;
}

action = strtol(argv[5], NULL, 16);
Expand Down

0 comments on commit 7e21f2e

Please sign in to comment.