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