Documenting device driver methods

Benjamin Kaduk kaduk at MIT.EDU
Wed Dec 7 05:56:34 UTC 2011


On Tue, 6 Dec 2011, Stefan Bethke wrote:

>
> Am 06.12.2011 um 15:34 schrieb Stefan Bethke:
>
>> I noticed that very few (if any) device drivers have their interface 
>> methods documented (e.g. iicbus, iicbb, gpiobus, gpio).
>>
>> Where should such documentation go? In the driver specific man page, in 
>> a separate section 9 page per method, or a single section 9 man page?
>>
>> Is there a preferred style for these?
>
> Would it make sense to document device classes in the device section 
> with the class name in all capitals, e.g. foo_if.m as FOO.4?

My 0.02 would be a single section 4 page per driver, but with a bunch of 
MLINKS for the methods, and cross-ref'd from the driver page.  The driver 
page seems to be more of an overview of the thing as a whole and not 
really a programming guide.  Though, that might lead one to put it in 
section 9 ...

-Ben Kaduk



More information about the freebsd-doc mailing list