On Wed, 26 Mar 2025, Thomas Huth wrote:
On 26/03/2025 07.47, Thomas Huth wrote:
On 25/03/2025 23.42, Philippe Mathieu-Daudé wrote:
Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org>
---
  hw/audio/wm8750.c | 2 ++
  1 file changed, 2 insertions(+)

diff --git a/hw/audio/wm8750.c b/hw/audio/wm8750.c
index 8d381dbc658..6c1bb20fb75 100644
--- a/hw/audio/wm8750.c
+++ b/hw/audio/wm8750.c
@@ -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 <th...@redhat.com>

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

Reply via email to