We have some places where we need to check if the system has certain compatible devices installed, usually for the purpose of checking if certain types of acceleration are supported. Adding new devices can be an annoying when we use a device id regex. See https://github.com/vyos/vyos-1x/pull/4375/files for example — such regexes have a potential to grow out of control.
It would be nice to have a uniform way to find devices. lspci doesn't support machine-readable outputs natively, but lshw does (even though it's a bit slow). We could use that as an input for the search function.