Richard Hughes
91bf84f7a0
trivial: Reduce runtime RSS requirement for each device subclass
...
Remove the FuDeviceClass padding, as this library now loaded using an rpath
rather than a shared library with a static API. This matches what we did for
the FuFirmwareClass objects a while ago.
2023-01-10 20:43:31 +00:00
Richard Hughes
ac48c865a0
Add a helper to get a GUsbDevice from a FuUdevDevice
2022-10-26 23:27:50 +01:00
Richard Hughes
2dea742004
Match the MEI UUID in quirk files
...
This allows us to be more specific when matching devices, and also means we get
more attributes 'for free' from the FuUdevDevice->probe().
This would allow us to have multiple device GTypes handling multiple MEI
interfaces in the same plugin., for instance, PTHI and MKHI.
The slight fly in the ointment is that the kernel does not set the 'dev' for
the mei_me devices, but it's always going to be just /dev/mei0, so hardcode it.
2022-10-12 13:17:42 +01:00
Richard Hughes
3d654e9b68
Enforce that the UDEV VEN:DEV is a uint16_t
...
This was incompletely fixed in bf256a7ca7
and changing the type means that the compiler finds any places where
we compare it with a uint32_t.
2022-06-30 14:17:53 +01:00
Richard Hughes
5cdb517056
Get the UDev vendor ID from the grandparent when required
2022-06-26 17:27:05 -05:00
Richard Hughes
3e0a4dc1c3
Be smarter and include less header files per source file
2022-06-14 14:36:52 -05:00
Richard Hughes
d6fd08e3a5
Remove some deprecated API
2022-06-03 13:47:11 -05:00
Richard Hughes
0cbcac93cd
Rename fu_udev_device_ioctl_full() as we broke ABI
2022-06-03 13:47:11 -05:00
Richard Hughes
029d2895bd
Rename fu_udev_device_pread_full() as we broke ABI
2022-06-03 13:47:11 -05:00
Richard Hughes
2fcdf352df
Retry the device ioctl for EAGAIN
2022-04-29 15:01:32 +01:00
Richard Hughes
bd02edcc43
trivial: Add missing API wrapper for future functionality
2022-02-21 18:57:20 +00:00
Richard Hughes
ed419416d5
Allow setting the FuUdevDevice bind-id at runtime
2021-11-05 15:00:10 +00:00
Richard Hughes
02222a58c8
trivial: Add FU_UDEV_DEVICE_FLAG_OPEN_SYNC for future code
2021-11-05 08:01:25 +00:00
Richard Hughes
0fb2ef3aae
trivial: Add fu_udev_device_seek() for future code
2021-11-05 08:01:25 +00:00
Richard Hughes
fe180cbf5d
trivial: Add fu_udev_device_get_sysfs_attr_uint64() for future code
2021-11-05 08:01:25 +00:00
Richard Hughes
bd43647554
Add fu_usb_device_new_with_context() helpers
...
This means the context is set at construction time, which is much less
fragile than setting the context manually.
2021-10-15 15:59:34 +01:00
Mario Limonciello
55de39c077
trivial: reformat the whole tree to match new format
2021-08-24 11:18:40 -05:00
Richard Hughes
f42b44e427
Remove some deprecated API
2021-08-06 19:49:53 +01:00
Peter Marheine
6281467a6b
Add a fu_udev_device_get_children_with_subsystem function
...
This works like fu_udev_device_get_siblings_with_subsystem but returns child
devices of self rather than siblings.
2021-06-28 10:09:52 +01:00
Richard Hughes
9a2e10c639
trivial: Export the matching fu_udev_device_set_dev()
2021-06-24 14:22:08 +01:00
Peter Marheine
da9a07ba8f
FuUdevDevice: add get_siblings_with_subsystem function
...
This function returns a list of sibling devices that have a chosen subsystem,
allowing callers to perform a limited walk of the device tree to locate related
devices.
2021-04-15 06:53:06 +01:00
Richard Hughes
2d84386034
Remove unused, unsafe and deprecated functions from libfwupdplugin
...
Keeping *internal* API and ABI compatibility makes working with an already
complex codebase more mentally demanding than it needs to be.
Remember: plugins should be in-tree and upstream! If your out of tree plugin
stops working then it should be upstream.
The public-facing libfwupd will remain API and ABI stable for obvious reasons.
2021-03-09 15:47:56 +00:00
Richard Hughes
bf3732f994
pixart: Use the bluetooth UUID to set the logical ID
...
This means you can have more than one device attached to the same controller.
2021-03-03 15:36:42 +00:00
Richard Hughes
5c9b1fcc81
Only include the start year in the copyright header
...
The end year is legally and functionally redundant, and more importantly causes
cherry-pick conflicts when trying to maintain old branches. Use git for history.
2021-01-07 14:48:16 +00:00
Richard Hughes
a2abc42760
libfwupdplugin: Use G_GNUC_WARN_UNUSED_RESULT for methods that should be checked
2021-01-04 15:24:35 +00:00
Richard Hughes
7a63a4c41c
Export the driver name from FuUdevDevice
...
We have to supply it when using fu_device_bind_driver(), so we need to get the
old value for ->attach() to avoid guessing what driver was previously loaded.
2020-12-01 14:15:33 +00:00
Richard Hughes
2bbb7d2b40
trivial: Merge some GtkDoc introspection fixes
2020-11-30 09:18:45 +00:00
Richard Hughes
496fb826f1
trivial: Add fu_udev_device_get_number()
2020-09-26 12:20:41 +01:00
Richard Hughes
0038b4a780
Allow plugins to match using the SUBSYS IDs
...
This is the same format specified by Microsoft in "Identifiers for PCI Devices"
https://docs.microsoft.com/en-us/windows-hardware/drivers/install/identifiers-for-pci-devices
2020-09-17 15:25:26 +01:00
Richard Hughes
9a07407401
Use the FuUdevDevice ->to_string() output
...
Print the sysfs path for devices deriving from FuUdevDevice, which also allows
us to use FU_UDEV_DEVICE_DEBUG without monkey-patching the plugins that also
define a device_class->to_string() vfunc.
2020-09-03 16:50:41 +01:00
Richard Hughes
8edaa89076
libfwupdplugin: Allow opening i2c devices with O_NONBLOCK
2020-07-28 14:19:24 +01:00
Mario Limonciello
a2431e07ff
trivial: fu-udev-device: add support for exporting the udev device type
...
This is useful in some plugins that will behave differently for
multiple device types.
2020-07-03 12:56:44 -05:00
Mario Limonciello
412e170b26
trivial: libfwupdplugin: add a new method to write strings to sysfs files
2020-06-22 16:09:10 -05:00
Richard Hughes
bdfccdf097
Allow multi-byte FuUdevDevice preads and writes
2020-05-29 17:34:18 +01:00
Richard Hughes
63fa4effd3
pci-mei: Check the ME device is not in manufacturing mode
2020-05-15 21:28:27 -05:00
Mario Limonciello
0d207d8dea
fu-udev-device: add fu_udev_device_get_parent_name
...
This will fetch the name from parent device
2020-04-29 13:15:45 -05:00
Mario Limonciello
224b685fae
fu-udev-device: Add support for reading arbitrary sysfs attributes
...
Some devices provide 'non-standard' attributes that are relevant
for use.
2020-04-29 13:15:45 -05:00
Richard Hughes
234ee64509
Allow specifying a list of subsystems when setting a physical ID
...
Sometimes we want to fall back to a different subsystem entirely.
2020-02-12 17:15:28 +00:00
Richard Hughes
63b9ac8844
Don't always get the vendor ID for udev devices using the parent
...
Fixes bugs like https://github.com/fwupd/fwupd/issues/1673
2020-01-06 14:48:58 +00:00
Richard Hughes
6c924a69c4
Add fu_udev_device_set_flags()
...
This allows us to specify with more detail how the device is opened.
2019-12-05 14:08:48 -06:00
Mario Limonciello
6b0e66354b
Convert libfwupdprivate to a shared library libfwupdplugin
2019-11-27 11:32:43 +00:00