Commit Graph

19 Commits

Author SHA1 Message Date
Richard Hughes
a70d005ea3 trivial: Use a better error message disambiguate an error message 2022-06-23 21:56:06 +01:00
Richard Hughes
fc2da47b69 Remove fu_strtoull_full() 2022-06-14 14:36:52 -05:00
Richard Hughes
9d33c29e92 Split out the string helpers to a new source file 2022-06-14 14:36:52 -05:00
Gaël PORTAY
407ce2655c trivial: Add quirk definitions for CFI
This adds the missing definitions for the CFI quirks.
2022-06-08 07:56:07 +01:00
Richard Hughes
91e9f359c3 Add a plugin for the CH341A device 2022-04-03 16:29:30 +01:00
Richard Hughes
18f3b927e0 Add some default size values to the CFI device 2022-04-01 19:35:36 +01:00
Richard Hughes
356bd2fa5e Use the CFI manufacturer ID to set the vendor 2022-03-31 15:44:54 +01:00
Richard Hughes
dcd39d80a7 Add the CFI quirks in setup() so the device can be open 2022-03-31 12:47:13 +01:00
Richard Hughes
691166d203 trivial: Use a short string form for the CFI commands 2022-03-30 18:45:49 +01:00
Richard Hughes
c4ca026294 Allow devices to build instance IDs more easily
Provide a device instance builder that allows plugins to easily
create multiple instance IDs based on parent attributes.

Also fix a lot of the instance ID orders, so that we add more generic
IDs first, and more specific IDs after.
2022-03-03 09:13:29 +00:00
Richard Hughes
2e99055d1e trivial: Add some more annotations for language bindings 2022-01-03 22:46:23 +00:00
Gaël PORTAY
53ed50e1c9 Add block erase command to FuCfiDevice 2021-12-15 17:49:32 +00:00
Gaël PORTAY
428f3d5b99 Add block size properties to FuCfiDevice 2021-12-15 17:49:32 +00:00
Richard Hughes
f9a7bcae0a Add page and sector size properties to FuCfiDevice 2021-12-09 13:09:43 +00:00
Richard Hughes
58d36dcbe5 Check the value range when parsing the quirk keys
At the moment there isn't an error if you enter something like

    CfiDeviceCmdReadId = 0×12
2021-12-09 13:09:43 +00:00
Richard Hughes
f5f3e244c9 trivial: Allow quirking all CFI commands 2021-12-09 13:09:43 +00:00
Richard Hughes
c877593803 Add the CFI JEDEC instance ID if using vendor-extended version
Setting a flash ID of `C84016` would then add `CFI\FLASHID_C84016` and
also `CFI\FLASHID_C840`. This makes it easier to write quirks.
2021-12-09 13:09:43 +00:00
Gaël PORTAY
acb4d6e2ce trivial: cfi: Fix up a typo 2021-12-07 10:17:54 +00:00
Richard Hughes
6235a8222a Share the Common Flash Memory Interface quirks between plugins
Now two plugins are using hardcoded SPI constants for various CFI chips,
and it makes sense to have some common quirk data that can be used by
both.

Add a FuSpiChip helper object that can be used by FuDevice subclasses
to get the specific SPI commands to use for each flash ID.
2021-10-20 12:19:39 +01:00