[Skiboot] [PATCH 020/110] doc: prettify OPAL_PCI_[GET|SET]_POWER_STATE

Stewart Smith stewart at linux.ibm.com
Fri May 31 16:12:21 AEST 2019


Signed-off-by: Stewart Smith <stewart at linux.ibm.com>
---
 doc/opal-api/opal-pci-get-power-state-120.rst | 17 ++++++++++----
 doc/opal-api/opal-pci-set-power-state-121.rst | 23 +++++++++++--------
 2 files changed, 26 insertions(+), 14 deletions(-)

diff --git a/doc/opal-api/opal-pci-get-power-state-120.rst b/doc/opal-api/opal-pci-get-power-state-120.rst
index 9e6f94b7084d..fa0375d83e85 100644
--- a/doc/opal-api/opal-pci-get-power-state-120.rst
+++ b/doc/opal-api/opal-pci-get-power-state-120.rst
@@ -1,6 +1,14 @@
+.. _OPAL_PCI_GET_POWER_STATE:
+
 OPAL_PCI_GET_POWER_STATE
 ========================
 
+.. code-block:: c
+
+   #define OPAL_PCI_GET_POWER_STATE		120
+
+   int64_t opal_pci_get_power_state(uint64_t id, uint64_t data);
+
 Get PCI slot power state
 
 Parameter
@@ -20,11 +28,10 @@ in buffer pointed by @data.
 
 Return Codes
 ------------
-OPAL_SUCCESS
-  PCI slot's power state is retrieved successfully
 
-OPAL_PARAMETER
+:ref:`OPAL_SUCCESS`
+  PCI slot's power state is retrieved successfully
+:ref:`OPAL_PARAMETER`
   The indicated PCI slot isn't found
-
-OPAL_UNSUPPORTED
+:ref:`OPAL_UNSUPPORTED`
   Power state retrieval not supported on the PCI slot
diff --git a/doc/opal-api/opal-pci-set-power-state-121.rst b/doc/opal-api/opal-pci-set-power-state-121.rst
index 54c1a33ac2ff..0209efb79316 100644
--- a/doc/opal-api/opal-pci-set-power-state-121.rst
+++ b/doc/opal-api/opal-pci-set-power-state-121.rst
@@ -1,6 +1,14 @@
+.. _OPAL_PCI_SET_POWER_STATE:
+
 OPAL_PCI_SET_POWER_STATE
 ========================
 
+.. code-block:: c
+
+   #define OPAL_PCI_SET_POWER_STATE		121
+
+   int64_t opal_pci_set_power_state(uint64_t async_token, uint64_t id, uint64_t data);
+
 Set PCI slot power state
 
 Parameters
@@ -27,8 +35,8 @@ indicated PCI slot (by @id) in PCI hotplug path.
 
 User will receive an asychronous message after calling the API. The message
 contains the API completion status: event (Power off or on), device node's
-phandle identifying the PCI slot, errcode (e.g. OPAL_SUCCESS). The API returns
-OPAL_ASYNC_COMPLETION for the case.
+phandle identifying the PCI slot, errcode (e.g. :ref:`OPAL_SUCCESS`). The API returns
+:ref:`OPAL_ASYNC_COMPLETION` for the case.
 
 The states OPAL_PCI_SLOT_OFFLINE and OPAL_PCI_SLOT_ONLINE are used for removing
 or adding devices behind the slot. The device nodes in the device tree are
@@ -39,14 +47,11 @@ message will be sent.
 Return Codes
 ------------
 
-OPAL_SUCCESS
+:ref:`OPAL_SUCCESS`
   PCI hotplug on the slot is completed successfully
-
-OPAL_ASYNC_COMPLETION
+:ref:`OPAL_ASYNC_COMPLETION`
   PCI hotplug needs further message to confirm
-
-OPAL_PARAMETER
+:ref:`OPAL_PARAMETER`
   The indicated PCI slot isn't found
-
-OPAL_UNSUPPORTED
+:ref:`OPAL_UNSUPPORTED`
   Setting power state not supported on the PCI slot
-- 
2.21.0



More information about the Skiboot mailing list