<?xml version="1.0" encoding="ANSI_X3.4-1968" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968" /><title>Linux Device Drivers</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2" /><link rel="home" href="index.html" title="Linux Device Drivers" /><link rel="next" href="ch01.html" title="Chapter 1. Driver Basics" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Linux Device Drivers</th></tr><tr><td width="20%" align="left"> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ch01.html">Next</a></td></tr></table><hr /></div><div class="book" title="Linux Device Drivers"><div class="titlepage"><div><div><h1 class="title"><a id="LinuxDriversAPI"></a>Linux Device Drivers</h1></div><div><div class="legalnotice" title="Legal Notice"><a id="id2568674"></a><p> This documentation is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. </p><p> This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. </p><p> You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA </p><p> For more details see the file COPYING in the source distribution of Linux. </p></div></div></div><hr /></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="ch01.html">1. Driver Basics</a></span></dt><dd><dl><dt><span class="sect1"><a href="ch01.html#id2546162">Driver Entry and Exit points</a></span></dt><dt><span class="sect1"><a href="ch01s02.html">Atomic and pointer manipulation</a></span></dt><dt><span class="sect1"><a href="ch01s03.html">Delaying, scheduling, and timer routines</a></span></dt><dt><span class="sect1"><a href="ch01s04.html">High-resolution timers</a></span></dt><dt><span class="sect1"><a href="ch01s05.html">Workqueues and Kevents</a></span></dt><dt><span class="sect1"><a href="ch01s06.html">Internal Functions</a></span></dt><dt><span class="sect1"><a href="ch01s07.html">Kernel objects manipulation</a></span></dt><dt><span class="sect1"><a href="ch01s08.html">Kernel utility functions</a></span></dt><dt><span class="sect1"><a href="ch01s09.html">Device Resource Management</a></span></dt></dl></dd><dt><span class="chapter"><a href="ch02.html">2. Device drivers infrastructure</a></span></dt><dd><dl><dt><span class="sect1"><a href="ch02.html#id2617423">Device Drivers Base</a></span></dt><dt><span class="sect1"><a href="ch02s02.html">Device Drivers Power Management</a></span></dt><dt><span class="sect1"><a href="ch02s03.html">Device Drivers ACPI Support</a></span></dt><dt><span class="sect1"><a href="ch02s04.html">Device drivers PnP support</a></span></dt><dt><span class="sect1"><a href="ch02s05.html">Userspace IO devices</a></span></dt></dl></dd><dt><span class="chapter"><a href="ch03.html">3. Parallel Port Devices</a></span></dt><dd><dl><dt><span class="refentrytitle"><a href="re276.html"><span>parport_yield</span></a></span><span class="refpurpose"> — relinquish a parallel port temporarily </span></dt><dt><span class="refentrytitle"><a href="re277.html"><span>parport_yield_blocking</span></a></span><span class="refpurpose"> — relinquish a parallel port temporarily </span></dt><dt><span class="refentrytitle"><a href="re278.html"><span>parport_wait_event</span></a></span><span class="refpurpose"> — wait for an event on a parallel port </span></dt><dt><span class="refentrytitle"><a href="re279.html"><span>parport_wait_peripheral</span></a></span><span class="refpurpose"> — wait for status lines to change in 35ms </span></dt><dt><span class="refentrytitle"><a href="re280.html"><span>parport_negotiate</span></a></span><span class="refpurpose"> — negotiate an IEEE 1284 mode </span></dt><dt><span class="refentrytitle"><a href="re281.html"><span>parport_write</span></a></span><span class="refpurpose"> — write a block of data to a parallel port </span></dt><dt><span class="refentrytitle"><a href="re282.html"><span>parport_read</span></a></span><span class="refpurpose"> — read a block of data from a parallel port </span></dt><dt><span class="refentrytitle"><a href="re283.html"><span>parport_set_timeout</span></a></span><span class="refpurpose"> — set the inactivity timeout for a device </span></dt><dt><span class="refentrytitle"><a href="re284.html"><span>parport_register_driver</span></a></span><span class="refpurpose"> — register a parallel port device driver </span></dt><dt><span class="refentrytitle"><a href="re285.html"><span>parport_unregister_driver</span></a></span><span class="refpurpose"> — deregister a parallel port device driver </span></dt><dt><span class="refentrytitle"><a href="re286.html"><span>parport_get_port</span></a></span><span class="refpurpose"> — increment a port's reference count </span></dt><dt><span class="refentrytitle"><a href="re287.html"><span>parport_put_port</span></a></span><span class="refpurpose"> — decrement a port's reference count </span></dt><dt><span class="refentrytitle"><a href="re288.html"><span>parport_register_port</span></a></span><span class="refpurpose"> — register a parallel port </span></dt><dt><span class="refentrytitle"><a href="re289.html"><span>parport_announce_port</span></a></span><span class="refpurpose"> — tell device drivers about a parallel port </span></dt><dt><span class="refentrytitle"><a href="re290.html"><span>parport_remove_port</span></a></span><span class="refpurpose"> — deregister a parallel port </span></dt><dt><span class="refentrytitle"><a href="re291.html"><span>parport_register_device</span></a></span><span class="refpurpose"> — register a device on a parallel port </span></dt><dt><span class="refentrytitle"><a href="re292.html"><span>parport_unregister_device</span></a></span><span class="refpurpose"> — deregister a device on a parallel port </span></dt><dt><span class="refentrytitle"><a href="re293.html"><span>parport_find_number</span></a></span><span class="refpurpose"> — find a parallel port by number </span></dt><dt><span class="refentrytitle"><a href="re294.html"><span>parport_find_base</span></a></span><span class="refpurpose"> — find a parallel port by base address </span></dt><dt><span class="refentrytitle"><a href="re295.html"><span>parport_claim</span></a></span><span class="refpurpose"> — claim access to a parallel port device </span></dt><dt><span class="refentrytitle"><a href="re296.html"><span>parport_claim_or_block</span></a></span><span class="refpurpose"> — claim access to a parallel port device </span></dt><dt><span class="refentrytitle"><a href="re297.html"><span>parport_release</span></a></span><span class="refpurpose"> — give up access to a parallel port device </span></dt><dt><span class="refentrytitle"><a href="re298.html"><span>parport_open</span></a></span><span class="refpurpose"> — find a device by canonical device number </span></dt><dt><span class="refentrytitle"><a href="re299.html"><span>parport_close</span></a></span><span class="refpurpose"> — close a device opened with <code class="function">parport_open</code> </span></dt></dl></dd><dt><span class="chapter"><a href="ch04.html">4. Message-based devices</a></span></dt><dd><dl><dt><span class="sect1"><a href="ch04.html#id2637965">Fusion message devices</a></span></dt><dt><span class="sect1"><a href="ch04s02.html">I2O message devices</a></span></dt></dl></dd><dt><span class="chapter"><a href="ch05.html">5. Sound Devices</a></span></dt><dd><dl><dt><span class="refentrytitle"><a href="re553.html"><span>snd_register_device</span></a></span><span class="refpurpose"> — Register the ALSA device file for the card </span></dt><dt><span class="refentrytitle"><a href="re554.html"><span>snd_printk</span></a></span><span class="refpurpose"> — printk wrapper </span></dt><dt><span class="refentrytitle"><a href="re555.html"><span>snd_printd</span></a></span><span class="refpurpose"> — debug printk </span></dt><dt><span class="refentrytitle"><a href="re556.html"><span>snd_BUG</span></a></span><span class="refpurpose"> — give a BUG warning message and stack trace </span></dt><dt><span class="refentrytitle"><a href="re557.html"><span>snd_BUG_ON</span></a></span><span class="refpurpose"> — debugging check macro </span></dt><dt><span class="refentrytitle"><a href="re558.html"><span>snd_printdd</span></a></span><span class="refpurpose"> — debug printk </span></dt><dt><span class="refentrytitle"><a href="re559.html"><span>register_sound_special_device</span></a></span><span class="refpurpose"> — register a special sound node </span></dt><dt><span class="refentrytitle"><a href="re560.html"><span>register_sound_mixer</span></a></span><span class="refpurpose"> — register a mixer device </span></dt><dt><span class="refentrytitle"><a href="re561.html"><span>register_sound_midi</span></a></span><span class="refpurpose"> — register a midi device </span></dt><dt><span class="refentrytitle"><a href="re562.html"><span>register_sound_dsp</span></a></span><span class="refpurpose"> — register a DSP device </span></dt><dt><span class="refentrytitle"><a href="re563.html"><span>unregister_sound_special</span></a></span><span class="refpurpose"> — unregister a special sound device </span></dt><dt><span class="refentrytitle"><a href="re564.html"><span>unregister_sound_mixer</span></a></span><span class="refpurpose"> — unregister a mixer </span></dt><dt><span class="refentrytitle"><a href="re565.html"><span>unregister_sound_midi</span></a></span><span class="refpurpose"> — unregister a midi device </span></dt><dt><span class="refentrytitle"><a href="re566.html"><span>unregister_sound_dsp</span></a></span><span class="refpurpose"> — unregister a DSP device </span></dt><dt><span class="refentrytitle"><a href="re567.html"><span>snd_pcm_playback_ready</span></a></span><span class="refpurpose"> — check whether the playback buffer is available </span></dt><dt><span class="refentrytitle"><a href="re568.html"><span>snd_pcm_capture_ready</span></a></span><span class="refpurpose"> — check whether the capture buffer is available </span></dt><dt><span class="refentrytitle"><a href="re569.html"><span>snd_pcm_playback_data</span></a></span><span class="refpurpose"> — check whether any data exists on the playback buffer </span></dt><dt><span class="refentrytitle"><a href="re570.html"><span>snd_pcm_playback_empty</span></a></span><span class="refpurpose"> — check whether the playback buffer is empty </span></dt><dt><span class="refentrytitle"><a href="re571.html"><span>snd_pcm_capture_empty</span></a></span><span class="refpurpose"> — check whether the capture buffer is empty </span></dt><dt><span class="refentrytitle"><a href="re572.html"><span>snd_pcm_format_cpu_endian</span></a></span><span class="refpurpose"> — Check the PCM format is CPU-endian </span></dt><dt><span class="refentrytitle"><a href="re573.html"><span>snd_pcm_new_stream</span></a></span><span class="refpurpose"> — create a new PCM stream </span></dt><dt><span class="refentrytitle"><a href="re574.html"><span>snd_pcm_new</span></a></span><span class="refpurpose"> — create a new PCM instance </span></dt><dt><span class="refentrytitle"><a href="re575.html"><span>snd_device_new</span></a></span><span class="refpurpose"> — create an ALSA device component </span></dt><dt><span class="refentrytitle"><a href="re576.html"><span>snd_device_free</span></a></span><span class="refpurpose"> — release the device from the card </span></dt><dt><span class="refentrytitle"><a href="re577.html"><span>snd_device_register</span></a></span><span class="refpurpose"> — register the device </span></dt><dt><span class="refentrytitle"><a href="re578.html"><span>snd_iprintf</span></a></span><span class="refpurpose"> — printf on the procfs buffer </span></dt><dt><span class="refentrytitle"><a href="re579.html"><span>snd_info_get_line</span></a></span><span class="refpurpose"> — read one line from the procfs buffer </span></dt><dt><span class="refentrytitle"><a href="re580.html"><span>snd_info_get_str</span></a></span><span class="refpurpose"> — parse a string token </span></dt><dt><span class="refentrytitle"><a href="re581.html"><span>snd_info_create_module_entry</span></a></span><span class="refpurpose"> — create an info entry for the given module </span></dt><dt><span class="refentrytitle"><a href="re582.html"><span>snd_info_create_card_entry</span></a></span><span class="refpurpose"> — create an info entry for the given card </span></dt><dt><span class="refentrytitle"><a href="re583.html"><span>snd_card_proc_new</span></a></span><span class="refpurpose"> — create an info entry for the given card </span></dt><dt><span class="refentrytitle"><a href="re584.html"><span>snd_info_free_entry</span></a></span><span class="refpurpose"> — release the info entry </span></dt><dt><span class="refentrytitle"><a href="re585.html"><span>snd_info_register</span></a></span><span class="refpurpose"> — register the info entry </span></dt><dt><span class="refentrytitle"><a href="re586.html"><span>snd_rawmidi_receive</span></a></span><span class="refpurpose"> — receive the input data from the device </span></dt><dt><span class="refentrytitle"><a href="re587.html"><span>snd_rawmidi_transmit_empty</span></a></span><span class="refpurpose"> — check whether the output buffer is empty </span></dt><dt><span class="refentrytitle"><a href="re588.html"><span>snd_rawmidi_transmit_peek</span></a></span><span class="refpurpose"> — copy data from the internal buffer </span></dt><dt><span class="refentrytitle"><a href="re589.html"><span>snd_rawmidi_transmit_ack</span></a></span><span class="refpurpose"> — acknowledge the transmission </span></dt><dt><span class="refentrytitle"><a href="re590.html"><span>snd_rawmidi_transmit</span></a></span><span class="refpurpose"> — copy from the buffer to the device </span></dt><dt><span class="refentrytitle"><a href="re591.html"><span>snd_rawmidi_new</span></a></span><span class="refpurpose"> — create a rawmidi instance </span></dt><dt><span class="refentrytitle"><a href="re592.html"><span>snd_rawmidi_set_ops</span></a></span><span class="refpurpose"> — set the rawmidi operators </span></dt><dt><span class="refentrytitle"><a href="re593.html"><span>snd_request_card</span></a></span><span class="refpurpose"> — try to load the card module </span></dt><dt><span class="refentrytitle"><a href="re594.html"><span>snd_lookup_minor_data</span></a></span><span class="refpurpose"> — get user data of a registered device </span></dt><dt><span class="refentrytitle"><a href="re595.html"><span>snd_register_device_for_dev</span></a></span><span class="refpurpose"> — Register the ALSA device file for the card </span></dt><dt><span class="refentrytitle"><a href="re596.html"><span>snd_unregister_device</span></a></span><span class="refpurpose"> — unregister the device on the given card </span></dt><dt><span class="refentrytitle"><a href="re597.html"><span>copy_to_user_fromio</span></a></span><span class="refpurpose"> — copy data from mmio-space to user-space </span></dt><dt><span class="refentrytitle"><a href="re598.html"><span>copy_from_user_toio</span></a></span><span class="refpurpose"> — copy data from user-space to mmio-space </span></dt><dt><span class="refentrytitle"><a href="re599.html"><span>snd_pcm_lib_preallocate_free_for_all</span></a></span><span class="refpurpose"> — release all pre-allocated buffers on the pcm </span></dt><dt><span class="refentrytitle"><a href="re600.html"><span>snd_pcm_lib_preallocate_pages</span></a></span><span class="refpurpose"> — pre-allocation for the given DMA type </span></dt><dt><span class="refentrytitle"><a href="re601.html"><span>snd_pcm_lib_preallocate_pages_for_all</span></a></span><span class="refpurpose"> — pre-allocation for continous memory type (all substreams) </span></dt><dt><span class="refentrytitle"><a href="re602.html"><span>snd_pcm_sgbuf_ops_page</span></a></span><span class="refpurpose"> — get the page struct at the given offset </span></dt><dt><span class="refentrytitle"><a href="re603.html"><span>snd_pcm_lib_malloc_pages</span></a></span><span class="refpurpose"> — allocate the DMA buffer </span></dt><dt><span class="refentrytitle"><a href="re604.html"><span>snd_pcm_lib_free_pages</span></a></span><span class="refpurpose"> — release the allocated DMA buffer. </span></dt><dt><span class="refentrytitle"><a href="re605.html"><span>snd_card_create</span></a></span><span class="refpurpose"> — create and initialize a soundcard structure </span></dt><dt><span class="refentrytitle"><a href="re606.html"><span>snd_card_disconnect</span></a></span><span class="refpurpose"> — disconnect all APIs from the file-operations (user space) </span></dt><dt><span class="refentrytitle"><a href="re607.html"><span>snd_card_set_id</span></a></span><span class="refpurpose"> — set card identification name </span></dt><dt><span class="refentrytitle"><a href="re608.html"><span>snd_card_register</span></a></span><span class="refpurpose"> — register the soundcard </span></dt><dt><span class="refentrytitle"><a href="re609.html"><span>snd_component_add</span></a></span><span class="refpurpose"> — add a component string </span></dt><dt><span class="refentrytitle"><a href="re610.html"><span>snd_card_file_add</span></a></span><span class="refpurpose"> — add the file to the file list of the card </span></dt><dt><span class="refentrytitle"><a href="re611.html"><span>snd_card_file_remove</span></a></span><span class="refpurpose"> — remove the file from the file list </span></dt><dt><span class="refentrytitle"><a href="re612.html"><span>snd_power_wait</span></a></span><span class="refpurpose"> — wait until the power-state is changed. </span></dt><dt><span class="refentrytitle"><a href="re613.html"><span>snd_dma_program</span></a></span><span class="refpurpose"> — program an ISA DMA transfer </span></dt><dt><span class="refentrytitle"><a href="re614.html"><span>snd_dma_disable</span></a></span><span class="refpurpose"> — stop the ISA DMA transfer </span></dt><dt><span class="refentrytitle"><a href="re615.html"><span>snd_dma_pointer</span></a></span><span class="refpurpose"> — return the current pointer to DMA transfer buffer in bytes </span></dt><dt><span class="refentrytitle"><a href="re616.html"><span>snd_ctl_new1</span></a></span><span class="refpurpose"> — create a control instance from the template </span></dt><dt><span class="refentrytitle"><a href="re617.html"><span>snd_ctl_free_one</span></a></span><span class="refpurpose"> — release the control instance </span></dt><dt><span class="refentrytitle"><a href="re618.html"><span>snd_ctl_add</span></a></span><span class="refpurpose"> — add the control instance to the card </span></dt><dt><span class="refentrytitle"><a href="re619.html"><span>snd_ctl_remove</span></a></span><span class="refpurpose"> — remove the control from the card and release it </span></dt><dt><span class="refentrytitle"><a href="re620.html"><span>snd_ctl_remove_id</span></a></span><span class="refpurpose"> — remove the control of the given id and release it </span></dt><dt><span class="refentrytitle"><a href="re621.html"><span>snd_ctl_rename_id</span></a></span><span class="refpurpose"> — replace the id of a control on the card </span></dt><dt><span class="refentrytitle"><a href="re622.html"><span>snd_ctl_find_numid</span></a></span><span class="refpurpose"> — find the control instance with the given number-id </span></dt><dt><span class="refentrytitle"><a href="re623.html"><span>snd_ctl_find_id</span></a></span><span class="refpurpose"> — find the control instance with the given id </span></dt><dt><span class="refentrytitle"><a href="re624.html"><span>snd_pcm_set_ops</span></a></span><span class="refpurpose"> — set the PCM operators </span></dt><dt><span class="refentrytitle"><a href="re625.html"><span>snd_pcm_set_sync</span></a></span><span class="refpurpose"> — set the PCM sync id </span></dt><dt><span class="refentrytitle"><a href="re626.html"><span>snd_interval_refine</span></a></span><span class="refpurpose"> — refine the interval value of configurator </span></dt><dt><span class="refentrytitle"><a href="re627.html"><span>snd_interval_ratnum</span></a></span><span class="refpurpose"> — refine the interval value </span></dt><dt><span class="refentrytitle"><a href="re628.html"><span>snd_interval_list</span></a></span><span class="refpurpose"> — refine the interval value from the list </span></dt><dt><span class="refentrytitle"><a href="re629.html"><span>snd_pcm_hw_rule_add</span></a></span><span class="refpurpose"> — add the hw-constraint rule </span></dt><dt><span class="refentrytitle"><a href="re630.html"><span>snd_pcm_hw_constraint_integer</span></a></span><span class="refpurpose"> — apply an integer constraint to an interval </span></dt><dt><span class="refentrytitle"><a href="re631.html"><span>snd_pcm_hw_constraint_minmax</span></a></span><span class="refpurpose"> — apply a min/max range constraint to an interval </span></dt><dt><span class="refentrytitle"><a href="re632.html"><span>snd_pcm_hw_constraint_list</span></a></span><span class="refpurpose"> — apply a list of constraints to a parameter </span></dt><dt><span class="refentrytitle"><a href="re633.html"><span>snd_pcm_hw_constraint_ratnums</span></a></span><span class="refpurpose"> — apply ratnums constraint to a parameter </span></dt><dt><span class="refentrytitle"><a href="re634.html"><span>snd_pcm_hw_constraint_ratdens</span></a></span><span class="refpurpose"> — apply ratdens constraint to a parameter </span></dt><dt><span class="refentrytitle"><a href="re635.html"><span>snd_pcm_hw_constraint_msbits</span></a></span><span class="refpurpose"> — add a hw constraint msbits rule </span></dt><dt><span class="refentrytitle"><a href="re636.html"><span>snd_pcm_hw_constraint_step</span></a></span><span class="refpurpose"> — add a hw constraint step rule </span></dt><dt><span class="refentrytitle"><a href="re637.html"><span>snd_pcm_hw_constraint_pow2</span></a></span><span class="refpurpose"> — add a hw constraint power-of-2 rule </span></dt><dt><span class="refentrytitle"><a href="re638.html"><span>snd_pcm_hw_param_value</span></a></span><span class="refpurpose"> — return <em class="parameter"><code>params</code></em> field <em class="parameter"><code>var</code></em> value </span></dt><dt><span class="refentrytitle"><a href="re639.html"><span>snd_pcm_hw_param_first</span></a></span><span class="refpurpose"> — refine config space and return minimum value </span></dt><dt><span class="refentrytitle"><a href="re640.html"><span>snd_pcm_hw_param_last</span></a></span><span class="refpurpose"> — refine config space and return maximum value </span></dt><dt><span class="refentrytitle"><a href="re641.html"><span>snd_pcm_lib_ioctl</span></a></span><span class="refpurpose"> — a generic PCM ioctl callback </span></dt><dt><span class="refentrytitle"><a href="re642.html"><span>snd_pcm_period_elapsed</span></a></span><span class="refpurpose"> — update the pcm status for the next period </span></dt><dt><span class="refentrytitle"><a href="re643.html"><span>snd_hwdep_new</span></a></span><span class="refpurpose"> — create a new hwdep instance </span></dt><dt><span class="refentrytitle"><a href="re644.html"><span>snd_pcm_stop</span></a></span><span class="refpurpose"> — try to stop all running streams in the substream group </span></dt><dt><span class="refentrytitle"><a href="re645.html"><span>snd_pcm_suspend</span></a></span><span class="refpurpose"> — trigger SUSPEND to all linked streams </span></dt><dt><span class="refentrytitle"><a href="re646.html"><span>snd_pcm_suspend_all</span></a></span><span class="refpurpose"> — trigger SUSPEND to all substreams in the given pcm </span></dt><dt><span class="refentrytitle"><a href="re647.html"><span>snd_malloc_pages</span></a></span><span class="refpurpose"> — allocate pages with the given size </span></dt><dt><span class="refentrytitle"><a href="re648.html"><span>snd_free_pages</span></a></span><span class="refpurpose"> — release the pages </span></dt><dt><span class="refentrytitle"><a href="re649.html"><span>snd_dma_alloc_pages</span></a></span><span class="refpurpose"> — allocate the buffer area according to the given type </span></dt><dt><span class="refentrytitle"><a href="re650.html"><span>snd_dma_alloc_pages_fallback</span></a></span><span class="refpurpose"> — allocate the buffer area according to the given type with fallback </span></dt><dt><span class="refentrytitle"><a href="re651.html"><span>snd_dma_free_pages</span></a></span><span class="refpurpose"> — release the allocated buffer </span></dt><dt><span class="refentrytitle"><a href="re652.html"><span>snd_dma_get_reserved_buf</span></a></span><span class="refpurpose"> — get the reserved buffer for the given device </span></dt><dt><span class="refentrytitle"><a href="re653.html"><span>snd_dma_reserve_buf</span></a></span><span class="refpurpose"> — reserve the buffer </span></dt></dl></dd><dt><span class="chapter"><a href="ch06.html">6. 16x50 UART Driver</a></span></dt><dd><dl><dt><span class="refentrytitle"><a href="re654.html"><span>uart_handle_dcd_change</span></a></span><span class="refpurpose"> — handle a change of carrier detect state </span></dt><dt><span class="refentrytitle"><a href="re655.html"><span>uart_handle_flow_control_change</span></a></span><span class="refpurpose"> — handle a change of CTS or DSR </span></dt><dt><span class="refentrytitle"><a href="re656.html"><span>uart_update_timeout</span></a></span><span class="refpurpose"> — update per-port FIFO timeout. </span></dt><dt><span class="refentrytitle"><a href="re657.html"><span>uart_get_baud_rate</span></a></span><span class="refpurpose"> — return baud rate for a particular port </span></dt><dt><span class="refentrytitle"><a href="re658.html"><span>uart_get_divisor</span></a></span><span class="refpurpose"> — return uart clock divisor </span></dt><dt><span class="refentrytitle"><a href="re659.html"><span>uart_parse_options</span></a></span><span class="refpurpose"> — Parse serial port baud/parity/bits/flow contro. </span></dt><dt><span class="refentrytitle"><a href="re660.html"><span>uart_set_options</span></a></span><span class="refpurpose"> — setup the serial console parameters </span></dt><dt><span class="refentrytitle"><a href="re661.html"><span>uart_register_driver</span></a></span><span class="refpurpose"> — register a driver with the uart core layer </span></dt><dt><span class="refentrytitle"><a href="re662.html"><span>uart_unregister_driver</span></a></span><span class="refpurpose"> — remove a driver from the uart core layer </span></dt><dt><span class="refentrytitle"><a href="re663.html"><span>uart_add_one_port</span></a></span><span class="refpurpose"> — attach a driver-defined port structure </span></dt><dt><span class="refentrytitle"><a href="re664.html"><span>uart_remove_one_port</span></a></span><span class="refpurpose"> — detach a driver defined port structure </span></dt><dt><span class="refentrytitle"><a href="re665.html"><span>serial8250_suspend_port</span></a></span><span class="refpurpose"> — suspend one serial port </span></dt><dt><span class="refentrytitle"><a href="re666.html"><span>serial8250_resume_port</span></a></span><span class="refpurpose"> — resume one serial port </span></dt><dt><span class="refentrytitle"><a href="re667.html"><span>serial8250_register_port</span></a></span><span class="refpurpose"> — register a serial port </span></dt><dt><span class="refentrytitle"><a href="re668.html"><span>serial8250_unregister_port</span></a></span><span class="refpurpose"> — remove a 16x50 serial port at runtime </span></dt></dl></dd><dt><span class="chapter"><a href="ch07.html">7. Frame Buffer Library</a></span></dt><dd><dl><dt><span class="sect1"><a href="ch07.html#id2692985">Frame Buffer Memory</a></span></dt><dt><span class="sect1"><a href="ch07s02.html">Frame Buffer Colormap</a></span></dt><dt><span class="sect1"><a href="ch07s03.html">Frame Buffer Video Mode Database</a></span></dt><dt><span class="sect1"><a href="ch07s04.html">Frame Buffer Macintosh Video Mode Database</a></span></dt><dt><span class="sect1"><a href="ch07s05.html">Frame Buffer Fonts</a></span></dt></dl></dd><dt><span class="chapter"><a href="ch08.html">8. Input Subsystem</a></span></dt><dd><dl><dt><span class="refentrytitle"><a href="re694.html"><span>struct ff_replay</span></a></span><span class="refpurpose"> — defines scheduling of the force-feedback effect </span></dt><dt><span class="refentrytitle"><a href="re695.html"><span>struct ff_trigger</span></a></span><span class="refpurpose"> — defines what triggers the force-feedback effect </span></dt><dt><span class="refentrytitle"><a href="re696.html"><span>struct ff_envelope</span></a></span><span class="refpurpose"> — generic force-feedback effect envelope </span></dt><dt><span class="refentrytitle"><a href="re697.html"><span>struct ff_constant_effect</span></a></span><span class="refpurpose"> — defines parameters of a constant force-feedback effect </span></dt><dt><span class="refentrytitle"><a href="re698.html"><span>struct ff_ramp_effect</span></a></span><span class="refpurpose"> — defines parameters of a ramp force-feedback effect </span></dt><dt><span class="refentrytitle"><a href="re699.html"><span>struct ff_condition_effect</span></a></span><span class="refpurpose"> — defines a spring or friction force-feedback effect </span></dt><dt><span class="refentrytitle"><a href="re700.html"><span>struct ff_periodic_effect</span></a></span><span class="refpurpose"> — defines parameters of a periodic force-feedback effect </span></dt><dt><span class="refentrytitle"><a href="re701.html"><span>struct ff_rumble_effect</span></a></span><span class="refpurpose"> — defines parameters of a periodic force-feedback effect </span></dt><dt><span class="refentrytitle"><a href="re702.html"><span>struct ff_effect</span></a></span><span class="refpurpose"> — defines force feedback effect </span></dt><dt><span class="refentrytitle"><a href="re703.html"><span>struct input_dev</span></a></span><span class="refpurpose"> — represents an input device </span></dt><dt><span class="refentrytitle"><a href="re704.html"><span>struct input_handler</span></a></span><span class="refpurpose"> — implements one of interfaces for input devices </span></dt><dt><span class="refentrytitle"><a href="re705.html"><span>struct input_handle</span></a></span><span class="refpurpose"> — links input device with an input handler </span></dt><dt><span class="refentrytitle"><a href="re706.html"><span>struct ff_device</span></a></span><span class="refpurpose"> — force-feedback part of an input device </span></dt><dt><span class="refentrytitle"><a href="re707.html"><span>input_event</span></a></span><span class="refpurpose"> — report new input event </span></dt><dt><span class="refentrytitle"><a href="re708.html"><span>input_inject_event</span></a></span><span class="refpurpose"> — send input event from input handler </span></dt><dt><span class="refentrytitle"><a href="re709.html"><span>input_grab_device</span></a></span><span class="refpurpose"> — grabs device for exclusive use </span></dt><dt><span class="refentrytitle"><a href="re710.html"><span>input_release_device</span></a></span><span class="refpurpose"> — release previously grabbed device </span></dt><dt><span class="refentrytitle"><a href="re711.html"><span>input_open_device</span></a></span><span class="refpurpose"> — open input device </span></dt><dt><span class="refentrytitle"><a href="re712.html"><span>input_close_device</span></a></span><span class="refpurpose"> — close input device </span></dt><dt><span class="refentrytitle"><a href="re713.html"><span>input_get_keycode</span></a></span><span class="refpurpose"> — retrieve keycode currently mapped to a given scancode </span></dt><dt><span class="refentrytitle"><a href="re714.html"><span>input_set_keycode</span></a></span><span class="refpurpose"> — assign new keycode to a given scancode </span></dt><dt><span class="refentrytitle"><a href="re715.html"><span>input_allocate_device</span></a></span><span class="refpurpose"> — allocate memory for new input device </span></dt><dt><span class="refentrytitle"><a href="re716.html"><span>input_free_device</span></a></span><span class="refpurpose"> — free memory occupied by input_dev structure </span></dt><dt><span class="refentrytitle"><a href="re717.html"><span>input_set_capability</span></a></span><span class="refpurpose"> — mark device as capable of a certain event </span></dt><dt><span class="refentrytitle"><a href="re718.html"><span>input_register_device</span></a></span><span class="refpurpose"> — register device with input core </span></dt><dt><span class="refentrytitle"><a href="re719.html"><span>input_unregister_device</span></a></span><span class="refpurpose"> — unregister previously registered device </span></dt><dt><span class="refentrytitle"><a href="re720.html"><span>input_register_handler</span></a></span><span class="refpurpose"> — register a new input handler </span></dt><dt><span class="refentrytitle"><a href="re721.html"><span>input_unregister_handler</span></a></span><span class="refpurpose"> — unregisters an input handler </span></dt><dt><span class="refentrytitle"><a href="re722.html"><span>input_register_handle</span></a></span><span class="refpurpose"> — register a new input handle </span></dt><dt><span class="refentrytitle"><a href="re723.html"><span>input_unregister_handle</span></a></span><span class="refpurpose"> — unregister an input handle </span></dt><dt><span class="refentrytitle"><a href="re724.html"><span>input_ff_upload</span></a></span><span class="refpurpose"> — upload effect into force-feedback device </span></dt><dt><span class="refentrytitle"><a href="re725.html"><span>input_ff_erase</span></a></span><span class="refpurpose"> — erase a force-feedback effect from device </span></dt><dt><span class="refentrytitle"><a href="re726.html"><span>input_ff_event</span></a></span><span class="refpurpose"> — generic handler for force-feedback events </span></dt><dt><span class="refentrytitle"><a href="re727.html"><span>input_ff_create</span></a></span><span class="refpurpose"> — create force-feedback device </span></dt><dt><span class="refentrytitle"><a href="re728.html"><span>input_ff_destroy</span></a></span><span class="refpurpose"> — frees force feedback portion of input device </span></dt><dt><span class="refentrytitle"><a href="re729.html"><span>input_ff_create_memless</span></a></span><span class="refpurpose"> — create memoryless force-feedback device </span></dt></dl></dd><dt><span class="chapter"><a href="ch09.html">9. Serial Peripheral Interface (SPI)</a></span></dt><dd><dl><dt><span class="refentrytitle"><a href="re730.html"><span>struct spi_device</span></a></span><span class="refpurpose"> — Master side proxy for an SPI slave device </span></dt><dt><span class="refentrytitle"><a href="re731.html"><span>struct spi_driver</span></a></span><span class="refpurpose"> — Host side <span class="quote">“<span class="quote">protocol</span>”</span> driver </span></dt><dt><span class="refentrytitle"><a href="re732.html"><span>spi_unregister_driver</span></a></span><span class="refpurpose"> — reverse effect of spi_register_driver </span></dt><dt><span class="refentrytitle"><a href="re733.html"><span>struct spi_master</span></a></span><span class="refpurpose"> — interface to SPI master controller </span></dt><dt><span class="refentrytitle"><a href="re734.html"><span>struct spi_transfer</span></a></span><span class="refpurpose"> — a read/write buffer pair </span></dt><dt><span class="refentrytitle"><a href="re735.html"><span>struct spi_message</span></a></span><span class="refpurpose"> — one multi-segment SPI transaction </span></dt><dt><span class="refentrytitle"><a href="re736.html"><span>spi_write</span></a></span><span class="refpurpose"> — SPI synchronous write </span></dt><dt><span class="refentrytitle"><a href="re737.html"><span>spi_read</span></a></span><span class="refpurpose"> — SPI synchronous read </span></dt><dt><span class="refentrytitle"><a href="re738.html"><span>spi_w8r8</span></a></span><span class="refpurpose"> — SPI synchronous 8 bit write followed by 8 bit read </span></dt><dt><span class="refentrytitle"><a href="re739.html"><span>spi_w8r16</span></a></span><span class="refpurpose"> — SPI synchronous 8 bit write followed by 16 bit read </span></dt><dt><span class="refentrytitle"><a href="re740.html"><span>struct spi_board_info</span></a></span><span class="refpurpose"> — board-specific template for a SPI device </span></dt><dt><span class="refentrytitle"><a href="re741.html"><span>spi_register_board_info</span></a></span><span class="refpurpose"> — register SPI devices for a given board </span></dt><dt><span class="refentrytitle"><a href="re742.html"><span>spi_register_driver</span></a></span><span class="refpurpose"> — register a SPI driver </span></dt><dt><span class="refentrytitle"><a href="re743.html"><span>spi_alloc_device</span></a></span><span class="refpurpose"> — Allocate a new SPI device </span></dt><dt><span class="refentrytitle"><a href="re744.html"><span>spi_add_device</span></a></span><span class="refpurpose"> — Add spi_device allocated with spi_alloc_device </span></dt><dt><span class="refentrytitle"><a href="re745.html"><span>spi_new_device</span></a></span><span class="refpurpose"> — instantiate one new SPI device </span></dt><dt><span class="refentrytitle"><a href="re746.html"><span>spi_alloc_master</span></a></span><span class="refpurpose"> — allocate SPI master controller </span></dt><dt><span class="refentrytitle"><a href="re747.html"><span>spi_register_master</span></a></span><span class="refpurpose"> — register SPI master controller </span></dt><dt><span class="refentrytitle"><a href="re748.html"><span>spi_unregister_master</span></a></span><span class="refpurpose"> — unregister SPI master controller </span></dt><dt><span class="refentrytitle"><a href="re749.html"><span>spi_busnum_to_master</span></a></span><span class="refpurpose"> — look up master associated with bus_num </span></dt><dt><span class="refentrytitle"><a href="re750.html"><span>spi_setup</span></a></span><span class="refpurpose"> — setup SPI mode and clock rate </span></dt><dt><span class="refentrytitle"><a href="re751.html"><span>spi_async</span></a></span><span class="refpurpose"> — asynchronous SPI transfer </span></dt><dt><span class="refentrytitle"><a href="re752.html"><span>spi_sync</span></a></span><span class="refpurpose"> — blocking/synchronous SPI data transfers </span></dt><dt><span class="refentrytitle"><a href="re753.html"><span>spi_write_then_read</span></a></span><span class="refpurpose"> — SPI synchronous write followed by read </span></dt></dl></dd><dt><span class="chapter"><a href="ch10.html">10. I<sup>2</sup>C and SMBus Subsystem</a></span></dt><dd><dl><dt><span class="refentrytitle"><a href="re754.html"><span>struct i2c_driver</span></a></span><span class="refpurpose"> — represent an I2C device driver </span></dt><dt><span class="refentrytitle"><a href="re755.html"><span>struct i2c_client</span></a></span><span class="refpurpose"> — represent an I2C slave device </span></dt><dt><span class="refentrytitle"><a href="re756.html"><span>struct i2c_board_info</span></a></span><span class="refpurpose"> — template for device creation </span></dt><dt><span class="refentrytitle"><a href="re757.html"><span>I2C_BOARD_INFO</span></a></span><span class="refpurpose"> — macro used to list an i2c device and its address </span></dt><dt><span class="refentrytitle"><a href="re758.html"><span>i2c_lock_adapter</span></a></span><span class="refpurpose"> — Prevent access to an I2C bus segment </span></dt><dt><span class="refentrytitle"><a href="re759.html"><span>i2c_unlock_adapter</span></a></span><span class="refpurpose"> — Reauthorize access to an I2C bus segment </span></dt><dt><span class="refentrytitle"><a href="re760.html"><span>struct i2c_msg</span></a></span><span class="refpurpose"> — an I2C transaction segment beginning with START </span></dt><dt><span class="refentrytitle"><a href="re761.html"><span>i2c_register_board_info</span></a></span><span class="refpurpose"> — statically declare I2C devices </span></dt><dt><span class="refentrytitle"><a href="re762.html"><span>i2c_verify_client</span></a></span><span class="refpurpose"> — return parameter as i2c_client, or NULL </span></dt><dt><span class="refentrytitle"><a href="re763.html"><span>i2c_new_device</span></a></span><span class="refpurpose"> — instantiate an i2c device </span></dt><dt><span class="refentrytitle"><a href="re764.html"><span>i2c_unregister_device</span></a></span><span class="refpurpose"> — reverse effect of <code class="function">i2c_new_device</code> </span></dt><dt><span class="refentrytitle"><a href="re765.html"><span>i2c_new_dummy</span></a></span><span class="refpurpose"> — return a new i2c device bound to a dummy driver </span></dt><dt><span class="refentrytitle"><a href="re766.html"><span>i2c_add_adapter</span></a></span><span class="refpurpose"> — declare i2c adapter, use dynamic bus number </span></dt><dt><span class="refentrytitle"><a href="re767.html"><span>i2c_add_numbered_adapter</span></a></span><span class="refpurpose"> — declare i2c adapter, use static bus number </span></dt><dt><span class="refentrytitle"><a href="re768.html"><span>i2c_del_adapter</span></a></span><span class="refpurpose"> — unregister I2C adapter </span></dt><dt><span class="refentrytitle"><a href="re769.html"><span>i2c_del_driver</span></a></span><span class="refpurpose"> — unregister I2C driver </span></dt><dt><span class="refentrytitle"><a href="re770.html"><span>i2c_use_client</span></a></span><span class="refpurpose"> — increments the reference count of the i2c client structure </span></dt><dt><span class="refentrytitle"><a href="re771.html"><span>i2c_release_client</span></a></span><span class="refpurpose"> — release a use of the i2c client structure </span></dt><dt><span class="refentrytitle"><a href="re772.html"><span>i2c_transfer</span></a></span><span class="refpurpose"> — execute a single or combined I2C message </span></dt><dt><span class="refentrytitle"><a href="re773.html"><span>i2c_master_send</span></a></span><span class="refpurpose"> — issue a single I2C message in master transmit mode </span></dt><dt><span class="refentrytitle"><a href="re774.html"><span>i2c_master_recv</span></a></span><span class="refpurpose"> — issue a single I2C message in master receive mode </span></dt><dt><span class="refentrytitle"><a href="re775.html"><span>i2c_smbus_read_byte</span></a></span><span class="refpurpose"> — SMBus <span class="quote">“<span class="quote">receive byte</span>”</span> protocol </span></dt><dt><span class="refentrytitle"><a href="re776.html"><span>i2c_smbus_write_byte</span></a></span><span class="refpurpose"> — SMBus <span class="quote">“<span class="quote">send byte</span>”</span> protocol </span></dt><dt><span class="refentrytitle"><a href="re777.html"><span>i2c_smbus_read_byte_data</span></a></span><span class="refpurpose"> — SMBus <span class="quote">“<span class="quote">read byte</span>”</span> protocol </span></dt><dt><span class="refentrytitle"><a href="re778.html"><span>i2c_smbus_write_byte_data</span></a></span><span class="refpurpose"> — SMBus <span class="quote">“<span class="quote">write byte</span>”</span> protocol </span></dt><dt><span class="refentrytitle"><a href="re779.html"><span>i2c_smbus_read_word_data</span></a></span><span class="refpurpose"> — SMBus <span class="quote">“<span class="quote">read word</span>”</span> protocol </span></dt><dt><span class="refentrytitle"><a href="re780.html"><span>i2c_smbus_write_word_data</span></a></span><span class="refpurpose"> — SMBus <span class="quote">“<span class="quote">write word</span>”</span> protocol </span></dt><dt><span class="refentrytitle"><a href="re781.html"><span>i2c_smbus_process_call</span></a></span><span class="refpurpose"> — SMBus <span class="quote">“<span class="quote">process call</span>”</span> protocol </span></dt><dt><span class="refentrytitle"><a href="re782.html"><span>i2c_smbus_read_block_data</span></a></span><span class="refpurpose"> — SMBus <span class="quote">“<span class="quote">block read</span>”</span> protocol </span></dt><dt><span class="refentrytitle"><a href="re783.html"><span>i2c_smbus_write_block_data</span></a></span><span class="refpurpose"> — SMBus <span class="quote">“<span class="quote">block write</span>”</span> protocol </span></dt><dt><span class="refentrytitle"><a href="re784.html"><span>i2c_smbus_xfer</span></a></span><span class="refpurpose"> — execute SMBus protocol operations </span></dt></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="ch01.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"> </td><td width="40%" align="right" valign="top"> Chapter 1. Driver Basics</td></tr></table></div></body></html>