Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" |
| 3 | "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" []> |
| 4 | |
| 5 | <book id="LinuxKernelAPI"> |
| 6 | <bookinfo> |
| 7 | <title>The Linux Kernel API</title> |
| 8 | |
| 9 | <legalnotice> |
| 10 | <para> |
| 11 | This documentation is free software; you can redistribute |
| 12 | it and/or modify it under the terms of the GNU General Public |
| 13 | License as published by the Free Software Foundation; either |
| 14 | version 2 of the License, or (at your option) any later |
| 15 | version. |
| 16 | </para> |
| 17 | |
| 18 | <para> |
| 19 | This program is distributed in the hope that it will be |
| 20 | useful, but WITHOUT ANY WARRANTY; without even the implied |
| 21 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 22 | See the GNU General Public License for more details. |
| 23 | </para> |
| 24 | |
| 25 | <para> |
| 26 | You should have received a copy of the GNU General Public |
| 27 | License along with this program; if not, write to the Free |
| 28 | Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
| 29 | MA 02111-1307 USA |
| 30 | </para> |
| 31 | |
| 32 | <para> |
| 33 | For more details see the file COPYING in the source |
| 34 | distribution of Linux. |
| 35 | </para> |
| 36 | </legalnotice> |
| 37 | </bookinfo> |
| 38 | |
| 39 | <toc></toc> |
| 40 | |
| 41 | <chapter id="Basics"> |
| 42 | <title>Driver Basics</title> |
| 43 | <sect1><title>Driver Entry and Exit points</title> |
| 44 | !Iinclude/linux/init.h |
| 45 | </sect1> |
| 46 | |
| 47 | <sect1><title>Atomic and pointer manipulation</title> |
| 48 | !Iinclude/asm-i386/atomic.h |
| 49 | !Iinclude/asm-i386/unaligned.h |
| 50 | </sect1> |
| 51 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 52 | <sect1><title>Delaying, scheduling, and timer routines</title> |
Pavel Pisa | 4dc3b16 | 2005-05-01 08:59:25 -0700 | [diff] [blame] | 53 | !Iinclude/linux/sched.h |
| 54 | !Ekernel/sched.c |
| 55 | !Ekernel/timer.c |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 56 | </sect1> |
Thomas Gleixner | df78488 | 2006-01-09 20:52:33 -0800 | [diff] [blame] | 57 | <sect1><title>High-resolution timers</title> |
| 58 | !Iinclude/linux/ktime.h |
| 59 | !Iinclude/linux/hrtimer.h |
| 60 | !Ekernel/hrtimer.c |
| 61 | </sect1> |
Pavel Pisa | 4dc3b16 | 2005-05-01 08:59:25 -0700 | [diff] [blame] | 62 | <sect1><title>Internal Functions</title> |
| 63 | !Ikernel/exit.c |
| 64 | !Ikernel/signal.c |
| 65 | </sect1> |
| 66 | |
| 67 | <sect1><title>Kernel objects manipulation</title> |
| 68 | <!-- |
| 69 | X!Iinclude/linux/kobject.h |
| 70 | --> |
| 71 | !Elib/kobject.c |
| 72 | </sect1> |
| 73 | |
| 74 | <sect1><title>Kernel utility functions</title> |
| 75 | !Iinclude/linux/kernel.h |
Martin Waitz | ddad86c | 2005-11-13 16:08:14 -0800 | [diff] [blame] | 76 | !Ekernel/printk.c |
Pavel Pisa | 4dc3b16 | 2005-05-01 08:59:25 -0700 | [diff] [blame] | 77 | !Ekernel/panic.c |
| 78 | !Ekernel/sys.c |
| 79 | !Ekernel/rcupdate.c |
| 80 | </sect1> |
| 81 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 82 | </chapter> |
| 83 | |
| 84 | <chapter id="adt"> |
| 85 | <title>Data Types</title> |
| 86 | <sect1><title>Doubly Linked Lists</title> |
| 87 | !Iinclude/linux/list.h |
| 88 | </sect1> |
| 89 | </chapter> |
| 90 | |
| 91 | <chapter id="libc"> |
| 92 | <title>Basic C Library Functions</title> |
| 93 | |
| 94 | <para> |
| 95 | When writing drivers, you cannot in general use routines which are |
| 96 | from the C Library. Some of the functions have been found generally |
| 97 | useful and they are listed below. The behaviour of these functions |
| 98 | may vary slightly from those defined by ANSI, and these deviations |
| 99 | are noted in the text. |
| 100 | </para> |
| 101 | |
| 102 | <sect1><title>String Conversions</title> |
| 103 | !Ilib/vsprintf.c |
| 104 | !Elib/vsprintf.c |
| 105 | </sect1> |
| 106 | <sect1><title>String Manipulation</title> |
Pavel Pisa | 4dc3b16 | 2005-05-01 08:59:25 -0700 | [diff] [blame] | 107 | <!-- All functions are exported at now |
| 108 | X!Ilib/string.c |
| 109 | --> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 110 | !Elib/string.c |
| 111 | </sect1> |
| 112 | <sect1><title>Bit Operations</title> |
| 113 | !Iinclude/asm-i386/bitops.h |
| 114 | </sect1> |
Randy Dunlap | 28e83ba | 2006-06-25 05:48:58 -0700 | [diff] [blame] | 115 | </chapter> |
| 116 | |
| 117 | <chapter id="kernel-lib"> |
| 118 | <title>Basic Kernel Library Functions</title> |
| 119 | |
| 120 | <para> |
| 121 | The Linux kernel provides more basic utility functions. |
| 122 | </para> |
| 123 | |
Randy Dunlap | 6e1907ff | 2006-06-25 05:48:57 -0700 | [diff] [blame] | 124 | <sect1><title>Bitmap Operations</title> |
| 125 | !Elib/bitmap.c |
| 126 | !Ilib/bitmap.c |
| 127 | </sect1> |
Randy Dunlap | 28e83ba | 2006-06-25 05:48:58 -0700 | [diff] [blame] | 128 | |
| 129 | <sect1><title>Command-line Parsing</title> |
| 130 | !Elib/cmdline.c |
| 131 | </sect1> |
Randy Dunlap | 2f72100 | 2006-06-25 05:48:59 -0700 | [diff] [blame^] | 132 | |
| 133 | <sect1><title>CRC Functions</title> |
| 134 | !Elib/crc16.c |
| 135 | !Elib/crc32.c |
| 136 | !Elib/crc-ccitt.c |
| 137 | </sect1> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 138 | </chapter> |
| 139 | |
| 140 | <chapter id="mm"> |
| 141 | <title>Memory Management in Linux</title> |
| 142 | <sect1><title>The Slab Cache</title> |
Paul Drynoff | 800590f | 2006-06-23 02:03:48 -0700 | [diff] [blame] | 143 | !Iinclude/linux/slab.h |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 144 | !Emm/slab.c |
| 145 | </sect1> |
| 146 | <sect1><title>User Space Memory Access</title> |
| 147 | !Iinclude/asm-i386/uaccess.h |
Randy Dunlap | 8f2709b | 2005-11-07 01:01:05 -0800 | [diff] [blame] | 148 | !Earch/i386/lib/usercopy.c |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 149 | </sect1> |
Pavel Pisa | 4dc3b16 | 2005-05-01 08:59:25 -0700 | [diff] [blame] | 150 | <sect1><title>More Memory Management Functions</title> |
| 151 | !Iinclude/linux/rmap.h |
| 152 | !Emm/readahead.c |
| 153 | !Emm/filemap.c |
| 154 | !Emm/memory.c |
| 155 | !Emm/vmalloc.c |
| 156 | !Emm/mempool.c |
| 157 | !Emm/page-writeback.c |
| 158 | !Emm/truncate.c |
| 159 | </sect1> |
| 160 | </chapter> |
| 161 | |
| 162 | |
| 163 | <chapter id="ipc"> |
| 164 | <title>Kernel IPC facilities</title> |
| 165 | |
| 166 | <sect1><title>IPC utilities</title> |
| 167 | !Iipc/util.c |
| 168 | </sect1> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 169 | </chapter> |
| 170 | |
| 171 | <chapter id="kfifo"> |
| 172 | <title>FIFO Buffer</title> |
| 173 | <sect1><title>kfifo interface</title> |
| 174 | !Iinclude/linux/kfifo.h |
| 175 | !Ekernel/kfifo.c |
| 176 | </sect1> |
| 177 | </chapter> |
| 178 | |
| 179 | <chapter id="proc"> |
| 180 | <title>The proc filesystem</title> |
| 181 | |
| 182 | <sect1><title>sysctl interface</title> |
| 183 | !Ekernel/sysctl.c |
| 184 | </sect1> |
Pavel Pisa | 4dc3b16 | 2005-05-01 08:59:25 -0700 | [diff] [blame] | 185 | |
| 186 | <sect1><title>proc filesystem interface</title> |
| 187 | !Ifs/proc/base.c |
| 188 | </sect1> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 189 | </chapter> |
| 190 | |
| 191 | <chapter id="debugfs"> |
| 192 | <title>The debugfs filesystem</title> |
| 193 | |
| 194 | <sect1><title>debugfs interface</title> |
| 195 | !Efs/debugfs/inode.c |
| 196 | !Efs/debugfs/file.c |
| 197 | </sect1> |
| 198 | </chapter> |
| 199 | |
| 200 | <chapter id="vfs"> |
| 201 | <title>The Linux VFS</title> |
Pavel Pisa | 4dc3b16 | 2005-05-01 08:59:25 -0700 | [diff] [blame] | 202 | <sect1><title>The Filesystem types</title> |
| 203 | !Iinclude/linux/fs.h |
Pavel Pisa | 4dc3b16 | 2005-05-01 08:59:25 -0700 | [diff] [blame] | 204 | </sect1> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 205 | <sect1><title>The Directory Cache</title> |
| 206 | !Efs/dcache.c |
| 207 | !Iinclude/linux/dcache.h |
| 208 | </sect1> |
| 209 | <sect1><title>Inode Handling</title> |
| 210 | !Efs/inode.c |
| 211 | !Efs/bad_inode.c |
| 212 | </sect1> |
| 213 | <sect1><title>Registration and Superblocks</title> |
| 214 | !Efs/super.c |
| 215 | </sect1> |
| 216 | <sect1><title>File Locks</title> |
| 217 | !Efs/locks.c |
| 218 | !Ifs/locks.c |
| 219 | </sect1> |
Pavel Pisa | 4dc3b16 | 2005-05-01 08:59:25 -0700 | [diff] [blame] | 220 | <sect1><title>Other Functions</title> |
| 221 | !Efs/mpage.c |
| 222 | !Efs/namei.c |
| 223 | !Efs/buffer.c |
| 224 | !Efs/bio.c |
| 225 | !Efs/seq_file.c |
| 226 | !Efs/filesystems.c |
| 227 | !Efs/fs-writeback.c |
| 228 | !Efs/block_dev.c |
| 229 | </sect1> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 230 | </chapter> |
| 231 | |
| 232 | <chapter id="netcore"> |
| 233 | <title>Linux Networking</title> |
Pavel Pisa | 4dc3b16 | 2005-05-01 08:59:25 -0700 | [diff] [blame] | 234 | <sect1><title>Networking Base Types</title> |
| 235 | !Iinclude/linux/net.h |
| 236 | </sect1> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 237 | <sect1><title>Socket Buffer Functions</title> |
| 238 | !Iinclude/linux/skbuff.h |
Pavel Pisa | 4dc3b16 | 2005-05-01 08:59:25 -0700 | [diff] [blame] | 239 | !Iinclude/net/sock.h |
| 240 | !Enet/socket.c |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 241 | !Enet/core/skbuff.c |
Pavel Pisa | 4dc3b16 | 2005-05-01 08:59:25 -0700 | [diff] [blame] | 242 | !Enet/core/sock.c |
| 243 | !Enet/core/datagram.c |
| 244 | !Enet/core/stream.c |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 245 | </sect1> |
| 246 | <sect1><title>Socket Filter</title> |
| 247 | !Enet/core/filter.c |
| 248 | </sect1> |
| 249 | <sect1><title>Generic Network Statistics</title> |
| 250 | !Iinclude/linux/gen_stats.h |
| 251 | !Enet/core/gen_stats.c |
| 252 | !Enet/core/gen_estimator.c |
| 253 | </sect1> |
Pavel Pisa | 4dc3b16 | 2005-05-01 08:59:25 -0700 | [diff] [blame] | 254 | <sect1><title>SUN RPC subsystem</title> |
| 255 | <!-- The !D functionality is not perfect, garbage has to be protected by comments |
| 256 | !Dnet/sunrpc/sunrpc_syms.c |
| 257 | --> |
| 258 | !Enet/sunrpc/xdr.c |
| 259 | !Enet/sunrpc/svcsock.c |
| 260 | !Enet/sunrpc/sched.c |
| 261 | </sect1> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 262 | </chapter> |
| 263 | |
| 264 | <chapter id="netdev"> |
| 265 | <title>Network device support</title> |
| 266 | <sect1><title>Driver Support</title> |
| 267 | !Enet/core/dev.c |
Stephen Hemminger | c2da8ac | 2005-11-01 17:05:09 -0800 | [diff] [blame] | 268 | !Enet/ethernet/eth.c |
Randy Dunlap | 461ddf3 | 2005-11-20 21:25:15 -0800 | [diff] [blame] | 269 | !Iinclude/linux/etherdevice.h |
| 270 | <!-- FIXME: Removed for now since no structured comments in source |
| 271 | X!Enet/core/wireless.c |
| 272 | --> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 273 | </sect1> |
| 274 | <sect1><title>Synchronous PPP</title> |
| 275 | !Edrivers/net/wan/syncppp.c |
| 276 | </sect1> |
| 277 | </chapter> |
| 278 | |
| 279 | <chapter id="modload"> |
| 280 | <title>Module Support</title> |
| 281 | <sect1><title>Module Loading</title> |
| 282 | !Ekernel/kmod.c |
| 283 | </sect1> |
| 284 | <sect1><title>Inter Module support</title> |
| 285 | <para> |
| 286 | Refer to the file kernel/module.c for more information. |
| 287 | </para> |
| 288 | <!-- FIXME: Removed for now since no structured comments in source |
| 289 | X!Ekernel/module.c |
| 290 | --> |
| 291 | </sect1> |
| 292 | </chapter> |
| 293 | |
| 294 | <chapter id="hardware"> |
| 295 | <title>Hardware Interfaces</title> |
| 296 | <sect1><title>Interrupt Handling</title> |
Randy Dunlap | 8f2709b | 2005-11-07 01:01:05 -0800 | [diff] [blame] | 297 | !Ekernel/irq/manage.c |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 298 | </sect1> |
| 299 | |
Pavel Pisa | 4dc3b16 | 2005-05-01 08:59:25 -0700 | [diff] [blame] | 300 | <sect1><title>Resources Management</title> |
| 301 | !Ekernel/resource.c |
| 302 | </sect1> |
| 303 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 304 | <sect1><title>MTRR Handling</title> |
| 305 | !Earch/i386/kernel/cpu/mtrr/main.c |
| 306 | </sect1> |
| 307 | <sect1><title>PCI Support Library</title> |
| 308 | !Edrivers/pci/pci.c |
Pavel Pisa | 4dc3b16 | 2005-05-01 08:59:25 -0700 | [diff] [blame] | 309 | !Edrivers/pci/pci-driver.c |
| 310 | !Edrivers/pci/remove.c |
| 311 | !Edrivers/pci/pci-acpi.c |
| 312 | <!-- kerneldoc does not understand to __devinit |
| 313 | X!Edrivers/pci/search.c |
| 314 | --> |
| 315 | !Edrivers/pci/msi.c |
| 316 | !Edrivers/pci/bus.c |
Randy Dunlap | f05aab8 | 2005-10-23 11:58:19 -0700 | [diff] [blame] | 317 | <!-- FIXME: Removed for now since no structured comments in source |
| 318 | X!Edrivers/pci/hotplug.c |
| 319 | --> |
Pavel Pisa | 4dc3b16 | 2005-05-01 08:59:25 -0700 | [diff] [blame] | 320 | !Edrivers/pci/probe.c |
| 321 | !Edrivers/pci/rom.c |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 322 | </sect1> |
| 323 | <sect1><title>PCI Hotplug Support Library</title> |
| 324 | !Edrivers/pci/hotplug/pci_hotplug_core.c |
| 325 | </sect1> |
| 326 | <sect1><title>MCA Architecture</title> |
| 327 | <sect2><title>MCA Device Functions</title> |
| 328 | <para> |
| 329 | Refer to the file arch/i386/kernel/mca.c for more information. |
| 330 | </para> |
| 331 | <!-- FIXME: Removed for now since no structured comments in source |
| 332 | X!Earch/i386/kernel/mca.c |
| 333 | --> |
| 334 | </sect2> |
| 335 | <sect2><title>MCA Bus DMA</title> |
| 336 | !Iinclude/asm-i386/mca_dma.h |
| 337 | </sect2> |
| 338 | </sect1> |
| 339 | </chapter> |
| 340 | |
| 341 | <chapter id="devfs"> |
| 342 | <title>The Device File System</title> |
| 343 | !Efs/devfs/base.c |
| 344 | </chapter> |
| 345 | |
Pavel Pisa | 4dc3b16 | 2005-05-01 08:59:25 -0700 | [diff] [blame] | 346 | <chapter id="sysfs"> |
| 347 | <title>The Filesystem for Exporting Kernel Objects</title> |
| 348 | !Efs/sysfs/file.c |
Pavel Pisa | 4dc3b16 | 2005-05-01 08:59:25 -0700 | [diff] [blame] | 349 | !Efs/sysfs/symlink.c |
| 350 | !Efs/sysfs/bin.c |
| 351 | </chapter> |
| 352 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 353 | <chapter id="security"> |
| 354 | <title>Security Framework</title> |
| 355 | !Esecurity/security.c |
| 356 | </chapter> |
| 357 | |
Randy Dunlap | 862f5f0 | 2006-06-23 02:05:52 -0700 | [diff] [blame] | 358 | <chapter id="audit"> |
| 359 | <title>Audit Interfaces</title> |
| 360 | !Ekernel/audit.c |
| 361 | !Ikernel/auditsc.c |
| 362 | !Ikernel/auditfilter.c |
| 363 | </chapter> |
| 364 | |
| 365 | <chapter id="accounting"> |
| 366 | <title>Accounting Framework</title> |
| 367 | !Ikernel/acct.c |
| 368 | </chapter> |
| 369 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 370 | <chapter id="pmfuncs"> |
| 371 | <title>Power Management</title> |
| 372 | !Ekernel/power/pm.c |
| 373 | </chapter> |
| 374 | |
Pavel Pisa | 4dc3b16 | 2005-05-01 08:59:25 -0700 | [diff] [blame] | 375 | <chapter id="devdrivers"> |
| 376 | <title>Device drivers infrastructure</title> |
| 377 | <sect1><title>Device Drivers Base</title> |
| 378 | <!-- |
| 379 | X!Iinclude/linux/device.h |
| 380 | --> |
| 381 | !Edrivers/base/driver.c |
Pavel Pisa | 4dc3b16 | 2005-05-01 08:59:25 -0700 | [diff] [blame] | 382 | !Edrivers/base/core.c |
| 383 | !Edrivers/base/firmware_class.c |
| 384 | !Edrivers/base/transport_class.c |
| 385 | !Edrivers/base/dmapool.c |
| 386 | <!-- Cannot be included, because |
| 387 | attribute_container_add_class_device_adapter |
| 388 | and attribute_container_classdev_to_container |
| 389 | exceed allowed 44 characters maximum |
| 390 | X!Edrivers/base/attribute_container.c |
| 391 | --> |
| 392 | !Edrivers/base/sys.c |
| 393 | <!-- |
| 394 | X!Edrivers/base/interface.c |
| 395 | --> |
| 396 | !Edrivers/base/platform.c |
| 397 | !Edrivers/base/bus.c |
| 398 | </sect1> |
| 399 | <sect1><title>Device Drivers Power Management</title> |
| 400 | !Edrivers/base/power/main.c |
| 401 | !Edrivers/base/power/resume.c |
| 402 | !Edrivers/base/power/suspend.c |
| 403 | </sect1> |
| 404 | <sect1><title>Device Drivers ACPI Support</title> |
| 405 | <!-- Internal functions only |
| 406 | X!Edrivers/acpi/sleep/main.c |
| 407 | X!Edrivers/acpi/sleep/wakeup.c |
| 408 | X!Edrivers/acpi/motherboard.c |
| 409 | X!Edrivers/acpi/bus.c |
| 410 | --> |
| 411 | !Edrivers/acpi/scan.c |
Randy Dunlap | d758a8f | 2006-01-06 01:31:00 -0500 | [diff] [blame] | 412 | !Idrivers/acpi/scan.c |
Pavel Pisa | 4dc3b16 | 2005-05-01 08:59:25 -0700 | [diff] [blame] | 413 | <!-- No correct structured comments |
| 414 | X!Edrivers/acpi/pci_bind.c |
| 415 | --> |
| 416 | </sect1> |
| 417 | <sect1><title>Device drivers PnP support</title> |
| 418 | !Edrivers/pnp/core.c |
| 419 | <!-- No correct structured comments |
| 420 | X!Edrivers/pnp/system.c |
| 421 | --> |
| 422 | !Edrivers/pnp/card.c |
| 423 | !Edrivers/pnp/driver.c |
| 424 | !Edrivers/pnp/manager.c |
| 425 | !Edrivers/pnp/support.c |
| 426 | </sect1> |
| 427 | </chapter> |
| 428 | |
| 429 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 430 | <chapter id="blkdev"> |
| 431 | <title>Block Devices</title> |
Ben Collins | 1d193f4 | 2005-11-15 00:09:21 -0800 | [diff] [blame] | 432 | !Eblock/ll_rw_blk.c |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 433 | </chapter> |
| 434 | |
| 435 | <chapter id="miscdev"> |
| 436 | <title>Miscellaneous Devices</title> |
| 437 | !Edrivers/char/misc.c |
| 438 | </chapter> |
| 439 | |
| 440 | <chapter id="viddev"> |
| 441 | <title>Video4Linux</title> |
| 442 | !Edrivers/media/video/videodev.c |
| 443 | </chapter> |
| 444 | |
| 445 | <chapter id="snddev"> |
| 446 | <title>Sound Devices</title> |
Pavel Pisa | 4dc3b16 | 2005-05-01 08:59:25 -0700 | [diff] [blame] | 447 | !Iinclude/sound/core.h |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 448 | !Esound/sound_core.c |
Pavel Pisa | 4dc3b16 | 2005-05-01 08:59:25 -0700 | [diff] [blame] | 449 | !Iinclude/sound/pcm.h |
| 450 | !Esound/core/pcm.c |
| 451 | !Esound/core/device.c |
| 452 | !Esound/core/info.c |
| 453 | !Esound/core/rawmidi.c |
| 454 | !Esound/core/sound.c |
| 455 | !Esound/core/memory.c |
| 456 | !Esound/core/pcm_memory.c |
| 457 | !Esound/core/init.c |
| 458 | !Esound/core/isadma.c |
| 459 | !Esound/core/control.c |
| 460 | !Esound/core/pcm_lib.c |
| 461 | !Esound/core/hwdep.c |
| 462 | !Esound/core/pcm_native.c |
| 463 | !Esound/core/memalloc.c |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 464 | <!-- FIXME: Removed for now since no structured comments in source |
| 465 | X!Isound/sound_firmware.c |
| 466 | --> |
| 467 | </chapter> |
| 468 | |
| 469 | <chapter id="uart16x50"> |
| 470 | <title>16x50 UART Driver</title> |
Pavel Pisa | 4dc3b16 | 2005-05-01 08:59:25 -0700 | [diff] [blame] | 471 | !Iinclude/linux/serial_core.h |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 472 | !Edrivers/serial/serial_core.c |
| 473 | !Edrivers/serial/8250.c |
| 474 | </chapter> |
| 475 | |
| 476 | <chapter id="z85230"> |
| 477 | <title>Z85230 Support Library</title> |
| 478 | !Edrivers/net/wan/z85230.c |
| 479 | </chapter> |
| 480 | |
| 481 | <chapter id="fbdev"> |
| 482 | <title>Frame Buffer Library</title> |
| 483 | |
| 484 | <para> |
| 485 | The frame buffer drivers depend heavily on four data structures. |
| 486 | These structures are declared in include/linux/fb.h. They are |
| 487 | fb_info, fb_var_screeninfo, fb_fix_screeninfo and fb_monospecs. |
| 488 | The last three can be made available to and from userland. |
| 489 | </para> |
| 490 | |
| 491 | <para> |
| 492 | fb_info defines the current state of a particular video card. |
| 493 | Inside fb_info, there exists a fb_ops structure which is a |
| 494 | collection of needed functions to make fbdev and fbcon work. |
| 495 | fb_info is only visible to the kernel. |
| 496 | </para> |
| 497 | |
| 498 | <para> |
| 499 | fb_var_screeninfo is used to describe the features of a video card |
| 500 | that are user defined. With fb_var_screeninfo, things such as |
| 501 | depth and the resolution may be defined. |
| 502 | </para> |
| 503 | |
| 504 | <para> |
| 505 | The next structure is fb_fix_screeninfo. This defines the |
| 506 | properties of a card that are created when a mode is set and can't |
| 507 | be changed otherwise. A good example of this is the start of the |
| 508 | frame buffer memory. This "locks" the address of the frame buffer |
| 509 | memory, so that it cannot be changed or moved. |
| 510 | </para> |
| 511 | |
| 512 | <para> |
| 513 | The last structure is fb_monospecs. In the old API, there was |
| 514 | little importance for fb_monospecs. This allowed for forbidden things |
| 515 | such as setting a mode of 800x600 on a fix frequency monitor. With |
| 516 | the new API, fb_monospecs prevents such things, and if used |
| 517 | correctly, can prevent a monitor from being cooked. fb_monospecs |
| 518 | will not be useful until kernels 2.5.x. |
| 519 | </para> |
| 520 | |
| 521 | <sect1><title>Frame Buffer Memory</title> |
| 522 | !Edrivers/video/fbmem.c |
| 523 | </sect1> |
Pavel Pisa | 4dc3b16 | 2005-05-01 08:59:25 -0700 | [diff] [blame] | 524 | <!-- |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 525 | <sect1><title>Frame Buffer Console</title> |
Pavel Pisa | 4dc3b16 | 2005-05-01 08:59:25 -0700 | [diff] [blame] | 526 | X!Edrivers/video/console/fbcon.c |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 527 | </sect1> |
Pavel Pisa | 4dc3b16 | 2005-05-01 08:59:25 -0700 | [diff] [blame] | 528 | --> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 529 | <sect1><title>Frame Buffer Colormap</title> |
| 530 | !Edrivers/video/fbcmap.c |
| 531 | </sect1> |
| 532 | <!-- FIXME: |
| 533 | drivers/video/fbgen.c has no docs, which stuffs up the sgml. Comment |
| 534 | out until somebody adds docs. KAO |
| 535 | <sect1><title>Frame Buffer Generic Functions</title> |
| 536 | X!Idrivers/video/fbgen.c |
| 537 | </sect1> |
| 538 | KAO --> |
| 539 | <sect1><title>Frame Buffer Video Mode Database</title> |
| 540 | !Idrivers/video/modedb.c |
| 541 | !Edrivers/video/modedb.c |
| 542 | </sect1> |
| 543 | <sect1><title>Frame Buffer Macintosh Video Mode Database</title> |
Randy Dunlap | 8f2709b | 2005-11-07 01:01:05 -0800 | [diff] [blame] | 544 | !Edrivers/video/macmodes.c |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 545 | </sect1> |
| 546 | <sect1><title>Frame Buffer Fonts</title> |
| 547 | <para> |
| 548 | Refer to the file drivers/video/console/fonts.c for more information. |
| 549 | </para> |
| 550 | <!-- FIXME: Removed for now since no structured comments in source |
| 551 | X!Idrivers/video/console/fonts.c |
| 552 | --> |
| 553 | </sect1> |
| 554 | </chapter> |
| 555 | </book> |