annotate libuwrap/find_dev.h @ 39:b9ecfa54fe2b

fc-duart28-conf: replace find and check-eeprom with single show command The original design with separate find and check-eeprom commands was driven by the assumption that we had to bump off the ftdi_sio driver in order to read the EEPROM, while a USB device tree check could be done non-invasively. However, now that we know that we can read the EEPROM non-invasively too, we can simplify the tool with a single show command.
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 10 Sep 2023 19:21:20 +0000
parents fe4231326fb2
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9
ab506f6aa57c libuwrap started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /*
ab506f6aa57c libuwrap started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 * This header file contains definitions and declarations related to
ab506f6aa57c libuwrap started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 * functions for locating specific FTDI/CP2102/etc USB devices.
ab506f6aa57c libuwrap started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 */
ab506f6aa57c libuwrap started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5
ab506f6aa57c libuwrap started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 struct usbdev_matchspec {
ab506f6aa57c libuwrap started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 unsigned usb_vid;
ab506f6aa57c libuwrap started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 unsigned usb_pid;
11
fe4231326fb2 libuwrap: implement locating by description-string
Mychaela Falconia <falcon@freecalypso.org>
parents: 9
diff changeset
9 const char *manuf_string;
fe4231326fb2 libuwrap: implement locating by description-string
Mychaela Falconia <falcon@freecalypso.org>
parents: 9
diff changeset
10 const char *product_string;
fe4231326fb2 libuwrap: implement locating by description-string
Mychaela Falconia <falcon@freecalypso.org>
parents: 9
diff changeset
11 const char *serial;
9
ab506f6aa57c libuwrap started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 unsigned index;
ab506f6aa57c libuwrap started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 };
ab506f6aa57c libuwrap started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14
ab506f6aa57c libuwrap started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 extern struct usb_device *
ab506f6aa57c libuwrap started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 find_usbdev_by_matchspec(const struct usbdev_matchspec *match);
ab506f6aa57c libuwrap started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17
ab506f6aa57c libuwrap started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 extern struct usb_device *
ab506f6aa57c libuwrap started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 find_usbdev_by_busdev(const char *bus_dev_spec);
ab506f6aa57c libuwrap started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20
ab506f6aa57c libuwrap started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 extern struct usb_device *
ab506f6aa57c libuwrap started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 find_usbdev_by_desc_string(const char *desc_string);