hw: Categorize few devices and add their descriptions
Subsystems (4)
cover hw: Categorize few devices and add their descriptions
Few devices are user-creatable but miss a description, and sometimes are not categorized (or mis-categorized).
Some, being qdev and not sysbus, are automatically user-creatable, but are part of SoC.
Fix that.
Philippe Mathieu-Daudé (12):
hw/audio/wm8750: Categorize and add description hw/block/m25p80: Categorize and add description hw/display/dm163: Add description hw/dma/i82374: Categorize and add description hw/gpio/pca9552: Categorize and add description hw/i2c/pca954x: Categorize and add description hw/misc/axp2xx: Categorize and add description hw/misc/pll: Do not expose as user-creatable hw/nvram/xlnx-efuse: Do not expose as user-creatable hw/rtc: Categorize and add description hw/sensor/temp: Categorize and add description hw/s390x/zpci: Re-categorize as BRIDGE
hw/audio/wm8750.c | 2 ++ hw/block/m25p80.c | 2 ++ hw/display/dm163.c | 2 +- hw/dma/i82374.c | 2 ++ hw/gpio/pca9552.c | 2 ++ hw/i2c/i2c_mux_pca954x.c | 8 +++++++- hw/misc/axp2xx.c | 5 +++++ hw/misc/bcm2835_cprman.c | 8 ++++++++ hw/misc/npcm_clk.c | 6 ++++++ hw/misc/stm32l4x5_rcc.c | 4 ++++ hw/nvram/xlnx-efuse.c | 2 ++ hw/rtc/ds1338.c | 2 ++ hw/rtc/m41t80.c | 2 ++ hw/rtc/rs5c372.c | 2 ++ hw/s390x/s390-pci-bus.c | 2 +- hw/sensor/dps310.c | 2 ++ hw/sensor/emc141x.c | 6 ++++++ hw/sensor/tmp105.c | 2 ++ hw/sensor/tmp421.c | 4 ++++ 19 files changed, 62 insertions(+), 3 deletions(-)
Signature · 1 line
2.47.1
PATCH 1/12 hw/audio/wm8750: Categorize and add description
--- hw/audio/wm8750.c | 2 ++ 1 file changed, 2 insertions(+)
hw/audio/wm8750.c +2 -0
@@ -721,6 +721,8 @@ static void wm8750_class_init(ObjectClass *klass, void *data) sc->send = wm8750_tx; dc->vmsd = &vmstate_wm8750;device_class_set_props (dc, wm8750_properties); +set_bit (DEVICE_CATEGORY_SOUND , dc->categories); + dc->desc ="WM8750 Stereo CODEC" ; }static const TypeInfo wm8750_info = {
Signature · 1 line
2.47.1
Re: [PATCH-for-10.0 01/12] hw/audio/wm8750: Categorize and add description
Quoted 10 lines · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/audio/wm8750.c | 2 ++ 1 file changed, 2 insertions(+)hw/audio/wm8750.c +0
-0
hw/audio/wm8750.c static void wm8750_class_init(ObjectClass *klass, void *data) · line 728
Quoted 8 lines
hw/audio/wm8750.c +2
-0@@ -721,6 +721,8 @@ static void wm8750_class_init(ObjectClass *klass, void *data) sc->send = wm8750_tx; dc->vmsd = &vmstate_wm8750;device_class_set_props (dc, wm8750_properties); +set_bit (DEVICE_CATEGORY_SOUND , dc->categories); + dc->desc ="WM8750 Stereo CODEC" ; }static const TypeInfo wm8750_info = {
Re: [PATCH-for-10.0 01/12] hw/audio/wm8750: Categorize and add description
Quoted 6 lines · Thomas Huth
Quoted 5 lines · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
hw/audio/wm8750.c| 2 ++1 file changed, 2 insertions(+)
Quoted 15 lines
hw/audio/wm8750.c static void wm8750_class_init(ObjectClass *klass, void · line 728
Quoted 13 lines
hw/audio/wm8750.c +2
-0@@ -721,6 +721,8 @@ static void wm8750_class_init(ObjectClass *klass, void *data) sc->send = wm8750_tx; dc->vmsd = &vmstate_wm8750; device_class_set_props(dc, wm8750_properties); + set_bit(DEVICE_CATEGORY_SOUND, dc->categories); + dc->desc = "WM8750 Stereo CODEC"; } static const TypeInfo wm8750_info = {Reviewed-by Thomas Huth <[email protected]>
Looking at this twice, I think the patch is not OK in its current shape: The wm8750 device now shows up twice in the output of "-device help", once in the "Sound" category and once in the "Misc" category (inherited from I2C device). That's somewhat ugly. I guess you'd need to remove the MISC bit here to clean that up?
Thomas
Re: [PATCH-for-10.0 01/12] hw/audio/wm8750: Categorize and add description
Quoted 23 lines · Thomas Huth
Quoted 6 lines · Thomas Huth
Quoted 5 lines · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
hw/audio/wm8750.c| 2 ++1 file changed, 2 insertions(+)Quoted 15 lines
hw/audio/wm8750.c static void wm8750_class_init(ObjectClass *klass, void · line 728
Quoted 13 lines
hw/audio/wm8750.c +2
-0@@ -721,6 +721,8 @@ static void wm8750_class_init(ObjectClass *klass, void *data) sc->send = wm8750_tx; dc->vmsd = &vmstate_wm8750; device_class_set_props(dc, wm8750_properties); + set_bit(DEVICE_CATEGORY_SOUND, dc->categories); + dc->desc = "WM8750 Stereo CODEC"; } static const TypeInfo wm8750_info = {Reviewed-by Thomas Huth <[email protected]>
Quoted 1 line
Looking at this twice, I think the patch is not OK in its current shape: The wm8750 device now shows up twice in the output of "-device help", once in the "Sound" category and once in the "Misc" category (inherited from I2C device). That's somewhat ugly. I guess you'd need to remove the MISC bit here to clean that up?
Maybe we could add an i2c category for those devices? But in this case it fits in multiple categories.
Regards,
BALATON Zoltan
Re: [PATCH-for-10.0 01/12] hw/audio/wm8750: Categorize and add description
Quoted 24 lines · BALATON Zoltan
Quoted 23 lines · Thomas Huth
Quoted 21 lines · Thomas Huth
Quoted 10 lines · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
hw/audio/wm8750.c| 2 ++1 file changed, 2 insertions(+)hw/audio/wm8750.c +0
-0hw/audio/wm8750.c static void wm8750_class_init(ObjectClass *klass, · line 728
Quoted 8 lines
hw/audio/wm8750.c +2
-0@@ -721,6 +721,8 @@ static void wm8750_class_init(ObjectClass *klass, void *data) sc->send = wm8750_tx; dc->vmsd = &vmstate_wm8750; device_class_set_props(dc, wm8750_properties); + set_bit(DEVICE_CATEGORY_SOUND, dc->categories); + dc->desc = "WM8750 Stereo CODEC"; } static const TypeInfo wm8750_info = {Reviewed-by Thomas Huth <[email protected]>
Quoted 3 lines
Quoted 1 line
Looking at this twice, I think the patch is not OK in its current shape: The wm8750 device now shows up twice in the output of "-device help", once in the "Sound" category and once in the "Misc" category (inherited from I2C device). That's somewhat ugly. I guess you'd need to remove the MISC bit here to clean that up?
Maybe we could add an i2c category for those devices? But in this case it fits in multiple categories.
I think we should aim for the most specific category only. For example, we also have things like "usb-mouse" or "usb-tablet", but these only show up in the "input" category, and not in the "USB device" category.
By the way, it's somewhat weird that we have a USB category, but not a PCI or I2C category ... maybe we should rather get rid of that USB category and classify the HCDs as "controller/bridges" like we do it for the PCI host controllers?
Thomas
PATCH 2/12 hw/block/m25p80: Categorize and add description
In reply to Philippe Mathieu-Daudé--- hw/block/m25p80.c | 2 ++ 1 file changed, 2 insertions(+)
hw/block/m25p80.c +2 -0
@@ -1870,7 +1870,9 @@ static void m25p80_class_init(ObjectClass *klass, void *data) dc->vmsd = &vmstate_m25p80;device_class_set_props (dc, m25p80_properties);device_class_set_legacy_reset (dc, m25p80_reset); +set_bit (DEVICE_CATEGORY_STORAGE , dc->categories); mc->pi = data; + dc->desc ="Serial Flash" ; }static const TypeInfo m25p80_info = {
Signature · 1 line
2.47.1
Re: [PATCH-for-10.0 02/12] hw/block/m25p80: Categorize and add description
Quoted 10 lines · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/block/m25p80.c | 2 ++ 1 file changed, 2 insertions(+)hw/block/m25p80.c +0
-0
hw/block/m25p80.c static void m25p80_class_init(ObjectClass *klass, void *data) · line 1878
Quoted 9 lines
hw/block/m25p80.c +2
-0@@ -1870,7 +1870,9 @@ static void m25p80_class_init(ObjectClass *klass, void *data) dc->vmsd = &vmstate_m25p80;device_class_set_props (dc, m25p80_properties);device_class_set_legacy_reset (dc, m25p80_reset); +set_bit (DEVICE_CATEGORY_STORAGE , dc->categories); mc->pi = data; + dc->desc ="Serial Flash" ; }static const TypeInfo m25p80_info = {
PATCH 3/12 hw/display/dm163: Add description
In reply to Philippe Mathieu-Daudé--- hw/display/dm163.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/display/dm163.c +1 -1
@@ -330,7 +330,7 @@ static void dm163_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass);ResettableClass *rc =RESETTABLE_CLASS (klass); - dc->desc ="DM163" ; + dc->desc ="DM163 8x3-channel constant current LED driver" ; dc->vmsd = &vmstate_dm163; dc->realize = dm163_realize; rc->phases.hold = dm163_reset_hold;
Signature · 1 line
2.47.1
Re: [PATCH-for-10.0 03/12] hw/display/dm163: Add description
Quoted 10 lines · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/display/dm163.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/display/dm163.c +0
-0
hw/display/dm163.c static void dm163_class_init(ObjectClass *klass, void *data) · line 336
Quoted 8 lines
hw/display/dm163.c +1
-1@@ -330,7 +330,7 @@ static void dm163_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass);ResettableClass *rc =RESETTABLE_CLASS (klass); - dc->desc ="DM163" ; + dc->desc ="DM163 8x3-channel constant current LED driver" ; dc->vmsd = &vmstate_dm163; dc->realize = dm163_realize; rc->phases.hold = dm163_reset_hold;
PATCH 4/12 hw/dma/i82374: Categorize and add description
In reply to Philippe Mathieu-Daudé--- hw/dma/i82374.c | 2 ++ 1 file changed, 2 insertions(+)
hw/dma/i82374.c +2 -0
@@ -150,6 +150,8 @@ static void i82374_class_init(ObjectClass *klass, void *data) dc->realize = i82374_realize; dc->vmsd = &vmstate_i82374;device_class_set_props (dc, i82374_properties); + dc->desc ="Intel 82374 DMA controller" ; +set_bit (DEVICE_CATEGORY_MISC , dc->categories); }static const TypeInfo i82374_info = {
Signature · 1 line
2.47.1
Re: [PATCH-for-10.0 04/12] hw/dma/i82374: Categorize and add description
Quoted 10 lines · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/dma/i82374.c | 2 ++ 1 file changed, 2 insertions(+)hw/dma/i82374.c +0
-0
hw/dma/i82374.c static void i82374_class_init(ObjectClass *klass, void *data) · line 157
Quoted 8 lines
hw/dma/i82374.c +2
-0@@ -150,6 +150,8 @@ static void i82374_class_init(ObjectClass *klass, void *data) dc->realize = i82374_realize; dc->vmsd = &vmstate_i82374;device_class_set_props (dc, i82374_properties); + dc->desc ="Intel 82374 DMA controller" ; +set_bit (DEVICE_CATEGORY_MISC , dc->categories); }static const TypeInfo i82374_info = {
PATCH 5/12 hw/gpio/pca9552: Categorize and add description
In reply to Philippe Mathieu-Daudé--- hw/gpio/pca9552.c | 2 ++ 1 file changed, 2 insertions(+)
hw/gpio/pca9552.c +2 -0
@@ -459,6 +459,8 @@ static void pca9552_class_init(ObjectClass *oc, void *data)DeviceClass *dc =DEVICE_CLASS (oc);PCA955xClass *pc =PCA955X_CLASS (oc); + dc->desc ="PCA9552 LED blinker" ; +set_bit (DEVICE_CATEGORY_DISPLAY , dc->categories);device_class_set_legacy_reset (dc, pca9552_reset); dc->vmsd = &pca9552_vmstate; pc->max_reg =PCA9552_LS3 ;
Signature · 1 line
2.47.1
Re: [PATCH-for-10.0 05/12] hw/gpio/pca9552: Categorize and add description
Quoted 10 lines · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/gpio/pca9552.c | 2 ++ 1 file changed, 2 insertions(+)hw/gpio/pca9552.c +0
-0
hw/gpio/pca9552.c static void pca9552_class_init(ObjectClass *oc, void *data) · line 466
Quoted 8 lines
hw/gpio/pca9552.c +2
-0@@ -459,6 +459,8 @@ static void pca9552_class_init(ObjectClass *oc, void *data)DeviceClass *dc =DEVICE_CLASS (oc);PCA955xClass *pc =PCA955X_CLASS (oc); + dc->desc ="PCA9552 LED blinker" ; +set_bit (DEVICE_CATEGORY_DISPLAY , dc->categories);device_class_set_legacy_reset (dc, pca9552_reset); dc->vmsd = &pca9552_vmstate; pc->max_reg =PCA9552_LS3 ;
I2C device - same problem as in patch 1 : Unset MISC category here?
Thomas
PATCH 6/12 hw/i2c/pca954x: Categorize and add description
In reply to Philippe Mathieu-Daudé--- hw/i2c/i2c_mux_pca954x.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
hw/i2c/i2c_mux_pca954x.c +7 -1
@@ -175,12 +175,18 @@ I2CBus *pca954x_i2c_get_bus(I2CSlave *mux, uint8_t channel)static void pca9546_class_init (ObjectClass *klass,void *data) {Pca954xClass *s =PCA954X_CLASS (klass); +DeviceClass *dc =DEVICE_CLASS (klass); + + dc->desc ="PCA9546 I2C multiplexer" ; s->nchans =PCA9546_CHANNEL_COUNT ; }static void pca9548_class_init (ObjectClass *klass,void *data) {Pca954xClass *s =PCA954X_CLASS (klass); +DeviceClass *dc =DEVICE_CLASS (klass); + + dc->desc ="PCA9548 I2C multiplexer" ; s->nchans =PCA9548_CHANNEL_COUNT ; }
@@ -226,13 +232,13 @@ static void pca954x_class_init(ObjectClass *klass, void *data) rc->phases.enter = pca954x_enter_reset; - dc->desc ="Pca954x i2c-mux" ; dc->realize = pca954x_realize; k->write_data = pca954x_write_data; k->receive_byte = pca954x_read_byte;device_class_set_props (dc, pca954x_props); +set_bit (DEVICE_CATEGORY_BRIDGE , dc->categories); }static const TypeInfo pca954x_info[] = {
Signature · 1 line
2.47.1
Re: [PATCH-for-10.0 06/12] hw/i2c/pca954x: Categorize and add description
Quoted 4 lines · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/i2c/i2c_mux_pca954x.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
Looks ok to me.
Quoted 43 lines
hw/i2c/i2c_mux_pca954x.c +7
-1@@ -175,12 +175,18 @@ I2CBus *pca954x_i2c_get_bus(I2CSlave *mux, uint8_t channel)static void pca9546_class_init (ObjectClass *klass,void *data) {Pca954xClass *s =PCA954X_CLASS (klass); +DeviceClass *dc =DEVICE_CLASS (klass); + + dc->desc ="PCA9546 I2C multiplexer" ; s->nchans =PCA9546_CHANNEL_COUNT ; }static void pca9548_class_init (ObjectClass *klass,void *data) {Pca954xClass *s =PCA954X_CLASS (klass); +DeviceClass *dc =DEVICE_CLASS (klass); + + dc->desc ="PCA9548 I2C multiplexer" ; s->nchans =PCA9548_CHANNEL_COUNT ; }@@ -226,13 +232,13 @@ static void pca954x_class_init(ObjectClass *klass, void *data) rc->phases.enter = pca954x_enter_reset; - dc->desc ="Pca954x i2c-mux" ; dc->realize = pca954x_realize; k->write_data = pca954x_write_data; k->receive_byte = pca954x_read_byte;device_class_set_props (dc, pca954x_props); +set_bit (DEVICE_CATEGORY_BRIDGE , dc->categories); }static const TypeInfo pca954x_info[] = {Signature · 1 line
2.47.1
Re: [PATCH-for-10.0 06/12] hw/i2c/pca954x: Categorize and add description
In reply to Philippe Mathieu-DaudéQuoted 30 lines · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/i2c/i2c_mux_pca954x.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)hw/i2c/i2c_mux_pca954x.c +6
-0@@ -175,12 +175,18 @@ I2CBus *pca954x_i2c_get_bus(I2CSlave *mux, uint8_t channel)static void pca9546_class_init (ObjectClass *klass,void *data) {Pca954xClass *s =PCA954X_CLASS (klass); +DeviceClass *dc =DEVICE_CLASS (klass); + + dc->desc ="PCA9546 I2C multiplexer" ; s->nchans =PCA9546_CHANNEL_COUNT ; }static void pca9548_class_init (ObjectClass *klass,void *data) {Pca954xClass *s =PCA954X_CLASS (klass); +DeviceClass *dc =DEVICE_CLASS (klass); + + dc->desc ="PCA9548 I2C multiplexer" ; s->nchans =PCA9548_CHANNEL_COUNT ; }@@ -226,13 +232,13 @@ static void pca954x_class_init(ObjectClass *klass, void *data)
hw/i2c/i2c_mux_pca954x.c static void pca954x_class_init(ObjectClass *klass, void *data) · line 241
Quoted 10 lines
hw/i2c/i2c_mux_pca954x.c +1
-1rc->phases.enter = pca954x_enter_reset; - dc->desc ="Pca954x i2c-mux" ; dc->realize = pca954x_realize; k->write_data = pca954x_write_data; k->receive_byte = pca954x_read_byte;device_class_set_props (dc, pca954x_props); +set_bit (DEVICE_CATEGORY_BRIDGE , dc->categories);
Clear DEVICE_CATEGORY_MISC ?
Thomas
PATCH 7/12 hw/misc/axp2xx: Categorize and add description
In reply to Philippe Mathieu-Daudé--- hw/misc/axp2xx.c | 5 +++++ 1 file changed, 5 insertions(+)
hw/misc/axp2xx.c +5 -0
@@ -232,6 +232,7 @@ static void axp2xx_class_init(ObjectClass *oc, void *data)ResettableClass *rc =RESETTABLE_CLASS (oc); rc->phases.enter = axp2xx_reset_enter; +set_bit (DEVICE_CATEGORY_MISC , dc->categories); dc->vmsd = &vmstate_axp2xx; isc->event = axp2xx_event; isc->recv = axp2xx_rx;
@@ -250,7 +251,9 @@ static const TypeInfo axp2xx_info = {static void axp209_class_init (ObjectClass *oc,void *data) {AXP2xxClass *sc =AXP2XX_CLASS (oc); +DeviceClass *dc =DEVICE_CLASS (oc); + dc->desc ="AXP209 power system management" ; sc->reset_enter = axp209_reset_enter; }
@@ -263,7 +266,9 @@ static const TypeInfo axp209_info = {static void axp221_class_init (ObjectClass *oc,void *data) {AXP2xxClass *sc =AXP2XX_CLASS (oc); +DeviceClass *dc =DEVICE_CLASS (oc); + dc->desc ="AXP221 power system management" ; sc->reset_enter = axp221_reset_enter; }
Signature · 1 line
2.47.1
Re: [PATCH-for-10.0 07/12] hw/misc/axp2xx: Categorize and add description
Quoted 10 lines · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/misc/axp2xx.c | 5 +++++ 1 file changed, 5 insertions(+)hw/misc/axp2xx.c +0
-0
hw/misc/axp2xx.c static void axp2xx_class_init(ObjectClass *oc, void *data) · line 235
Quoted 4 lines
hw/misc/axp2xx.c +1
-0@@ -232,6 +232,7 @@ static void axp2xx_class_init(ObjectClass *oc, void *data)ResettableClass *rc =RESETTABLE_CLASS (oc); rc->phases.enter = axp2xx_reset_enter; +set_bit (DEVICE_CATEGORY_MISC , dc->categories);
That should not be necessary - since I2C devices are in the MISC category by default.
Thomas
Quoted 23 lines
hw/misc/axp2xx.c +4
-0dc->vmsd = &vmstate_axp2xx; isc->event = axp2xx_event; isc->recv = axp2xx_rx;@@ -250,7 +251,9 @@ static const TypeInfo axp2xx_info = {static void axp209_class_init (ObjectClass *oc,void *data) {AXP2xxClass *sc =AXP2XX_CLASS (oc); +DeviceClass *dc =DEVICE_CLASS (oc); + dc->desc ="AXP209 power system management" ; sc->reset_enter = axp209_reset_enter; }@@ -263,7 +266,9 @@ static const TypeInfo axp209_info = {static void axp221_class_init (ObjectClass *oc,void *data) {AXP2xxClass *sc =AXP2XX_CLASS (oc); +DeviceClass *dc =DEVICE_CLASS (oc); + dc->desc ="AXP221 power system management" ; sc->reset_enter = axp221_reset_enter; }
PATCH 8/12 hw/misc/pll: Do not expose as user-creatable
In reply to Philippe Mathieu-DaudéAll these devices are part of SoC components and can not be created manually.
--- hw/misc/bcm2835_cprman.c | 8 ++++++++ hw/misc/npcm_clk.c | 6 ++++++ hw/misc/stm32l4x5_rcc.c | 4 ++++ 3 files changed, 18 insertions(+)
hw/misc/bcm2835_cprman.c +8 -0
@@ -137,6 +137,8 @@ static void pll_class_init(ObjectClass *klass, void *data)device_class_set_legacy_reset (dc, pll_reset); dc->vmsd = &pll_vmstate; +/* Reason: Part of BCM2835CprmanState component */ + dc->user_creatable = false; }static const TypeInfo cprman_pll_info = {
@@ -241,6 +243,8 @@ static void pll_channel_class_init(ObjectClass *klass, void *data)device_class_set_legacy_reset (dc, pll_channel_reset); dc->vmsd = &pll_channel_vmstate; +/* Reason: Part of BCM2835CprmanState component */ + dc->user_creatable = false; }static const TypeInfo cprman_pll_channel_info = {
@@ -362,6 +366,8 @@ static void clock_mux_class_init(ObjectClass *klass, void *data)device_class_set_legacy_reset (dc, clock_mux_reset); dc->vmsd = &clock_mux_vmstate; +/* Reason: Part of BCM2835CprmanState component */ + dc->user_creatable = false; }static const TypeInfo cprman_clock_mux_info = {
@@ -416,6 +422,8 @@ static void dsi0hsck_mux_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->vmsd = &dsi0hsck_mux_vmstate; +/* Reason: Part of BCM2835CprmanState component */ + dc->user_creatable = false; }static const TypeInfo cprman_dsi0hsck_mux_info = {
hw/misc/npcm_clk.c +6 -0
@@ -1108,6 +1108,8 @@ static void npcm7xx_clk_pll_class_init(ObjectClass *klass, void *data) dc->desc ="NPCM7xx Clock PLL Module" ; dc->vmsd = &vmstate_npcm7xx_clk_pll; +/* Reason: Part of NPCMCLKState component */ + dc->user_creatable = false; }static void npcm7xx_clk_sel_class_init (ObjectClass *klass,void *data)
@@ -1116,6 +1118,8 @@ static void npcm7xx_clk_sel_class_init(ObjectClass *klass, void *data) dc->desc ="NPCM7xx Clock SEL Module" ; dc->vmsd = &vmstate_npcm7xx_clk_sel; +/* Reason: Part of NPCMCLKState component */ + dc->user_creatable = false; }static void npcm7xx_clk_divider_class_init (ObjectClass *klass,void *data)
@@ -1124,6 +1128,8 @@ static void npcm7xx_clk_divider_class_init(ObjectClass *klass, void *data) dc->desc ="NPCM7xx Clock Divider Module" ; dc->vmsd = &vmstate_npcm7xx_clk_divider; +/* Reason: Part of NPCMCLKState component */ + dc->user_creatable = false; }static void npcm_clk_class_init (ObjectClass *klass,void *data)
hw/misc/stm32l4x5_rcc.c +4 -0
@@ -150,6 +150,8 @@ static void clock_mux_class_init(ObjectClass *klass, void *data) rc->phases.hold = clock_mux_reset_hold; rc->phases.exit = clock_mux_reset_exit; dc->vmsd = &clock_mux_vmstate; +/* Reason: Part of Stm32l4x5RccState component */ + dc->user_creatable = false; }static void clock_mux_set_enable (RccClockMuxState *mux,bool enabled)
@@ -302,6 +304,8 @@ static void pll_class_init(ObjectClass *klass, void *data) rc->phases.hold = pll_reset_hold; rc->phases.exit = pll_reset_exit; dc->vmsd = &pll_vmstate; +/* Reason: Part of Stm32l4x5RccState component */ + dc->user_creatable = false; }static void pll_set_vco_multiplier (RccPllState *pll,uint32_t vco_multiplier)
Signature · 1 line
2.47.1
Re: [PATCH-for-10.0 08/12] hw/misc/pll: Do not expose as user-creatable
Quoted 9 lines · Philippe Mathieu-Daudé
All these devices are part of SoC components and can not be created manually.
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/misc/bcm2835_cprman.c | 8 ++++++++ hw/misc/npcm_clk.c | 6 ++++++ hw/misc/stm32l4x5_rcc.c | 4 ++++ 3 files changed, 18 insertions(+)
PATCH 9/12 hw/nvram/xlnx-efuse: Do not expose as user-creatable
In reply to Philippe Mathieu-DaudéThis device is part of SoC components thus can not be created manually.
--- hw/nvram/xlnx-efuse.c | 2 ++ 1 file changed, 2 insertions(+)
hw/nvram/xlnx-efuse.c +2 -0
@@ -280,6 +280,8 @@ static void efuse_class_init(ObjectClass *klass, void *data) dc->realize = efuse_realize;device_class_set_props (dc, efuse_properties); +/* Reason: Part of Xilinx SoC */ + dc->user_creatable = false; }static const TypeInfo efuse_info = {
Signature · 1 line
2.47.1
Re: [PATCH-for-10.0 09/12] hw/nvram/xlnx-efuse: Do not expose as user-creatable
Quoted 13 lines · Philippe Mathieu-Daudé
This device is part of SoC components thus can not be created manually.
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/nvram/xlnx-efuse.c | 2 ++ 1 file changed, 2 insertions(+)hw/nvram/xlnx-efuse.c +0
-0
hw/nvram/xlnx-efuse.c static void efuse_class_init(ObjectClass *klass, void *data) · line 287
Quoted 8 lines
hw/nvram/xlnx-efuse.c +2
-0@@ -280,6 +280,8 @@ static void efuse_class_init(ObjectClass *klass, void *data) dc->realize = efuse_realize;device_class_set_props (dc, efuse_properties); +/* Reason: Part of Xilinx SoC */ + dc->user_creatable = false; }static const TypeInfo efuse_info = {
PATCH 10/12 hw/rtc: Categorize and add description
In reply to Philippe Mathieu-Daudé--- hw/rtc/ds1338.c | 2 ++ hw/rtc/m41t80.c | 2 ++ hw/rtc/rs5c372.c | 2 ++ 3 files changed, 6 insertions(+)
hw/rtc/ds1338.c +2 -0
@@ -230,6 +230,8 @@ static void ds1338_class_init(ObjectClass *klass, void *data) k->send = ds1338_send;device_class_set_legacy_reset (dc, ds1338_reset); dc->vmsd = &vmstate_ds1338; + dc->desc ="Maxim DS1338 RTC" ; +set_bit (DEVICE_CATEGORY_MISC , dc->categories); }static const TypeInfo ds1338_types[] = {
hw/rtc/m41t80.c +2 -0
@@ -99,6 +99,8 @@ static void m41t80_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass);I2CSlaveClass *sc =I2C_SLAVE_CLASS (klass); +set_bit (DEVICE_CATEGORY_MISC , dc->categories); + dc->desc ="ST M41T80 RTC" ; dc->realize = m41t80_realize; sc->send = m41t80_send; sc->recv = m41t80_recv;
hw/rtc/rs5c372.c +2 -0
@@ -216,6 +216,8 @@ static void rs5c372_class_init(ObjectClass *klass, void *data)I2CSlaveClass *k =I2C_SLAVE_CLASS (klass);ResettableClass *rc =RESETTABLE_CLASS (klass); +set_bit (DEVICE_CATEGORY_MISC , dc->categories); + dc->desc ="Ricoh RS5C372 RTC" ; k->event = rs5c372_event; k->recv = rs5c372_recv; k->send = rs5c372_send;
Signature · 1 line
2.47.1
Re: [PATCH-for-10.0 10/12] hw/rtc: Categorize and add description
Quoted 25 lines · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
hw/rtc/ds1338.c | 2 ++ hw/rtc/m41t80.c | 2 ++ hw/rtc/rs5c372.c | 2 ++ 3 files changed, 6 insertions(+)hw/rtc/ds1338.c +2
-0@@ -230,6 +230,8 @@ static void ds1338_class_init(ObjectClass *klass, void *data) k->send = ds1338_send;device_class_set_legacy_reset (dc, ds1338_reset); dc->vmsd = &vmstate_ds1338; + dc->desc ="Maxim DS1338 RTC" ; +set_bit (DEVICE_CATEGORY_MISC , dc->categories); }static const TypeInfo ds1338_types[] = {hw/rtc/m41t80.c +0
-0
hw/rtc/m41t80.c static void m41t80_class_init(ObjectClass *klass, void *data) · line 102
Quoted 4 lines
hw/rtc/m41t80.c +1
-0@@ -99,6 +99,8 @@ static void m41t80_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass);I2CSlaveClass *sc =I2C_SLAVE_CLASS (klass); +set_bit (DEVICE_CATEGORY_MISC , dc->categories);
This set_bit() is not needed for i2c devices, i2c_slave_class_init() sets that already.
Regards,
BALATON Zoltan
Quoted 18 lines
hw/rtc/m41t80.c +1
-0+ dc->desc ="ST M41T80 RTC" ; dc->realize = m41t80_realize; sc->send = m41t80_send; sc->recv = m41t80_recv;hw/rtc/rs5c372.c +2
-0@@ -216,6 +216,8 @@ static void rs5c372_class_init(ObjectClass *klass, void *data)I2CSlaveClass *k =I2C_SLAVE_CLASS (klass);ResettableClass *rc =RESETTABLE_CLASS (klass); +set_bit (DEVICE_CATEGORY_MISC , dc->categories); + dc->desc ="Ricoh RS5C372 RTC" ; k->event = rs5c372_event; k->recv = rs5c372_recv; k->send = rs5c372_send;
Re: [PATCH-for-10.0 10/12] hw/rtc: Categorize and add description
In reply to Philippe Mathieu-DaudéAm 25. März 2025 22:43:08 UTC schrieb "Philippe Mathieu-Daudé" <[email protected]>:
Quoted 5 lines
Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
hw/rtc/ds1338.c | 2 ++ hw/rtc/m41t80.c | 2 ++ hw/rtc/rs5c372.c | 2 ++
For rs5c372:
Quoted 41 lines
3 files changed, 6 insertions(+)hw/rtc/ds1338.c +2
-0@@ -230,6 +230,8 @@ static void ds1338_class_init(ObjectClass *klass, void *data) k->send = ds1338_send;device_class_set_legacy_reset (dc, ds1338_reset); dc->vmsd = &vmstate_ds1338; + dc->desc ="Maxim DS1338 RTC" ; +set_bit (DEVICE_CATEGORY_MISC , dc->categories); }static const TypeInfo ds1338_types[] = {hw/rtc/m41t80.c +2
-0@@ -99,6 +99,8 @@ static void m41t80_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass);I2CSlaveClass *sc =I2C_SLAVE_CLASS (klass); +set_bit (DEVICE_CATEGORY_MISC , dc->categories); + dc->desc ="ST M41T80 RTC" ; dc->realize = m41t80_realize; sc->send = m41t80_send; sc->recv = m41t80_recv;hw/rtc/rs5c372.c +2
-0@@ -216,6 +216,8 @@ static void rs5c372_class_init(ObjectClass *klass, void *data)I2CSlaveClass *k =I2C_SLAVE_CLASS (klass);ResettableClass *rc =RESETTABLE_CLASS (klass); +set_bit (DEVICE_CATEGORY_MISC , dc->categories); + dc->desc ="Ricoh RS5C372 RTC" ; k->event = rs5c372_event; k->recv = rs5c372_recv; k->send = rs5c372_send;
PATCH 11/12 hw/sensor/temp: Categorize and add description
In reply to Philippe Mathieu-Daudé--- hw/sensor/dps310.c | 2 ++ hw/sensor/emc141x.c | 6 ++++++ hw/sensor/tmp105.c | 2 ++ hw/sensor/tmp421.c | 4 ++++ 4 files changed, 14 insertions(+)
hw/sensor/dps310.c +2 -0
@@ -207,6 +207,8 @@ static void dps310_class_init(ObjectClass *klass, void *data) k->send = dps310_tx;device_class_set_legacy_reset (dc, dps310_reset); dc->vmsd = &vmstate_dps310; + dc->desc ="Infineon DPS310 temperature and humidity sensor" ; +set_bit (DEVICE_CATEGORY_MISC , dc->categories); }static const TypeInfo dps310_info = {
hw/sensor/emc141x.c +6 -0
@@ -280,19 +280,25 @@ static void emc141x_class_init(ObjectClass *klass, const void *data)static void emc1413_class_init (ObjectClass *klass,void *data) {EMC141XClass *ec =EMC141X_CLASS (klass); +DeviceClass *dc =DEVICE_CLASS (klass);emc141x_class_init (klass, data); ec->model =EMC1413_DEVICE_ID ; ec->sensors_count =3 ; + dc->desc ="SMSC EMC1413 temperature sensor" ; +set_bit (DEVICE_CATEGORY_MISC , dc->categories); }static void emc1414_class_init (ObjectClass *klass,void *data) {EMC141XClass *ec =EMC141X_CLASS (klass); +DeviceClass *dc =DEVICE_CLASS (klass);emc141x_class_init (klass, data); ec->model =EMC1414_DEVICE_ID ; ec->sensors_count =4 ; + dc->desc ="SMSC EMC1414 temperature sensor" ; +set_bit (DEVICE_CATEGORY_MISC , dc->categories); }static const TypeInfo emc141x_info = {
hw/sensor/tmp105.c +2 -0
@@ -323,6 +323,8 @@ static void tmp105_class_init(ObjectClass *klass, void *data) k->recv = tmp105_rx; k->send = tmp105_tx; dc->vmsd = &vmstate_tmp105; + dc->desc ="TI TMP105 temperature sensor" ; +set_bit (DEVICE_CATEGORY_MISC , dc->categories); }static const TypeInfo tmp105_info = {
hw/sensor/tmp421.c +4 -0
@@ -342,6 +342,7 @@ static void tmp421_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass);I2CSlaveClass *k =I2C_SLAVE_CLASS (klass);TMP421Class *sc =TMP421_CLASS (klass); + g_autofree char *name_up = NULL; dc->realize = tmp421_realize; k->event = tmp421_event;
@@ -349,6 +350,9 @@ static void tmp421_class_init(ObjectClass *klass, void *data) k->send = tmp421_tx; dc->vmsd = &vmstate_tmp421; sc->dev = (DeviceInfo *) data; + name_up =g_ascii_strup (sc->dev->name,-1 ); + dc->desc =g_strconcat ("TI " , name_up," temperature sensor" ,NULL ); +set_bit (DEVICE_CATEGORY_MISC , dc->categories); object_class_property_add(klass, "temperature0", "int", tmp421_get_temperature,
Signature · 1 line
2.47.1
Re: [PATCH-for-10.0 11/12] hw/sensor/temp: Categorize and add description
Quoted 13 lines · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/sensor/dps310.c | 2 ++ hw/sensor/emc141x.c | 6 ++++++ hw/sensor/tmp105.c | 2 ++ hw/sensor/tmp421.c | 4 ++++ 4 files changed, 14 insertions(+)hw/sensor/dps310.c +0
-0
hw/sensor/dps310.c static void dps310_class_init(ObjectClass *klass, void *data) · line 211
Quoted 5 lines
hw/sensor/dps310.c +2
-0@@ -207,6 +207,8 @@ static void dps310_class_init(ObjectClass *klass, void *data) k->send = dps310_tx;device_class_set_legacy_reset (dc, dps310_reset); dc->vmsd = &vmstate_dps310; + dc->desc ="Infineon DPS310 temperature and humidity sensor" ; +set_bit (DEVICE_CATEGORY_MISC , dc->categories);
Not necessary - I2C device again.
Thomas
RFC 12/12 hw/s390x/zpci: Re-categorize as BRIDGE
In reply to Philippe Mathieu-DaudéA 'zpci' device encapsulate a PCI device to be usable by System/Z. Categorize it as bridge.
--- hw/s390x/s390-pci-bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/s390x/s390-pci-bus.c +1 -1
@@ -1562,7 +1562,7 @@ static void s390_pci_device_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->desc ="zpci device" ; -set_bit (DEVICE_CATEGORY_MISC , dc->categories); +set_bit (DEVICE_CATEGORY_BRIDGE , dc->categories);device_class_set_legacy_reset (dc, s390_pci_device_reset); dc->bus_type =TYPE_S390_PCI_BUS ; dc->realize = s390_pci_device_realize;
Signature · 1 line
2.47.1
Re: [RFC PATCH-for-10.0 12/12] hw/s390x/zpci: Re-categorize as BRIDGE
Quoted 13 lines · Philippe Mathieu-Daudé
A 'zpci' device encapsulate a PCI device to be usable by System/Z. Categorize it as bridge.
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/s390x/s390-pci-bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/s390x/s390-pci-bus.c +0
-0
hw/s390x/s390-pci-bus.c static void s390_pci_device_class_init(ObjectClass *klass, void *data) · line 1565
Quoted 5 lines
hw/s390x/s390-pci-bus.c +1
-1@@ -1562,7 +1562,7 @@ static void s390_pci_device_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass); dc->desc ="zpci device" ; -set_bit (DEVICE_CATEGORY_MISC , dc->categories); +set_bit (DEVICE_CATEGORY_BRIDGE , dc->categories);
It's not really a bridge (in the sense of a PCI bridge) ... I think it's maybe better to keep it in the MISC category to avoid confusion.
Thomas
Quoted 8 lines · Philippe Mathieu-Daudé
Philippe Mathieu-Daudé (12):
hw/block/m25p80: Categorize and add description hw/display/dm163: Add description hw/dma/i82374: Categorize and add description
hw/misc/pll: Do not expose as user-creatable hw/nvram/xlnx-efuse: Do not expose as user-creatable
Patches 2-4 and 8-9 queued.