Commit Graph

16 Commits

Author SHA1 Message Date
Richard Hughes
518712ac09 vli: Only do the APP5 FW bug fix on affected hardware 2020-04-17 16:09:32 +01:00
Richard Hughes
a8c6c02459 Do not conditionalize attach() and detach() on IS_BOOTLOADER
This is nice in theory, until you need to look at the bootloader status of the
parent, or of a different device entirely. Handle this in plugins for the few
cases we care about and stop setting or clearing IS_BOOTLOADER manually just to
get the vfuncs to be run.

Note: I do not think we want to use cleanup() for attaching devices not in
bootloader states -- as cleanup is only run at the end of the composite update.
2020-04-09 09:55:30 +01:00
Richard Hughes
6fa43550fc vli: Wait for the VL103 to timeout to fix detach
The default re-enumeration delay is not sufficient.
2020-03-31 09:34:15 +01:00
Emily
5f3a2c0bc1 vli: Only consider the high nibble when building the sub-version 2020-03-23 08:11:14 +00:00
Richard Hughes
ed07a17509 vli: Correctly attach VL103 after a firmware update
This works around a silicon errata which makes the existing 0xB0 chip reset
non-functional.

ALso, as VL10x and VL103 are so different now, use different `->attach()` and
`->detach()` implementations for code sanity.

Based on a patch by Sherlock Chu <SherlockChu@via-labs.com>, many thanks.
2020-03-19 06:43:42 +00:00
Richard Hughes
3dadb99c6c vli: Add some trivial debugging to help track down a bug 2020-03-16 11:56:35 +00:00
Richard Hughes
f4f4ebe0a2 vli: Ignore one more error when attaching 2020-03-10 12:11:19 +00:00
Richard Hughes
aebd90baad vli: Fix VL103 reboot from ROM mode to FW mode
The logic was wrong; we should have been using command 0xB0 for attach back to
FW mode for both VL10x and VL103. Using a generic reset on VL103 always reset
the device back into bootloader mode as the ROM signatures were being written
by command 0xC0.

As now attach and detach have different code paths, there's no point having a
`FuVliDevice->reset()` vfunc, and so we can make everything a little simpler at
the same time.
2020-03-10 10:46:01 +00:00
Richard Hughes
df2ae010d5 vli: Add some better comments for writing GPIOs 2020-03-10 10:42:52 +00:00
Richard Hughes
f50ff2c27e Decouple the version format from the version itself
If we say that the version format should be the same for the `version_lowest`
and the `version_bootloader` then it does not always make sense to set it at
the same time.

Moving the `version_format` to a standalone first-class property also means it
can be typically be set in the custom device `_init()` function, which means we
don't need to worry about *changing* ther version format as set by the USB and
UDev superclass helpers.
2020-02-25 14:00:09 +00:00
Richard Hughes
00a0be068a vli: Add support for the PS186 device 2020-02-11 12:08:37 +00:00
Richard Hughes
e17dd6f0cd vli: Use the correct command to get the device firmware version
Mea culpa; I misread the example code. It's a different command entirely.
2020-02-06 20:38:19 +00:00
Richard Hughes
6afe612c2f vli: Correctly reset all VL100 devices
The reset happens before the USB transfer completes.
2020-02-06 20:38:19 +00:00
Richard Hughes
4359ea9017 vli: Set all standalone PD devices to not do SPI auto-detection 2020-02-06 20:38:19 +00:00
Richard Hughes
9d22db26f9 vli: Mark standalone PD devices as updatable 2020-02-06 20:38:19 +00:00
Richard Hughes
a24752d661 vli: Add support for standalone Single PD devices 2020-01-02 13:24:13 +00:00