All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Subject: [PATCH 5/6] docs/devel/reset: Update to new API for hold and exit phase methods
Date: Fri, 12 Apr 2024 17:08:08 +0100	[thread overview]
Message-ID: <20240412160809.1260625-6-peter.maydell@linaro.org> (raw)
In-Reply-To: <20240412160809.1260625-1-peter.maydell@linaro.org>

Update the reset documentation's example code to match the new API
for the hold and exit phase method APIs where they take a ResetType
argument.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 docs/devel/reset.rst | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/docs/devel/reset.rst b/docs/devel/reset.rst
index 2ea85e7779b..49baa1ea271 100644
--- a/docs/devel/reset.rst
+++ b/docs/devel/reset.rst
@@ -150,25 +150,25 @@ in reset.
         mydev->var = 0;
     }
 
-    static void mydev_reset_hold(Object *obj)
+    static void mydev_reset_hold(Object *obj, ResetType type)
     {
         MyDevClass *myclass = MYDEV_GET_CLASS(obj);
         MyDevState *mydev = MYDEV(obj);
         /* call parent class hold phase */
         if (myclass->parent_phases.hold) {
-            myclass->parent_phases.hold(obj);
+            myclass->parent_phases.hold(obj, type);
         }
         /* set an IO */
         qemu_set_irq(mydev->irq, 1);
     }
 
-    static void mydev_reset_exit(Object *obj)
+    static void mydev_reset_exit(Object *obj, ResetType type)
     {
         MyDevClass *myclass = MYDEV_GET_CLASS(obj);
         MyDevState *mydev = MYDEV(obj);
         /* call parent class exit phase */
         if (myclass->parent_phases.exit) {
-            myclass->parent_phases.exit(obj);
+            myclass->parent_phases.exit(obj, type);
         }
         /* clear an IO */
         qemu_set_irq(mydev->irq, 0);
-- 
2.34.1



  parent reply	other threads:[~2024-04-12 16:09 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-12 16:08 [PATCH 0/6] reset: Add RESET_TYPE_SNAPSHOT_LOAD Peter Maydell
2024-04-12 16:08 ` [PATCH 1/6] hw/misc: Don't special case RESET_TYPE_COLD in npcm7xx_clk, gcr Peter Maydell
2024-04-12 17:21   ` Richard Henderson
2024-04-12 17:32   ` Philippe Mathieu-Daudé
2024-04-16  9:08   ` Luc Michel
2024-04-12 16:08 ` [PATCH 2/6] allwinner-i2c, adm1272: Use device_cold_reset() for software-triggered reset Peter Maydell
2024-04-12 17:22   ` Richard Henderson
2024-04-16  9:09   ` Luc Michel
2024-04-12 16:08 ` [PATCH 3/6] scripts/coccinelle: New script to add ResetType to hold and exit phases Peter Maydell
2024-04-16  9:10   ` Luc Michel
2024-04-12 16:08 ` [PATCH 4/6] hw, target: Add ResetType argument to hold and exit phase methods Peter Maydell
2024-04-12 16:49   ` Edgar E. Iglesias
2024-04-12 17:27   ` Richard Henderson
2024-04-16  9:10   ` Luc Michel
2024-04-12 16:08 ` Peter Maydell [this message]
2024-04-12 17:27   ` [PATCH 5/6] docs/devel/reset: Update to new API for " Richard Henderson
2024-04-12 17:29   ` Philippe Mathieu-Daudé
2024-04-16  9:10   ` Luc Michel
2024-04-12 16:08 ` [PATCH 6/6] reset: Add RESET_TYPE_SNAPSHOT_LOAD Peter Maydell
2024-04-12 17:30   ` Richard Henderson
2024-04-12 17:31   ` Philippe Mathieu-Daudé
2024-04-16  9:21   ` Luc Michel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240412160809.1260625-6-peter.maydell@linaro.org \
    --to=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.