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

Philippe Mathieu-Daudé posted 12 patches 10 months, 2 weeks ago
Maintainers: Gerd Hoffmann <kraxel@redhat.com>, Alistair Francis <alistair@alistair23.me>, Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>, Samuel Tardieu <sam@rfc1149.net>, "Hervé Poussineau" <hpoussin@reactos.org>, Glenn Miles <milesg@linux.ibm.com>, Patrick Leis <venture@google.com>, Peter Maydell <peter.maydell@linaro.org>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Tyrone Ting <kfting@nuvoton.com>, Hao Wu <wuhaotsh@google.com>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, BALATON Zoltan <balaton@eik.bme.hu>, Bernhard Beschow <shentey@gmail.com>, Matthew Rosato <mjrosato@linux.ibm.com>, Eric Farman <farman@linux.ibm.com>, Richard Henderson <richard.henderson@linaro.org>, David Hildenbrand <david@redhat.com>, Ilya Leoshkevich <iii@linux.ibm.com>, Thomas Huth <thuth@redhat.com>, Halil Pasic <pasic@linux.ibm.com>, Christian Borntraeger <borntraeger@linux.ibm.com>
[PATCH-for-10.0 07/12] hw/misc/axp2xx: Categorize and add description
Posted by Philippe Mathieu-Daudé 10 months, 2 weeks ago
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);
     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;
 }
 
-- 
2.47.1


Re: [PATCH-for-10.0 07/12] hw/misc/axp2xx: Categorize and add description
Posted by Thomas Huth 10 months, 2 weeks ago
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;
>   }
>