fpi-device: Add FpiDeviceFeature flags to FpDeviceClass

Allows drivers to define more fine grained features for devices, not
strictly depending on assumptions we can make depending on the
implemented vfuncs.

We keep this per class but could be in theory moved to each instance.

In any case, added an utility function to initialize it in the way we
can ensure that we've a consistent way for setting them across all the
devices.
This commit is contained in:
Marco Trevisan (Treviño)
2020-12-08 04:16:31 +01:00
parent 355957919e
commit 8d545a0b95
12 changed files with 272 additions and 14 deletions

View File

@@ -279,4 +279,6 @@ fpi_device_fake_class_init (FpiDeviceFakeClass *klass)
dev_class->list = fpi_device_fake_list;
dev_class->delete = fpi_device_fake_delete;
dev_class->cancel = fpi_device_fake_cancel;
fpi_device_class_auto_initialize_features (dev_class);
}