vli: Use a more standard GUID for the child i²c and shared SPI devices

We sometiems need to restrict the firwmare to the parent VID:PID too.
This commit is contained in:
Richard Hughes 2019-12-20 09:07:17 +00:00
parent e2a9b15f16
commit 714c4ce9d3
3 changed files with 9 additions and 6 deletions

View File

@ -31,13 +31,13 @@ These devices also use custom GUID values for the SPI flash configuration, e.g.
* `VLI_USBHUB\SPI_3730`
* `VLI_USBHUB\SPI_37`
Optional PD child devices use just one extra GUID, e.g.
Optional PD child devices sharing the SPI flash use just one extra GUID, e.g.
* `VLI_USBHUB_PD\VID_17EF&PID_3083`
* `USB\VID_17EF&PID_3083&DEV_VL102`
Optional I²C child devices use just one extra GUID, e.g.
* `VLI_USBHUB_I2C\MSP430`
* `USB\VID_17EF&PID_3083&I2C_MSP430`
Vendor ID Security
------------------

View File

@ -58,7 +58,9 @@ fu_vli_usbhub_i2c_device_setup (FuDevice *device, GError **error)
}
/* add instance ID */
instance_id = g_strdup_printf ("VLI_USBHUB_I2C\\%s",
instance_id = g_strdup_printf ("USB\\VID_%04X&PID_%04X&I2C_%s",
fu_usb_device_get_vid (FU_USB_DEVICE (parent)),
fu_usb_device_get_pid (FU_USB_DEVICE (parent)),
fu_vli_common_device_kind_to_string (self->device_kind));
fu_device_add_instance_id (device, instance_id);

View File

@ -64,9 +64,10 @@ fu_vli_usbhub_pd_device_probe (FuDevice *device, GError **error)
fwver_str = fu_common_version_from_uint32 (fwver, FWUPD_VERSION_FORMAT_QUAD);
fu_device_set_version (device, fwver_str, FWUPD_VERSION_FORMAT_QUAD);
fu_device_set_version_raw (device, fwver);
instance_id1 = g_strdup_printf ("VLI_USBHUB_PD\\VID_%04X&PID_%04X",
instance_id1 = g_strdup_printf ("USB\\VID_%04X&PID_%04X&DEV_%s",
GUINT16_FROM_LE (self->hdr.vid),
GUINT16_FROM_LE (self->hdr.pid));
GUINT16_FROM_LE (self->hdr.pid),
fu_vli_common_device_kind_to_string (self->device_kind));
fu_device_add_instance_id (device, instance_id1);
/* these have a backup section */