Commit 3706baa8b1ba0d71d52fd0c656752a6495f6364a
Committed by
Linus Torvalds
1 parent
eb84a20e9e
[PATCH] Documentation/SubmittingDrivers: minor update
* fix copright typo * remove trailing whitespace * remove Kernel Traffic from Resources. Zack, it was great reading! * Name Arjan by name and fix URL of "How to NOT" paper. * Remove "Last updated" tag. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Showing 1 changed file with 7 additions and 14 deletions Inline Diff
Documentation/SubmittingDrivers
1 | Submitting Drivers For The Linux Kernel | 1 | Submitting Drivers For The Linux Kernel |
2 | --------------------------------------- | 2 | --------------------------------------- |
3 | 3 | ||
4 | This document is intended to explain how to submit device drivers to the | 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 | 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 | 6 | you should probably talk to XFree86 (http://www.xfree86.org/) and/or X.Org |
7 | (http://x.org/) instead. | 7 | (http://x.org/) instead. |
8 | 8 | ||
9 | Also read the Documentation/SubmittingPatches document. | 9 | Also read the Documentation/SubmittingPatches document. |
10 | 10 | ||
11 | 11 | ||
12 | Allocating Device Numbers | 12 | Allocating Device Numbers |
13 | ------------------------- | 13 | ------------------------- |
14 | 14 | ||
15 | Major and minor numbers for block and character devices are allocated | 15 | Major and minor numbers for block and character devices are allocated |
16 | by the Linux assigned name and number authority (currently this is | 16 | by the Linux assigned name and number authority (currently this is |
17 | Torben Mathiasen). The site is http://www.lanana.org/. This | 17 | Torben Mathiasen). The site is http://www.lanana.org/. This |
18 | also deals with allocating numbers for devices that are not going to | 18 | also deals with allocating numbers for devices that are not going to |
19 | be submitted to the mainstream kernel. | 19 | be submitted to the mainstream kernel. |
20 | See Documentation/devices.txt for more information on this. | 20 | See Documentation/devices.txt for more information on this. |
21 | 21 | ||
22 | If you don't use assigned numbers then when your device is submitted it will | 22 | If you don't use assigned numbers then when your device is submitted it will |
23 | be given an assigned number even if that is different from values you may | 23 | be given an assigned number even if that is different from values you may |
24 | have shipped to customers before. | 24 | have shipped to customers before. |
25 | 25 | ||
26 | Who To Submit Drivers To | 26 | Who To Submit Drivers To |
27 | ------------------------ | 27 | ------------------------ |
28 | 28 | ||
29 | Linux 2.0: | 29 | Linux 2.0: |
30 | No new drivers are accepted for this kernel tree. | 30 | No new drivers are accepted for this kernel tree. |
31 | 31 | ||
32 | Linux 2.2: | 32 | Linux 2.2: |
33 | No new drivers are accepted for this kernel tree. | 33 | No new drivers are accepted for this kernel tree. |
34 | 34 | ||
35 | Linux 2.4: | 35 | Linux 2.4: |
36 | If the code area has a general maintainer then please submit it to | 36 | If the code area has a general maintainer then please submit it to |
37 | the maintainer listed in MAINTAINERS in the kernel file. If the | 37 | the maintainer listed in MAINTAINERS in the kernel file. If the |
38 | maintainer does not respond or you cannot find the appropriate | 38 | maintainer does not respond or you cannot find the appropriate |
39 | maintainer then please contact Marcelo Tosatti | 39 | maintainer then please contact Marcelo Tosatti |
40 | <marcelo.tosatti@cyclades.com>. | 40 | <marcelo.tosatti@cyclades.com>. |
41 | 41 | ||
42 | Linux 2.6: | 42 | Linux 2.6: |
43 | The same rules apply as 2.4 except that you should follow linux-kernel | 43 | The same rules apply as 2.4 except that you should follow linux-kernel |
44 | to track changes in API's. The final contact point for Linux 2.6 | 44 | to track changes in API's. The final contact point for Linux 2.6 |
45 | submissions is Andrew Morton <akpm@osdl.org>. | 45 | submissions is Andrew Morton <akpm@osdl.org>. |
46 | 46 | ||
47 | What Criteria Determine Acceptance | 47 | What Criteria Determine Acceptance |
48 | ---------------------------------- | 48 | ---------------------------------- |
49 | 49 | ||
50 | Licensing: The code must be released to us under the | 50 | Licensing: The code must be released to us under the |
51 | GNU General Public License. We don't insist on any kind | 51 | GNU General Public License. We don't insist on any kind |
52 | of exclusive GPL licensing, and if you wish the driver | 52 | of exclusive GPL licensing, and if you wish the driver |
53 | to be useful to other communities such as BSD you may well | 53 | to be useful to other communities such as BSD you may well |
54 | wish to release under multiple licenses. | 54 | wish to release under multiple licenses. |
55 | See accepted licenses at include/linux/module.h | 55 | See accepted licenses at include/linux/module.h |
56 | 56 | ||
57 | Copyright: The copyright owner must agree to use of GPL. | 57 | Copyright: The copyright owner must agree to use of GPL. |
58 | It's best if the submitter and copyright owner | 58 | It's best if the submitter and copyright owner |
59 | are the same person/entity. If not, the name of | 59 | are the same person/entity. If not, the name of |
60 | the person/entity authorizing use of GPL should be | 60 | the person/entity authorizing use of GPL should be |
61 | listed in case it's necessary to verify the will of | 61 | listed in case it's necessary to verify the will of |
62 | the copright owner. | 62 | the copyright owner. |
63 | 63 | ||
64 | Interfaces: If your driver uses existing interfaces and behaves like | 64 | Interfaces: If your driver uses existing interfaces and behaves like |
65 | other drivers in the same class it will be much more likely | 65 | other drivers in the same class it will be much more likely |
66 | to be accepted than if it invents gratuitous new ones. | 66 | to be accepted than if it invents gratuitous new ones. |
67 | If you need to implement a common API over Linux and NT | 67 | If you need to implement a common API over Linux and NT |
68 | drivers do it in userspace. | 68 | drivers do it in userspace. |
69 | 69 | ||
70 | Code: Please use the Linux style of code formatting as documented | 70 | Code: Please use the Linux style of code formatting as documented |
71 | in Documentation/CodingStyle. If you have sections of code | 71 | in Documentation/CodingStyle. If you have sections of code |
72 | that need to be in other formats, for example because they | 72 | that need to be in other formats, for example because they |
73 | are shared with a windows driver kit and you want to | 73 | are shared with a windows driver kit and you want to |
74 | maintain them just once separate them out nicely and note | 74 | maintain them just once separate them out nicely and note |
75 | this fact. | 75 | this fact. |
76 | 76 | ||
77 | Portability: Pointers are not always 32bits, not all computers are little | 77 | Portability: Pointers are not always 32bits, not all computers are little |
78 | endian, people do not all have floating point and you | 78 | endian, people do not all have floating point and you |
79 | shouldn't use inline x86 assembler in your driver without | 79 | shouldn't use inline x86 assembler in your driver without |
80 | careful thought. Pure x86 drivers generally are not popular. | 80 | careful thought. Pure x86 drivers generally are not popular. |
81 | If you only have x86 hardware it is hard to test portability | 81 | If you only have x86 hardware it is hard to test portability |
82 | but it is easy to make sure the code can easily be made | 82 | but it is easy to make sure the code can easily be made |
83 | portable. | 83 | portable. |
84 | 84 | ||
85 | Clarity: It helps if anyone can see how to fix the driver. It helps | 85 | Clarity: It helps if anyone can see how to fix the driver. It helps |
86 | you because you get patches not bug reports. If you submit a | 86 | you because you get patches not bug reports. If you submit a |
87 | driver that intentionally obfuscates how the hardware works | 87 | driver that intentionally obfuscates how the hardware works |
88 | it will go in the bitbucket. | 88 | it will go in the bitbucket. |
89 | 89 | ||
90 | Control: In general if there is active maintainance of a driver by | 90 | Control: In general if there is active maintainance of a driver by |
91 | the author then patches will be redirected to them unless | 91 | the author then patches will be redirected to them unless |
92 | they are totally obvious and without need of checking. | 92 | they are totally obvious and without need of checking. |
93 | If you want to be the contact and update point for the | 93 | If you want to be the contact and update point for the |
94 | driver it is a good idea to state this in the comments, | 94 | driver it is a good idea to state this in the comments, |
95 | and include an entry in MAINTAINERS for your driver. | 95 | and include an entry in MAINTAINERS for your driver. |
96 | 96 | ||
97 | What Criteria Do Not Determine Acceptance | 97 | What Criteria Do Not Determine Acceptance |
98 | ----------------------------------------- | 98 | ----------------------------------------- |
99 | 99 | ||
100 | Vendor: Being the hardware vendor and maintaining the driver is | 100 | Vendor: Being the hardware vendor and maintaining the driver is |
101 | often a good thing. If there is a stable working driver from | 101 | often a good thing. If there is a stable working driver from |
102 | other people already in the tree don't expect 'we are the | 102 | other people already in the tree don't expect 'we are the |
103 | vendor' to get your driver chosen. Ideally work with the | 103 | vendor' to get your driver chosen. Ideally work with the |
104 | existing driver author to build a single perfect driver. | 104 | existing driver author to build a single perfect driver. |
105 | 105 | ||
106 | Author: It doesn't matter if a large Linux company wrote the driver, | 106 | Author: It doesn't matter if a large Linux company wrote the driver, |
107 | or you did. Nobody has any special access to the kernel | 107 | or you did. Nobody has any special access to the kernel |
108 | tree. Anyone who tells you otherwise isn't telling the | 108 | tree. Anyone who tells you otherwise isn't telling the |
109 | whole story. | 109 | whole story. |
110 | 110 | ||
111 | 111 | ||
112 | Resources | 112 | Resources |
113 | --------- | 113 | --------- |
114 | 114 | ||
115 | Linux kernel master tree: | 115 | Linux kernel master tree: |
116 | ftp.??.kernel.org:/pub/linux/kernel/... | 116 | ftp.??.kernel.org:/pub/linux/kernel/... |
117 | ?? == your country code, such as "us", "uk", "fr", etc. | 117 | ?? == your country code, such as "us", "uk", "fr", etc. |
118 | 118 | ||
119 | Linux kernel mailing list: | 119 | Linux kernel mailing list: |
120 | linux-kernel@vger.kernel.org | 120 | linux-kernel@vger.kernel.org |
121 | [mail majordomo@vger.kernel.org to subscribe] | 121 | [mail majordomo@vger.kernel.org to subscribe] |
122 | 122 | ||
123 | Linux Device Drivers, Third Edition (covers 2.6.10): | 123 | Linux Device Drivers, Third Edition (covers 2.6.10): |
124 | http://lwn.net/Kernel/LDD3/ (free version) | 124 | http://lwn.net/Kernel/LDD3/ (free version) |
125 | 125 | ||
126 | Kernel traffic: | ||
127 | Weekly summary of kernel list activity (much easier to read) | ||
128 | http://www.kerneltraffic.org/kernel-traffic/ | ||
129 | |||
130 | LWN.net: | 126 | LWN.net: |
131 | Weekly summary of kernel development activity - http://lwn.net/ | 127 | Weekly summary of kernel development activity - http://lwn.net/ |
132 | 2.6 API changes: | 128 | 2.6 API changes: |
133 | http://lwn.net/Articles/2.6-kernel-api/ | 129 | http://lwn.net/Articles/2.6-kernel-api/ |
134 | Porting drivers from prior kernels to 2.6: | 130 | Porting drivers from prior kernels to 2.6: |
135 | http://lwn.net/Articles/driver-porting/ | 131 | http://lwn.net/Articles/driver-porting/ |
136 | 132 | ||
137 | KernelTrap: | 133 | KernelTrap: |
138 | Occasional Linux kernel articles and developer interviews | 134 | Occasional Linux kernel articles and developer interviews |
139 | http://kerneltrap.org/ | 135 | http://kerneltrap.org/ |
140 | 136 | ||
141 | KernelNewbies: | 137 | KernelNewbies: |
142 | Documentation and assistance for new kernel programmers | 138 | Documentation and assistance for new kernel programmers |
143 | http://kernelnewbies.org/ | 139 | http://kernelnewbies.org/ |
144 | 140 | ||
145 | Linux USB project: | 141 | Linux USB project: |
146 | http://www.linux-usb.org/ | 142 | http://www.linux-usb.org/ |
147 | 143 | ||
148 | How to NOT write kernel driver by arjanv@redhat.com | 144 | How to NOT write kernel driver by Arjan van de Ven: |
149 | http://people.redhat.com/arjanv/olspaper.pdf | 145 | http://www.fenrus.org/how-to-not-write-a-device-driver-paper.pdf |
150 | 146 | ||
151 | Kernel Janitor: | 147 | Kernel Janitor: |
152 | http://janitor.kernelnewbies.org/ | 148 | http://janitor.kernelnewbies.org/ |
153 | |||
154 | -- | ||
155 | Last updated on 17 Nov 2005. | ||
156 | 149 |