Documentation: Restore device-ID documentation
Subsystems (6)
v4 cover Documentation: Restore device-ID documentation
This v4 addresses the duplicate PCI declaration warnings Jonathan reported on v3.
Patch 1 retains Uwe's device-ID documentation restoration. Patch 2 corrects the Chinese PCI header path and preserves its existing plain references. The kernel-doc blocks added in v3 are dropped, with generated API documentation deferred to a separate change.
A focused Sphinx 8.2.3 build with -W includes the complete English and Chinese PCI pages together. It reproduces both warnings with v3 and passes without warnings after each v4 patch.
Changes since v3:
https://lore.kernel.org/r/[email protected]/
- Move the Chinese PCI changes to patch 2. The five files in patch 1 are unchanged from v3.
- Clarify the ACPI exclusion in patch 1's commit message using Uwe's explanation to Andy. Only ACPI_DEVICE_CLASS() has kernel-doc in that header.
- Retain Randy's review and test tags from v2 on patch 1.
Changes since v2:
https://lore.kernel.org/r/ede7ce64f20e10660ebf6bc1b41836dad750ae3b.1783349758.git.ukleinek@kernel.org/
- Use the :file: role in pcmcia/driver.rst (Randy) and explain why acpi.h is excluded.
Documenting struct mei_cl_driver in include/linux/mei_cl_bus.h remains a separate follow-up.
Report: https://lore.kernel.org/r/[email protected]/
Karl Mehltretter (1):
docs/zh_CN: PCI: Update the pci_device_id header reference
Uwe Kleine-König (The Capable Hub) (1):
Documentation: Update after split of <linux/mod_devicetable.h>
Documentation/PCI/pci.rst | 2 +- Documentation/driver-api/basics.rst | 31 +++++++++++++++++-- .../driver-api/mei/mei-client-bus.rst | 12 ++----- Documentation/pcmcia/driver.rst | 2 +- Documentation/staging/rpmsg.rst | 2 +- Documentation/translations/zh_CN/PCI/pci.rst | 2 +- 6 files changed, 36 insertions(+), 15 deletions(-)
base-commit: 5b0764a53235d3c77e1ed674e836e1b3fe1a4b1f
PATCH v4 1/2 Documentation: Update after split of <linux/mod_devicetable.h>
From: Uwe Kleine-König (The Capable Hub) <[email protected]>
Most structs that were defined in <linux/mod_devicetable.h> before were moved to a bus specific header. Follow the movement to get the struct's documentation back.
For the list of device ids in basics.rst use an explicit list of all the headers that have kernel-doc annotations and that are not described elsewhere (i.e. pci and mei_cl). Leave <linux/device-id/acpi.h> out:
only ACPI_DEVICE_CLASS() has kernel-doc there, so including it would document that macro rather than struct acpi_device_id.
Generate mei_cl_device_id from its header instead of keeping a copy in the MEI client bus documentation.
[Karl Mehltretter: use the :file: role in pcmcia/driver.rst, explain why
acpi.h is left out]
--- Documentation/PCI/pci.rst | 2 +- Documentation/driver-api/basics.rst | 31 +++++++++++++++++-- .../driver-api/mei/mei-client-bus.rst | 12 ++----- Documentation/pcmcia/driver.rst | 2 +- Documentation/staging/rpmsg.rst | 2 +- 5 files changed, 35 insertions(+), 14 deletions(-)
Documentation/PCI/pci.rst +1 -1
@@ -84,7 +84,7 @@ initialization with a pointer to a structure describing the driver The ID table is an array of ``struct pci_device_id`` entries ending with an all-zero entry. Definitions with static const are generally preferred. -.. kernel-doc:: include/linux/mod_devicetable.h +.. kernel-doc:: include/linux/device-id/pci.h :functions: pci_device_id Most drivers only need ``PCI_DEVICE()`` or ``PCI_DEVICE_CLASS()`` to set up
Documentation/driver-api/basics.rst +29 -2
@@ -10,9 +10,36 @@ Driver Entry and Exit points Driver device table ------------------- -.. kernel-doc:: include/linux/mod_devicetable.h +.. kernel-doc:: include/linux/device-id/amba.h + :internal: +.. kernel-doc:: include/linux/device-id/cdx.h + :internal: +.. kernel-doc:: include/linux/device-id/coreboot.h + :internal: +.. kernel-doc:: include/linux/device-id/dfl.h + :internal: +.. kernel-doc:: include/linux/device-id/fsl_mc.h + :internal: +.. kernel-doc:: include/linux/device-id/ishtp.h + :internal: +.. kernel-doc:: include/linux/device-id/mdio.h + :internal: +.. kernel-doc:: include/linux/device-id/mhi.h + :internal: +.. kernel-doc:: include/linux/device-id/mips_cdmm.h + :internal: +.. kernel-doc:: include/linux/device-id/rio.h + :internal: +.. kernel-doc:: include/linux/device-id/tb.h + :internal: +.. kernel-doc:: include/linux/device-id/tee_client.h + :internal: +.. kernel-doc:: include/linux/device-id/typec.h + :internal: +.. kernel-doc:: include/linux/device-id/usb.h + :internal: +.. kernel-doc:: include/linux/device-id/wmi.h :internal: - :no-identifiers: pci_device_id Delaying and scheduling routines
Documentation/driver-api/mei/mei-client-bus.rst +3 -9
@@ -41,17 +41,11 @@ the ``struct mei_cl_driver`` structure defined in :file:`include/linux/mei_cl_bu -The mei_cl_device_id structure defined in :file:`include/linux/mod_devicetable.h` allows a +The mei_cl_device_id structure defined in :file:`include/linux/device-id/mei_cl.h` allows a driver to bind itself against a device name. -.. code-block:: C - - struct mei_cl_device_id { - char name[MEI_CL_NAME_SIZE]; - uuid_le uuid; - __u8 version; - kernel_ulong_t driver_info; - }; +.. kernel-doc:: include/linux/device-id/mei_cl.h + :functions: mei_cl_device_id To actually register a driver on the ME Client bus one must call the :c:func:`mei_cl_add_driver` API. This is typically called at module initialization time.
Documentation/pcmcia/driver.rst +1 -1
@@ -15,7 +15,7 @@ runtime as shown below:: All fields are passed in as hexadecimal values (no leading 0x). The meaning is described in the PCMCIA specification, the match_flags is a bitwise or-ed combination from PCMCIA_DEV_ID_MATCH_* constants -defined in include/linux/mod_devicetable.h. +defined in :file:`include/linux/device-id/pcmcia.h`. Once added, the driver probe routine will be invoked for any unclaimed PCMCIA device listed in its (newly updated) pcmcia_device_id list.
Documentation/staging/rpmsg.rst +1 -1
@@ -224,7 +224,7 @@ content to the console. :: #include <linux/dev_printk.h> - #include <linux/mod_devicetable.h> + #include <linux/device-id/rpmsg.h> #include <linux/module.h> #include <linux/printk.h> #include <linux/rpmsg.h>
base-commit: 5b0764a53235d3c77e1ed674e836e1b3fe1a4b1f
[email protected]
AI reviewRe: [PATCH v4 1/2] Documentation: Update after split of <linux/mod_devicetable.h>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] Documentation: basics.rst omits kernel-doc for arm_smccc.h --
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Documentation: basics.rst omits kernel-doc for arm_smccc.h
--
commit 1e9cc1a9a128cf0749229f0053d8a9b4210d892b
Author: Uwe Kleine-König (The Capable Hub) <[email protected]>
Documentation: Update after split of <linux/mod_devicetable.h>
This patch updates documentation references after struct definitions in include/linux/mod_devicetable.h were split into bus-specific headers under include/linux/device-id/.
Documentation/driver-api/basics.rst Driver Entry and Exit points · line 16
Quoted 13 lines
Documentation/driver-api/basics.rst +4
-1@@ -10,9 +10,36 @@ Driver Entry and Exit points Driver device table ------------------- -.. kernel-doc:: include/linux/mod_devicetable.h +.. kernel-doc:: include/linux/device-id/amba.h + :internal: +.. kernel-doc:: include/linux/device-id/cdx.h + :internal:
[Severity: Low]
Should include/linux/device-id/arm_smccc.h also be included here in the Driver device table section of Documentation/driver-api/basics.rst?
The commit message notes that basics.rst lists all headers that have kernel-doc annotations and are not described elsewhere (with acpi.h left out). However, include/linux/device-id/arm_smccc.h (which is included by include/linux/mod_devicetable.h) defines struct arm_smccc_device_id with a kernel-doc comment:
/**
* struct arm_smccc_device_id - Arm SMCCC bus device identifier
* @func_id: SMCCC function identifier
*/
struct arm_smccc_device_id {
__u32 func_id;
};Since arm_smccc.h is not referenced elsewhere under Documentation/ and is skipped between amba.h and cdx.h, struct arm_smccc_device_id is omitted when generating the documentation.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
PATCH v4 2/2 docs/zh_CN: PCI: Update the pci_device_id header reference
In reply to Karl Mehltretterstruct pci_device_id moved from <linux/mod_devicetable.h> to <linux/device-id/pci.h>. Update the header reference in the Chinese PCI guide to match its new location.
--- Documentation/translations/zh_CN/PCI/pci.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/translations/zh_CN/PCI/pci.rst +1 -1
@@ -92,7 +92,7 @@ ID表是一个由 ``struct pci_device_id`` 结构体成员组成的数组,以 该API在以下内核代码中: -include/linux/mod_devicetable.h +include/linux/device-id/pci.h pci_device_id 大多数驱动程序只需要 ``PCI_DEVICE()`` 或 ``PCI_DEVICE_CLASS()`` 来设置一个
[email protected]
AI reviewRe: [PATCH v4 2/2] docs/zh_CN: PCI: Update the pci_device_id header reference
Sashiko has reviewed this patch and found no issues.
Quoted 7 lines
struct
pci_device_idmoved from <linux/mod_devicetable.h> to <linux/device-id/pci.h>. Update the header reference in the Chinese PCI guide to match its new location.Fixes ad428f5811bd ("mod_devicetable.h: Split into per subsystem headers")Assisted-by LLMSigned-off-by Karl Mehltretter <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
Quoted 37 lines · Karl Mehltretter
This v4 addresses the duplicate PCI declaration warnings Jonathan reported on v3.
Patch 1 retains Uwe's device-ID documentation restoration. Patch 2 corrects the Chinese PCI header path and preserves its existing plain references. The kernel-doc blocks added in v3 are dropped, with generated API documentation deferred to a separate change.
A focused Sphinx 8.2.3 build with -W includes the complete English and Chinese PCI pages together. It reproduces both warnings with v3 and passes without warnings after each v4 patch.
Changes since v3:
https://lore.kernel.org/r/[email protected]/
- Move the Chinese PCI changes to patch 2. The five files in patch 1 are unchanged from v3.
- Clarify the ACPI exclusion in patch 1's commit message using Uwe's explanation to Andy. OnlyACPI_DEVICE_CLASS()has kernel-doc in that header.
- Retain Randy's review and test tags from v2 on patch 1.Changes since v2:
https://lore.kernel.org/r/ede7ce64f20e10660ebf6bc1b41836dad750ae3b.1783349758.git.ukleinek@kernel.org/
- Use the :file: role inpcmcia/driver.rst(Randy) and explain whyacpi.his excluded.Documenting struct
mei_cl_driverininclude/linux/mei_cl_bus.hremains a separate follow-up.Report: https://lore.kernel.org/r/[email protected]/
Karl Mehltretter (1):
docs/zh_CN: PCI: Update thepci_device_idheader referenceUwe Kleine-König (The Capable Hub) (1):
Documentation: Update after split of <linux/mod_devicetable.h>
Quoted 7 lines
Documentation/PCI/pci.rst | 2 +- Documentation/driver-api/basics.rst | 31 +++++++++++++++++-- .../driver-api/mei/mei-client-bus.rst | 12 ++----- Documentation/pcmcia/driver.rst | 2 +- Documentation/staging/rpmsg.rst | 2 +- Documentation/translations/zh_CN/PCI/pci.rst | 2 +- 6 files changed, 36 insertions(+), 15 deletions(-)
Applied, thanks.
jon