hw/gpio/pca955x: Improvements around props "pin" and "led"
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest8 patches 26 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | hw/gpio/pca9552: Convert pin and led properties to class propertieshw/ | +11 | 2 replies | |
| 2/8 | hw/gpio/pca9554: Move most code from .h to .chw/ include/ | +24 | 3 replies | |
| 3/8 | hw/gpio/pca9554: Simplify QOM type creationhw/ | +2 | 2 replies | |
| 4/8 | hw/gpio/pca9554: New abstract base "pca9554-base"hw/ include/ | +33 | 9 replies | |
| 5/8 | hw/gpio/pca9554: Convert pin properties to class propertieshw/ | +8 | 2 replies | |
| 6/8 | hw/gpio/pca955x: use QAPI enums for led and pin propertieshw/ hw/ qapi/ | +69 | 3 replies | |
| 7/8 | hw/gpio/pca955x: Improve @qapi-type reported by qom-list etc.hw/ hw/ | +5 | 2 replies | |
| 8/8 | hw/gpio/pca955x: Simplify pin and led getters and settershw/ hw/ | +25 | 3 replies |
Reviews trailers per patch
All 8 patches have a Reviewed-by or Acked-by.
| Patch | Glenn Miles | Mark Cave-Ayland |
|---|---|---|
| 1/8 | R-b | R-b |
| 2/8 | R-b | R-b |
| 3/8 | R-b | R-b |
| 4/8 | R-b | |
| 5/8 | R-b | R-b |
| 6/8 | R-b | |
| 7/8 | R-b | R-b |
| 8/8 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/8] hw/gpio/pca955x: Improvements around props "pin" and "led"
Marc-André converted properties "pin" and "led" to QAPI enums in his "qom/qdev: associate properties with QAPI schema types". I dropped this part from v8, which has since been merged in commit c5fee4d93fd. I'm now bringing it back, reworked.
PATCH 1-5 convert these properties to class properties. See commit 7674a1880890 (qom: deprecate use of instance level properties) for why.
PATCH 6 is Marc-André's "[PATCH v7 48/65] hw/gpio/pca955x: use QAPI enums for led and pin properties" with the following tweaks:
* I don't change their @type in output of qom-list, qom-list-properties, qom-list-get, because that what the merged version of his series did.
* I replaced identical QAPI enums Pca9552PinState and Pca9554PinState by a single enum GpioPinState.
PATCH 7+8 replace Marc-André's "[PATCH v7 50/65] hw/gpio/pca955x:
convert pin/led property to QAPI-aware enum". Marc-André's used object_property_add_qapi_enum() (which has since been folded into object_property_add_enum()), but to be able to use it, he had to bake the index into getter and the setter functions. He generated them with the preprocessor. My version sticks to object_class_property_add(), so we can pass the index to getter and setter via parameter @opaque. Getter and setter remain slightly more complex, but don't turn into macros (decorated with backslashes) for sixteenfold duplication.
Perhaps object_class_property_add_enum() should support passing an opaque value to getter and setter.
Based-on: <[email protected]>
Marc-André Lureau (1):
hw/gpio/pca955x: use QAPI enums for led and pin properties
Markus Armbruster (7):
hw/gpio/pca9552: Convert pin and led properties to class properties hw/gpio/pca9554: Move most code from .h to .c hw/gpio/pca9554: Simplify QOM type creation hw/gpio/pca9554: New abstract base "pca9554-base" hw/gpio/pca9554: Convert pin properties to class properties hw/gpio/pca955x: Improve @qapi-type reported by qom-list etc. hw/gpio/pca955x: Simplify pin and led getters and setters
qapi/machine.json | 29 ++++++++ include/hw/gpio/pca9554.h | 26 +------ hw/gpio/pca9552.c | 149 +++++++++++++------------------------ hw/gpio/pca9554.c | 151 +++++++++++++++++++------------------- 4 files changed, 160 insertions(+), 195 deletions(-)
Signature · 1 line
2.55.0