LWN.net Logo

Drivers as documentation

Drivers as documentation

Posted Nov 27, 2011 5:52 UTC (Sun) by neilbrown (subscriber, #359)
Parent article: Drivers as documentation

> So, if a driver contains code like:
>
> writel(devp->regs[42], 0xf4ee0815);
>
> it is missing something important.

One could argue that one important thing this code fragment is missing is GPL compliance.

> The source code for a work means the preferred form of the work for
> making modifications to it.

You cannot make sensible modifications to the above. You need it to be combined with documentation. So if the datasheet were included with the source code it might be OK. But without the data sheet ... it seems little different to binary firmware blobs.

(I've just been looking at init_lb035q02_panel() in

drivers/video/omap2/displays/panel-lgphilips-lb035q02.c

and feel that something is definitely missing in the freedom I am being given to understand and modify this code).

Do we need a sub-tree of Documentation which contains lots of PDFs of data sheets???


(Log in to post comments)

Datasheets

Posted Nov 27, 2011 15:36 UTC (Sun) by corbet (editor, #1) [Link]

The problem, of course, is that lots of driver developers get the datasheets under NDAs and cannot contribute them anywhere public. There are those who say that we simply should not develop drivers under such conditions, while others say it's better to have the driver with as much useful information crammed into it as possible.

GPL compliance seems like a hard claim to make, in any case. There is no other form of the code to be "the preferred form of the work for making modifications."

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds