Skip to content

usb: add --list flag for list devices #176

Merged
andersson merged 1 commit intolinux-msm:masterfrom
lucarin91:add-list-command
Feb 2, 2026
Merged

usb: add --list flag for list devices #176
andersson merged 1 commit intolinux-msm:masterfrom
lucarin91:add-list-command

Conversation

@lucarin91
Copy link
Copy Markdown
Contributor

I think it could be useful to expose a command to list all EDL-compatible devices.

Copy link
Copy Markdown
Collaborator

@andersson andersson left a comment

Choose a reason for hiding this comment

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

I really like this feature, please find some requests for improvements inline.

Rather than the "feat: " subject prefix, I think "usb: " would be better. Also please do include a commit message stating why this patch exist (to discover the serial numbers to be passed to --serial I presume?).

Please also add you Signed-off-by (git commit --amend -s) to give your certificate of the origin of this code.

Comment thread qdl.c Outdated
Comment thread usb.c Outdated
Comment thread usb.c Outdated
Comment thread qdl.c Outdated
Comment thread qdl.c Outdated
Comment thread usb.c Outdated
Comment thread usb.c Outdated
@lucarin91 lucarin91 changed the title feat: add usb list device command usb: add list device command Jan 22, 2026
@lucarin91 lucarin91 force-pushed the add-list-command branch 2 times, most recently from fa36cb8 to a90be2c Compare January 22, 2026 10:40
@lucarin91 lucarin91 changed the title usb: add list device command usb: add --list flag for list devices Jan 22, 2026
@lucarin91
Copy link
Copy Markdown
Contributor Author

lucarin91 commented Jan 22, 2026

I really like this feature, please find some requests for improvements inline.

Rather than the "feat: " subject prefix, I think "usb: " would be better. Also please do include a commit message stating why this patch exist (to discover the serial numbers to be passed to --serial I presume?).

Please also add you Signed-off-by (git commit --amend -s) to give your certificate of the origin of this code.

Hi, thanks for the review and the patience. I don't commonly program in C, so I am not aware of conventions and best practices.

I implemented all the review comments. Can you please have a look again?

I would also like some suggestions on the list output. Right now, it is very basic:

Device 05c6:9008 QUSB_BULK_CID:0420_SN:56FB668A

Do you think we should extract the serial number and maybe the part that indicates the board type? I think it is CID, right?

@lucarin91 lucarin91 requested a review from andersson January 22, 2026 11:01
@lucarin91 lucarin91 marked this pull request as ready for review January 22, 2026 11:03
Copy link
Copy Markdown
Collaborator

@andersson andersson left a comment

Choose a reason for hiding this comment

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

Thank you for the update, I provided some additional feedback.

I think we should parse out the SN: and print that. I'm not sure what the CID represents, the number I get from the board I have infront of me doesn't match anything in the Linux kernel socinfo table... But if you prefer you could parse that out as well, (I'd prefer storing that in a separate struct member) and then pretty print both.

Sorry for not thinking more about the qdl --list previously, but after trying this out a few times I really would prefer it to be "qdl list", I've provided a suggestion of how to implement this inline.

Again, that you for your contribution. This looks good, looking forward to your next revision!

Comment thread qdl.c Outdated
Comment thread qdl.c Outdated
Comment thread qdl.h
Comment thread usb.c Outdated
Comment thread usb.c Outdated
Copy link
Copy Markdown
Collaborator

@andersson andersson left a comment

Choose a reason for hiding this comment

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

I took the liberty of updating the change in accordance to the feedback I had provided.

When working with multiple devices and the --serial argument, the serial
numbers must be known.

Add a new command "qdl list" to list the connected devices in EDL mode
and their serial number.

Signed-off-by: lucarin91 <lucarin@protonmail.com>
[bjorn: Replaced --list with list, changed output to only print serial, some stylistic changes]
Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
@andersson andersson merged commit f32f5eb into linux-msm:master Feb 2, 2026
13 checks passed
@lucarin91
Copy link
Copy Markdown
Contributor Author

lucarin91 commented Feb 3, 2026

I took the liberty of updating the change in accordance to the feedback I had provided.

Thanks. Sorry, but I haven't had time these days to work on that.

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