base-modem: add subsystem device ID property

Subsystem device ID can be used for identifying PCI modems,
so expose the property.

Signed-off-by: Sushrut Shree Trivedi <quic_sushruts@quicinc.com>
This commit is contained in:
Sushrut Shree Trivedi
2025-02-21 10:39:29 +05:30
parent 894b517dae
commit 092439369b
50 changed files with 87 additions and 0 deletions
+12
View File
@@ -72,6 +72,8 @@ struct _MMDevicePrivate {
guint16 product;
/* Subsystem vendor ID for PCI devices */
guint16 subsystem_vendor;
/* Subsystem device ID for PCI devices */
guint16 subsystem_device;
/* Kernel drivers managing this device */
gchar **drivers;
@@ -269,6 +271,9 @@ mm_device_grab_port (MMDevice *self,
if (!self->priv->subsystem_vendor)
self->priv->subsystem_vendor = mm_kernel_device_get_physdev_subsystem_vid (kernel_port);
if (!self->priv->subsystem_device)
self->priv->subsystem_device = mm_kernel_device_get_physdev_subsystem_pid (kernel_port);
/* Add new port driver */
add_port_driver (self, kernel_port);
@@ -614,6 +619,13 @@ mm_device_get_subsystem_vendor (MMDevice *self)
return self->priv->subsystem_vendor;
}
guint16
mm_device_get_subsystem_device (MMDevice *self)
{
return self->priv->subsystem_device;
}
void
mm_device_set_plugin (MMDevice *self,
GObject *plugin)