fwupd/plugins/gpio
Richard Hughes c4b7f42e43 Only compress one version of the builtin-quirks
Saving the quirks in the GResource section worked well, but it made the build
system very complicated and also meant the .data section was duplicated in
both `fwupd` and `fwupdtool` -- negating a lot of the hard-fought savings.

Simplify this feature so that we just `cat` all the quirk files together, then
gzip them into a single file. This means that at startup fwupd only needs to
check the mtime of one file, and weirdly it's actually faster to load a smaller
compressed file from disk that it is to load multiple uncompressed files.
2022-09-27 12:44:04 +01:00
..
fu-gpio-device.c Remove duplicate ->probe() calls to speed up startup by 150ms 2022-06-14 21:01:57 +01:00
fu-gpio-device.h Add a plugin to set GPIOs for the duration of an update 2022-02-16 14:01:07 +00:00
fu-plugin-gpio.c Allow plugins and backends to print debugging information to the console 2022-07-28 16:10:06 +01:00
gpio.quirk Add a plugin to set GPIOs for the duration of an update 2022-02-16 14:01:07 +00:00
meson.build Only compress one version of the builtin-quirks 2022-09-27 12:44:04 +01:00
README.md Add a plugin to set GPIOs for the duration of an update 2022-02-16 14:01:07 +00:00

GPIO

Introduction

This plugin sets GPIO outputs either high or low before and/or after an update has been deployed.

GUID Generation

These device use GPIO gpiochip_info.label values, e.g.

  • GPIO\ID_INT3450:00

Quirk Use

This plugin uses the following plugin-specific quirks:

GpioForUpdate

The GPIO bit to set before the update is deployed e.g. INT3450:00,SPI_MUX,high. After the update has finished, the bits are returned to the default state.

For example, to set GPIO pin 2 low for the duration of the ColorHug device update this could be added to the quirk file:

[USB\VID_273F&PID_1001]
GpioForUpdate=fake-gpio-chip,2,low

Since: 1.7.6

External Interface Access

This plugin requires ioctl GPIO_GET_CHIPINFO_IOCTL and GPIO_V2_GET_LINE_IOCTL access on /dev/gpiochip* devices.