1
0
Fork 0

docs / driver-api: Fix structure references in device_link.rst

The format of the structure references in device_link.rst is
incorrect, because it doesn't cause proper references to the
struct data types to be generated (for struct dev_pm_domain in
particular).

Fix that by using the :c:type:`struct name <name>` convention
for encoding references to struct data types.

Fixes: aad800403a (Documentation/core-api/device_link: Add initial documentation)
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
zero-colors
Rafael J. Wysocki 2017-02-20 15:28:13 +01:00 committed by Jonathan Corbet
parent e3941cd9f5
commit bd8562626c
1 changed files with 10 additions and 8 deletions

View File

@ -1,3 +1,6 @@
.. |struct dev_pm_domain| replace:: :c:type:`struct dev_pm_domain <dev_pm_domain>`
.. |struct generic_pm_domain| replace:: :c:type:`struct generic_pm_domain <generic_pm_domain>`
============ ============
Device links Device links
============ ============
@ -120,12 +123,11 @@ Examples
is the same as if the MMU was the parent of the master device. is the same as if the MMU was the parent of the master device.
The fact that both devices share the same power domain would normally The fact that both devices share the same power domain would normally
suggest usage of a :c:type:`struct dev_pm_domain` or :c:type:`struct suggest usage of a |struct dev_pm_domain| or |struct generic_pm_domain|,
generic_pm_domain`, however these are not independent devices that however these are not independent devices that happen to share a power
happen to share a power switch, but rather the MMU device serves the switch, but rather the MMU device serves the busmaster device and is
busmaster device and is useless without it. A device link creates a useless without it. A device link creates a synthetic hierarchical
synthetic hierarchical relationship between the devices and is thus relationship between the devices and is thus more apt.
more apt.
* A Thunderbolt host controller comprises a number of PCIe hotplug ports * A Thunderbolt host controller comprises a number of PCIe hotplug ports
and an NHI device to manage the PCIe switch. On resume from system sleep, and an NHI device to manage the PCIe switch. On resume from system sleep,
@ -157,7 +159,7 @@ Examples
Alternatives Alternatives
============ ============
* A :c:type:`struct dev_pm_domain` can be used to override the bus, * A |struct dev_pm_domain| can be used to override the bus,
class or device type callbacks. It is intended for devices sharing class or device type callbacks. It is intended for devices sharing
a single on/off switch, however it does not guarantee a specific a single on/off switch, however it does not guarantee a specific
suspend/resume ordering, this needs to be implemented separately. suspend/resume ordering, this needs to be implemented separately.
@ -166,7 +168,7 @@ Alternatives
suspended. Furthermore it cannot be used to enforce a specific shutdown suspended. Furthermore it cannot be used to enforce a specific shutdown
ordering or a driver presence dependency. ordering or a driver presence dependency.
* A :c:type:`struct generic_pm_domain` is a lot more heavyweight than a * A |struct generic_pm_domain| is a lot more heavyweight than a
device link and does not allow for shutdown ordering or driver presence device link and does not allow for shutdown ordering or driver presence
dependencies. It also cannot be used on ACPI systems. dependencies. It also cannot be used on ACPI systems.