diff options
author | Philippe Mathieu-Daudé <f4bug@amsat.org> | 2020-06-23 09:27:18 +0200 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2020-06-26 14:30:28 +0100 |
commit | 736132e455eea08e37fe21b4140b8088f2c0956b (patch) | |
tree | 1b0e428fade5e1f533d4cb2f17154eb07ade4867 /include/hw/misc | |
parent | ec17228a25e7fd46287842322f8dc4923eccca92 (diff) | |
download | qemu-736132e455eea08e37fe21b4140b8088f2c0956b.zip qemu-736132e455eea08e37fe21b4140b8088f2c0956b.tar.gz qemu-736132e455eea08e37fe21b4140b8088f2c0956b.tar.bz2 |
hw/misc/pca9552: Add generic PCA955xClass, parent of TYPE_PCA9552
Extract the code common to the PCA955x family in PCA955xClass,
keeping the PCA9552 specific parts into pca9552_class_init().
Remove the 'TODO' comment added in commit 5141d4158cf.
Suggested-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Cédric Le Goater <clg@kaod.org>
Message-id: 20200623072723.6324-5-f4bug@amsat.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include/hw/misc')
-rw-r--r-- | include/hw/misc/pca9552.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/hw/misc/pca9552.h b/include/hw/misc/pca9552.h index db52759..90843b0 100644 --- a/include/hw/misc/pca9552.h +++ b/include/hw/misc/pca9552.h @@ -12,9 +12,11 @@ #include "hw/i2c/i2c.h" #define TYPE_PCA9552 "pca9552" -#define PCA955X(obj) OBJECT_CHECK(PCA955xState, (obj), TYPE_PCA9552) +#define TYPE_PCA955X "pca955x" +#define PCA955X(obj) OBJECT_CHECK(PCA955xState, (obj), TYPE_PCA955X) #define PCA955X_NR_REGS 10 +#define PCA955X_PIN_COUNT_MAX 16 typedef struct PCA955xState { /*< private >*/ @@ -25,8 +27,6 @@ typedef struct PCA955xState { uint8_t pointer; uint8_t regs[PCA955X_NR_REGS]; - uint8_t max_reg; - uint8_t pin_count; } PCA955xState; #endif |