1 Submitting Drivers For The Linux Kernel
2 ---------------------------------------
4 This document is intended to explain how to submit device drivers to the
5 various kernel trees. Note that if you are interested in video card drivers
6 you should probably talk to XFree86 (http://www.xfree86.org/) and/or X.Org
7 (http://x.org/) instead.
9 Also read the Documentation/SubmittingPatches document.
12 Allocating Device Numbers
13 -------------------------
15 Major and minor numbers for block and character devices are allocated
16 by the Linux assigned name and number authority (currently better
17 known as H Peter Anvin). The site is http://www.lanana.org/. This
18 also deals with allocating numbers for devices that are not going to
19 be submitted to the mainstream kernel.
21 If you don't use assigned numbers then when you device is submitted it will
22 get given an assigned number even if that is different from values you may
23 have shipped to customers before.
25 Who To Submit Drivers To
26 ------------------------
29 No new drivers are accepted for this kernel tree
32 If the code area has a general maintainer then please submit it to
33 the maintainer listed in MAINTAINERS in the kernel file. If the
34 maintainer does not respond or you cannot find the appropriate
35 maintainer then please contact Alan Cox <alan@lxorguk.ukuu.org.uk>
38 The same rules apply as 2.2. The final contact point for Linux 2.4
39 submissions is Marcelo Tosatti <marcelo.tosatti@cyclades.com>.
42 The same rules apply as 2.4 except that you should follow linux-kernel
43 to track changes in API's. The final contact point for Linux 2.6
44 submissions is Andrew Morton <akpm@osdl.org>.
46 What Criteria Determine Acceptance
47 ----------------------------------
49 Licensing: The code must be released to us under the
50 GNU General Public License. We don't insist on any kind
51 of exclusively GPL licensing, and if you wish the driver
52 to be useful to other communities such as BSD you may well
53 wish to release under multiple licenses.
55 Copyright: The copyright owner must agree to use of GPL.
56 It's best if the submitter and copyright owner
57 are the same person/entity. If not, the name of
58 the person/entity authorizing use of GPL should be
59 listed in case it's necessary to verify the will of
62 Interfaces: If your driver uses existing interfaces and behaves like
63 other drivers in the same class it will be much more likely
64 to be accepted than if it invents gratuitous new ones.
65 If you need to implement a common API over Linux and NT
66 drivers do it in userspace.
68 Code: Please use the Linux style of code formatting as documented
69 in Documentation/CodingStyle. If you have sections of code
70 that need to be in other formats, for example because they
71 are shared with a windows driver kit and you want to
72 maintain them just once separate them out nicely and note
75 Portability: Pointers are not always 32bits, not all computers are little
76 endian, people do not all have floating point and you
77 shouldn't use inline x86 assembler in your driver without
78 careful thought. Pure x86 drivers generally are not popular.
79 If you only have x86 hardware it is hard to test portability
80 but it is easy to make sure the code can easily be made
83 Clarity: It helps if anyone can see how to fix the driver. It helps
84 you because you get patches not bug reports. If you submit a
85 driver that intentionally obfuscates how the hardware works
86 it will go in the bitbucket.
88 Control: In general if there is active maintainance of a driver by
89 the author then patches will be redirected to them unless
90 they are totally obvious and without need of checking.
91 If you want to be the contact and update point for the
92 driver it is a good idea to state this in the comments,
93 and include an entry in MAINTAINERS for your driver.
95 What Criteria Do Not Determine Acceptance
96 -----------------------------------------
98 Vendor: Being the hardware vendor and maintaining the driver is
99 often a good thing. If there is a stable working driver from
100 other people already in the tree don't expect 'we are the
101 vendor' to get your driver chosen. Ideally work with the
102 existing driver author to build a single perfect driver.
104 Author: It doesn't matter if a large Linux company wrote the driver,
105 or you did. Nobody has any special access to the kernel
106 tree. Anyone who tells you otherwise isn't telling the
113 Linux kernel master tree:
114 ftp.??.kernel.org:/pub/linux/kernel/...
115 ?? == your country code, such as "us", "uk", "fr", etc.
117 Linux kernel mailing list:
118 linux-kernel@vger.kernel.org
119 [mail majordomo@vger.kernel.org to subscribe]
121 Linux Device Drivers, Third Edition (covers 2.6.10):
122 http://lwn.net/Kernel/LDD3/ (free version)
125 Weekly summary of kernel list activity (much easier to read)
126 http://www.kerneltraffic.org/kernel-traffic/
129 Weekly summary of kernel development activity - http://lwn.net/
131 http://lwn.net/Articles/2.6-kernel-api/
132 Porting drivers from prior kernels to 2.6:
133 http://lwn.net/Articles/driver-porting/
136 Occasional Linux kernel articles and developer interviews
137 http://kerneltrap.org/
140 Documentation and assistance for new kernel programmers
141 http://kernelnewbies.org/
144 http://sourceforge.net/projects/linux-usb/