Commit Graph

1843 Commits

Author SHA1 Message Date
Richard Hughes
23b9c9d78d trivial: Use the per-plugin cache for the runtime device
There is no point having two hash tables doing the same thing...
2017-01-10 16:09:38 +00:00
Richard Hughes
0de35b058d unifying: Subclass FuDevice like the altos plugin 2017-01-10 16:09:32 +00:00
Richard Hughes
a4e44ce39b altos: Set the flags in the init_real so they work for the cmdline tool 2017-01-10 16:09:32 +00:00
Richard Hughes
b721d4326f ebitdo: Subclass FuDevice like the altos plugin
This makes things much simpler.
2017-01-10 14:02:16 +00:00
Richard Hughes
dc390e3a68 trivial: Set up two flags not set by cfmakeraw() 2017-01-10 12:49:52 +00:00
Richard Hughes
7a44ff9748 altos: Add error checking when using termios 2017-01-10 12:48:08 +00:00
Richard Hughes
b082903c5f Add fu_plugin_set_coldplug_delay() to allow hardware to initialize if required 2017-01-10 09:27:08 +00:00
Richard Hughes
10ec93b187 Revert "thunderbolt: add some guards around empty arrays"
This reverts commit 5f1c991c40.
2017-01-09 21:34:43 +00:00
Richard Hughes
efa55b83a7 dell: Fix possible linker problem
The linker does not know which public symbol to call if a plugin calls it's own
symbol. Without this change one plugin could call into another plugin with the
wrong GsPluginData set.
2017-01-09 21:32:44 +00:00
Richard Hughes
2b464378ea trivial: Add flags to fu_device_altos_write_firmware() 2017-01-09 21:25:50 +00:00
Mario Limonciello
2bcc151619 dell: Adjust the coldplug preparation and cleanup sequence
Unfortunately no indication is made that a GPIO change is
done so some time needs to be left to make sure this happened.
2017-01-09 13:31:35 -06:00
Mario Limonciello
5f1c991c40 thunderbolt: add some guards around empty arrays
Depending upon the call order and devices coming or going these
may or may not have anything actually contained which will cause
segfaults otherwise.
2017-01-09 11:11:19 -06:00
Richard Hughes
05133fefb7 Add support for flashing the ChaosKey 2017-01-09 12:21:35 +00:00
Richard Hughes
4ff3169556 thunderbolt: Detecting new devices and add an actual device to the daemon
Also, add an untested update implementation.

Based on a patch by Eric Rubin-smith <ericx.rubin-smith@intel.com>, many thanks.
2017-01-08 16:14:35 +00:00
Richard Hughes
1d511fafa6 trivial: Fix a uninitialized value in the dell plugin
Spotted using clang.
2017-01-07 22:14:28 +00:00
Richard Hughes
c7ea2a2369 trivial: Fix up two compile warnings 2017-01-07 22:10:14 +00:00
Richard Hughes
46487c944a Add the ability to run a prepare->exec->cleanup on coldplug
The idea here is that plugins can 'wake up' hardware in prepare, and put it
back into powersaving mode when doing cleanup.
2017-01-07 21:26:36 +00:00
Richard Hughes
57d8bf6590 trivial: Fix a compile warning in the dell plugin 2017-01-07 21:15:46 +00:00
Mario Limonciello
5723c2f643 dell: Add coldplug methods to let other plugins turn on TBT/GPIO
Remove the dummy devices created for NVM and MST, these will
be created by other plugins.  Other plugins will however
be using the Dell methods to enable these devices.
2017-01-06 15:25:57 -06:00
Mario Limonciello
ddeb0297bf trivial: dell: remove unnecessary usb_ctx after moving to plugins 2017-01-06 12:03:21 -06:00
Mario Limonciello
49c96b8941 trivial: dell: remove unnecessary include 2017-01-06 12:03:21 -06:00
Richard Hughes
7ceb318a27 Add fwupd_result_get_device_version_bootloader()
This functionality is required so that AppStream metadata can check the fwupd
version, the firmware version, bootloader version or a combination of all three.
2016-12-23 11:21:22 +00:00
Richard Hughes
0075a98b51 unifying: Use the actual bootloader VID/PIDs when in firmware mode 2016-12-16 21:24:55 +00:00
Richard Hughes
04042a10e8 trivial: Fix a tiny memory leak in the Udev plugin
Also, fix some method prefixes to match the plugin name.
2016-12-16 14:03:08 +00:00
Richard Hughes
a59777ad8d Add initial skeleton for Intel Thunderbolt support 2016-12-16 12:41:57 +00:00
Richard Hughes
598a40d746 trivial: Use a delay when adding Udev devices
There might be a better plugin to claim these than the generic fallback.
2016-12-16 12:41:57 +00:00
Richard Hughes
ae3d65f60b Move the device add delay to shared code
This allows us to reuse the logic in other plugins.
2016-12-16 12:41:57 +00:00
Richard Hughes
74702297b2 Move the Option ROM parsing to the Udev plugin 2016-12-15 17:09:38 +00:00
Mario Limonciello
3b09e323c8 trivial: whitespace fixes in dell plugin 2016-12-15 10:30:41 -06:00
Mario Limonciello
9bb952ac7e dell: add a new method for forcing a controller to flash mode
This method will be used in conjunction with other new plugins
in the future that will perform online flashes.
2016-12-15 10:30:37 -06:00
Richard Hughes
0c7c4e4406 trivial: Use the HIDPP constants from libratbag 2016-12-15 16:26:30 +00:00
Richard Hughes
561c457149 trivial: Use unique profiling IDs in plugins 2016-12-15 12:55:21 +00:00
Richard Hughes
c591460ff8 trivial: Fix a warning when compiling the unifying plugin 2016-12-14 10:52:44 +00:00
Mario Limonciello
02ccecb2be fix dfu plugin loading
failed to open plugin
/usr/lib/x86_64-linux-gnu/fwupd-plugins-2/libfu_plugin_dfu.so:
failed to open plugin:
/usr/lib/x86_64-linux-gnu/fwupd-plugins-2/libfu_plugin_dfu.so:
undefined symbol: dfu_device_upload
2016-12-13 13:19:55 -06:00
Mario Limonciello
f074b0d367 Fix udev plugin loading
failed to open plugin /usr/lib/x86_64-linux-gnu/fwupd-plugins-2/libfu_plugin_udev.so:
failed to open plugin: /usr/lib/x86_64-linux-gnu/fwupd-plugins-2/libfu_plugin_udev.so:
undefined symbol: g_udev_device_get_property
2016-12-13 13:19:51 -06:00
Mario Limonciello
e781bb9b64 trivial: fix cosmetic fallout from provider -> plugin
some code (such as libfwupd) still internally refers to provider,
but this will need to be more carefully massaged
2016-12-13 12:25:09 -06:00
Mario Limonciello
6a1cbc61b2 trivial: correct raspberry pi error message 2016-12-13 12:03:49 -06:00
Richard Hughes
4232185bec trivial: Remove some false-positive messages when using clang 2016-12-13 16:01:52 +00:00
Richard Hughes
ee54d32f4d trivial: Fix a Coverity false positive 2016-12-12 17:02:10 +00:00
Richard Hughes
59a9344c1e Move the UPower functionality to a plugin 2016-12-12 16:28:16 +00:00
Richard Hughes
864363e139 Add support for Logitech Unifying devices
If you do not have Unifying hardware you can emulate writing firmware using:

$ fu-unifying-tool write file.hex -v --emulate=bootloader-nordic
2016-12-12 15:36:53 +00:00
Richard Hughes
cff38bcb3a Convert the providers to plugins to simplify code and for future features
This is a large commit that removes all the providers and turns them into
plugins. I think having both providers _and_ plugins was super confusing.

Plugins are loaded at runtime so you could in theory develop a new plugin
without putting it in the fwupd source tree, although there are no installed
headers or PC files as I'm not sure it's a good idea at this stage.

This commit moves all the per-provider docs, tests, notes, debug dumps and test
data to plugin-specific directories -- these also allows the plugin author to
"own" more of the source tree so we don't enforce fu- prefixes and the style
guide everywhere.

This allows us to run the same action on all the plugins in the future, so we
could have a prepare(FuPlugin, FuDevice) and cleanup(FuPlugin, FuDevice) run
on *all* plugins, so doing an update using one plugin would allow us to work
around hardware quirks in other plugins.

If I've broken your out-of-tree provider it's trivial to port to the new API
with sed and a fixed up build file. If you need help please let me know.
2016-12-12 12:31:23 +00:00
Richard Hughes
319a6bab12 Move the plugins into plugin-specific directories
This will allow us to add further documentation here in the future.
2016-12-12 11:52:03 +00:00