diff mbox series

[PATCH-for-10.0,07/12] hw/misc/axp2xx: Categorize and add description

Message ID 20250325224310.8785-8-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/misc/axp2xx.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Thomas Huth March 26, 2025, 7:08 a.m. UTC | #1
On 25/03/2025 23.43, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   hw/misc/axp2xx.c | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/hw/misc/axp2xx.c b/hw/misc/axp2xx.c
> index af646878cd2..747af430479 100644
> --- a/hw/misc/axp2xx.c
> +++ b/hw/misc/axp2xx.c
> @@ -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



>       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;
>   }
>
diff mbox series

Patch

diff --git a/hw/misc/axp2xx.c b/hw/misc/axp2xx.c
index af646878cd2..747af430479 100644
--- a/hw/misc/axp2xx.c
+++ b/hw/misc/axp2xx.c
@@ -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;
 }