Skip to content

Commit

Permalink
doc: prettify OPAL_PCI_[GET|SET]_POWER_STATE
Browse files Browse the repository at this point in the history
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
  • Loading branch information
stewartsmith committed Jun 3, 2019
1 parent 3baffee commit e88bae8
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 14 deletions.
17 changes: 12 additions & 5 deletions 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
Expand All @@ -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
23 changes: 14 additions & 9 deletions 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
Expand All @@ -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
Expand All @@ -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

0 comments on commit e88bae8

Please sign in to comment.