diff mbox series

[PATCH-for-10.0,05/12] hw/gpio/pca9552: Categorize and add description

Message ID 20250325224310.8785-6-philmd@linaro.org
State New
Headers show
Series hw: Categorize few devices and add their descriptions | expand

Commit Message

Philippe Mathieu-Daudé March 25, 2025, 10:43 p.m. UTC
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 hw/gpio/pca9552.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Thomas Huth March 26, 2025, 7:05 a.m. UTC | #1
On 25/03/2025 23.43, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   hw/gpio/pca9552.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/hw/gpio/pca9552.c b/hw/gpio/pca9552.c
> index 1ac0cf6c464..b152872f6c6 100644
> --- a/hw/gpio/pca9552.c
> +++ b/hw/gpio/pca9552.c
> @@ -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
diff mbox series

Patch

diff --git a/hw/gpio/pca9552.c b/hw/gpio/pca9552.c
index 1ac0cf6c464..b152872f6c6 100644
--- a/hw/gpio/pca9552.c
+++ b/hw/gpio/pca9552.c
@@ -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;