Add support for udev based device discovery

This is primarily useful for SPI devices. These devices sometimes needs
a combination of an SPI and HID device, so discovery is a bit more
complicated.
This commit is contained in:
Matthew Mirvish
2021-04-08 16:46:01 +02:00
committed by Benjamin Berg
parent e95056aa86
commit b0d9d00762
9 changed files with 242 additions and 9 deletions

View File

@@ -28,18 +28,23 @@ typedef struct
GUsbDevice *usb_device;
const gchar *virtual_env;
struct
{
gchar *spidev_path;
gchar *hidraw_path;
} udev_data;
gboolean is_removed;
gboolean is_open;
gboolean is_removed;
gboolean is_open;
gchar *device_id;
gchar *device_name;
FpScanType scan_type;
gchar *device_id;
gchar *device_name;
FpScanType scan_type;
guint64 driver_data;
guint64 driver_data;
gint nr_enroll_stages;
GSList *sources;
gint nr_enroll_stages;
GSList *sources;
/* We always make sure that only one task is run at a time. */
FpiDeviceAction current_action;