Re: [PATCH RFC] docs: add python module documentation

From: Jonathan Corbet

Date: Tue Jan 13 2026 - 15:46:37 EST


Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx> writes:

> Hi Jon,
>
> While checking/improving docstrings inside kernel-doc, I noticed
> that some changes there aren't Sphinx-compatible. Also, there are
> several functions and some classes that miss documentation.
>
> Being responsible for doing some documentation work, I felt blamed
> on not having a good documentation of our own dog food :-)
>
> So, I'm adding kdoc documentation to the Kernel documentation. The basic
> change is just a couple of extra lines at conf.py, plus a few *.rst files
> pointing to the files we want to document:

At a first glance, this looks like a worthy task.

I've never really played with autodoc. Sure you don't want to fix up
kernel-doc to read Python code too? :) Seriously, though, I worry that
it could end up cluttering the code with a bunch of sphinxstuff, but the
only way to really see is to try it.

Thanks,

jon