<?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>Chapter 2. Device drivers infrastructure</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2" /><link rel="home" href="index.html" title="Linux Device Drivers" /><link rel="up" href="index.html" title="Linux Device Drivers" /><link rel="prev" href="re164.html" title="devm_kfree" /><link rel="next" href="re165.html" title="driver_for_each_device" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 2. Device drivers infrastructure</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="re164.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="re165.html">Next</a></td></tr></table><hr /></div><div class="chapter" title="Chapter 2. Device drivers infrastructure"><div class="titlepage"><div><div><h2 class="title"><a id="devdrivers"></a>Chapter 2. Device drivers infrastructure</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><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></div><div class="sect1" title="Device Drivers Base"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="id2617423"></a>Device Drivers Base</h2></div></div></div><div class="toc"><dl><dt><span class="refentrytitle"><a href="re165.html"><span>driver_for_each_device</span></a></span><span class="refpurpose"> — Iterator for devices bound to a driver. </span></dt><dt><span class="refentrytitle"><a href="re166.html"><span>driver_find_device</span></a></span><span class="refpurpose"> — device iterator for locating a particular device. </span></dt><dt><span class="refentrytitle"><a href="re167.html"><span>driver_create_file</span></a></span><span class="refpurpose"> — create sysfs file for driver. </span></dt><dt><span class="refentrytitle"><a href="re168.html"><span>driver_remove_file</span></a></span><span class="refpurpose"> — remove sysfs file for driver. </span></dt><dt><span class="refentrytitle"><a href="re169.html"><span>driver_add_kobj</span></a></span><span class="refpurpose"> — add a kobject below the specified driver </span></dt><dt><span class="refentrytitle"><a href="re170.html"><span>get_driver</span></a></span><span class="refpurpose"> — increment driver reference count. </span></dt><dt><span class="refentrytitle"><a href="re171.html"><span>put_driver</span></a></span><span class="refpurpose"> — decrement driver's refcount. </span></dt><dt><span class="refentrytitle"><a href="re172.html"><span>driver_register</span></a></span><span class="refpurpose"> — register driver with bus </span></dt><dt><span class="refentrytitle"><a href="re173.html"><span>driver_unregister</span></a></span><span class="refpurpose"> — remove driver from system. </span></dt><dt><span class="refentrytitle"><a href="re174.html"><span>driver_find</span></a></span><span class="refpurpose"> — locate driver on a bus by its name. </span></dt><dt><span class="refentrytitle"><a href="re175.html"><span>dev_driver_string</span></a></span><span class="refpurpose"> — Return a device's driver name, if at all possible </span></dt><dt><span class="refentrytitle"><a href="re176.html"><span>device_create_file</span></a></span><span class="refpurpose"> — create sysfs attribute file for device. </span></dt><dt><span class="refentrytitle"><a href="re177.html"><span>device_remove_file</span></a></span><span class="refpurpose"> — remove sysfs attribute file. </span></dt><dt><span class="refentrytitle"><a href="re178.html"><span>device_create_bin_file</span></a></span><span class="refpurpose"> — create sysfs binary attribute file for device. </span></dt><dt><span class="refentrytitle"><a href="re179.html"><span>device_remove_bin_file</span></a></span><span class="refpurpose"> — remove sysfs binary attribute file </span></dt><dt><span class="refentrytitle"><a href="re180.html"><span>device_schedule_callback_owner</span></a></span><span class="refpurpose"> — helper to schedule a callback for a device </span></dt><dt><span class="refentrytitle"><a href="re181.html"><span>device_initialize</span></a></span><span class="refpurpose"> — init device structure. </span></dt><dt><span class="refentrytitle"><a href="re182.html"><span>dev_set_name</span></a></span><span class="refpurpose"> — set a device name </span></dt><dt><span class="refentrytitle"><a href="re183.html"><span>device_add</span></a></span><span class="refpurpose"> — add device to device hierarchy. </span></dt><dt><span class="refentrytitle"><a href="re184.html"><span>device_register</span></a></span><span class="refpurpose"> — register a device with the system. </span></dt><dt><span class="refentrytitle"><a href="re185.html"><span>get_device</span></a></span><span class="refpurpose"> — increment reference count for device. </span></dt><dt><span class="refentrytitle"><a href="re186.html"><span>put_device</span></a></span><span class="refpurpose"> — decrement reference count. </span></dt><dt><span class="refentrytitle"><a href="re187.html"><span>device_del</span></a></span><span class="refpurpose"> — delete device from system. </span></dt><dt><span class="refentrytitle"><a href="re188.html"><span>device_unregister</span></a></span><span class="refpurpose"> — unregister device from system. </span></dt><dt><span class="refentrytitle"><a href="re189.html"><span>device_for_each_child</span></a></span><span class="refpurpose"> — device child iterator. </span></dt><dt><span class="refentrytitle"><a href="re190.html"><span>device_find_child</span></a></span><span class="refpurpose"> — device iterator for locating a particular device. </span></dt><dt><span class="refentrytitle"><a href="re191.html"><span>__root_device_register</span></a></span><span class="refpurpose"> — allocate and register a root device </span></dt><dt><span class="refentrytitle"><a href="re192.html"><span>root_device_unregister</span></a></span><span class="refpurpose"> — unregister and free a root device </span></dt><dt><span class="refentrytitle"><a href="re193.html"><span>device_create_vargs</span></a></span><span class="refpurpose"> — creates a device and registers it with sysfs </span></dt><dt><span class="refentrytitle"><a href="re194.html"><span>device_create</span></a></span><span class="refpurpose"> — creates a device and registers it with sysfs </span></dt><dt><span class="refentrytitle"><a href="re195.html"><span>device_destroy</span></a></span><span class="refpurpose"> — removes a device that was created with <code class="function">device_create</code> </span></dt><dt><span class="refentrytitle"><a href="re196.html"><span>device_rename</span></a></span><span class="refpurpose"> — renames a device </span></dt><dt><span class="refentrytitle"><a href="re197.html"><span>device_move</span></a></span><span class="refpurpose"> — moves a device to a new parent </span></dt><dt><span class="refentrytitle"><a href="re198.html"><span>__class_create</span></a></span><span class="refpurpose"> — create a struct class structure </span></dt><dt><span class="refentrytitle"><a href="re199.html"><span>class_destroy</span></a></span><span class="refpurpose"> — destroys a struct class structure </span></dt><dt><span class="refentrytitle"><a href="re200.html"><span>class_dev_iter_init</span></a></span><span class="refpurpose"> — initialize class device iterator </span></dt><dt><span class="refentrytitle"><a href="re201.html"><span>class_dev_iter_next</span></a></span><span class="refpurpose"> — iterate to the next device </span></dt><dt><span class="refentrytitle"><a href="re202.html"><span>class_dev_iter_exit</span></a></span><span class="refpurpose"> — finish iteration </span></dt><dt><span class="refentrytitle"><a href="re203.html"><span>class_for_each_device</span></a></span><span class="refpurpose"> — device iterator </span></dt><dt><span class="refentrytitle"><a href="re204.html"><span>class_find_device</span></a></span><span class="refpurpose"> — device iterator for locating a particular device </span></dt><dt><span class="refentrytitle"><a href="re205.html"><span>class_compat_register</span></a></span><span class="refpurpose"> — register a compatibility class </span></dt><dt><span class="refentrytitle"><a href="re206.html"><span>class_compat_unregister</span></a></span><span class="refpurpose"> — unregister a compatibility class </span></dt><dt><span class="refentrytitle"><a href="re207.html"><span>class_compat_create_link</span></a></span><span class="refpurpose"> — create a compatibility class device link to a bus device </span></dt><dt><span class="refentrytitle"><a href="re208.html"><span>class_compat_remove_link</span></a></span><span class="refpurpose"> — remove a compatibility class device link to a bus device </span></dt><dt><span class="refentrytitle"><a href="re209.html"><span>request_firmware</span></a></span><span class="refpurpose"> — send firmware request and wait for it </span></dt><dt><span class="refentrytitle"><a href="re210.html"><span>release_firmware</span></a></span><span class="refpurpose"> — release the resource associated with a firmware image </span></dt><dt><span class="refentrytitle"><a href="re211.html"><span>request_firmware_nowait</span></a></span><span class="refpurpose"> — </span></dt><dt><span class="refentrytitle"><a href="re212.html"><span>transport_class_register</span></a></span><span class="refpurpose"> — register an initial transport class </span></dt><dt><span class="refentrytitle"><a href="re213.html"><span>transport_class_unregister</span></a></span><span class="refpurpose"> — unregister a previously registered class </span></dt><dt><span class="refentrytitle"><a href="re214.html"><span>anon_transport_class_register</span></a></span><span class="refpurpose"> — register an anonymous class </span></dt><dt><span class="refentrytitle"><a href="re215.html"><span>anon_transport_class_unregister</span></a></span><span class="refpurpose"> — unregister an anon class </span></dt><dt><span class="refentrytitle"><a href="re216.html"><span>transport_setup_device</span></a></span><span class="refpurpose"> — declare a new dev for transport class association but don't make it visible yet. </span></dt><dt><span class="refentrytitle"><a href="re217.html"><span>transport_add_device</span></a></span><span class="refpurpose"> — declare a new dev for transport class association </span></dt><dt><span class="refentrytitle"><a href="re218.html"><span>transport_configure_device</span></a></span><span class="refpurpose"> — configure an already set up device </span></dt><dt><span class="refentrytitle"><a href="re219.html"><span>transport_remove_device</span></a></span><span class="refpurpose"> — remove the visibility of a device </span></dt><dt><span class="refentrytitle"><a href="re220.html"><span>transport_destroy_device</span></a></span><span class="refpurpose"> — destroy a removed device </span></dt><dt><span class="refentrytitle"><a href="re221.html"><span>sysdev_driver_register</span></a></span><span class="refpurpose"> — Register auxillary driver </span></dt><dt><span class="refentrytitle"><a href="re222.html"><span>sysdev_driver_unregister</span></a></span><span class="refpurpose"> — Remove an auxillary driver. </span></dt><dt><span class="refentrytitle"><a href="re223.html"><span>sysdev_register</span></a></span><span class="refpurpose"> — add a system device to the tree </span></dt><dt><span class="refentrytitle"><a href="re224.html"><span>sysdev_suspend</span></a></span><span class="refpurpose"> — Suspend all system devices. </span></dt><dt><span class="refentrytitle"><a href="re225.html"><span>sysdev_resume</span></a></span><span class="refpurpose"> — Bring system devices back to life. </span></dt><dt><span class="refentrytitle"><a href="re226.html"><span>platform_get_resource</span></a></span><span class="refpurpose"> — get a resource for a device </span></dt><dt><span class="refentrytitle"><a href="re227.html"><span>platform_get_irq</span></a></span><span class="refpurpose"> — get an IRQ for a device </span></dt><dt><span class="refentrytitle"><a href="re228.html"><span>platform_get_resource_byname</span></a></span><span class="refpurpose"> — get a resource for a device by name </span></dt><dt><span class="refentrytitle"><a href="re229.html"><span>platform_get_irq_byname</span></a></span><span class="refpurpose"> — get an IRQ for a device </span></dt><dt><span class="refentrytitle"><a href="re230.html"><span>platform_add_devices</span></a></span><span class="refpurpose"> — add a numbers of platform devices </span></dt><dt><span class="refentrytitle"><a href="re231.html"><span>platform_device_put</span></a></span><span class="refpurpose"> — </span></dt><dt><span class="refentrytitle"><a href="re232.html"><span>platform_device_alloc</span></a></span><span class="refpurpose"> — </span></dt><dt><span class="refentrytitle"><a href="re233.html"><span>platform_device_add_resources</span></a></span><span class="refpurpose"> — </span></dt><dt><span class="refentrytitle"><a href="re234.html"><span>platform_device_add_data</span></a></span><span class="refpurpose"> — </span></dt><dt><span class="refentrytitle"><a href="re235.html"><span>platform_device_add</span></a></span><span class="refpurpose"> — add a platform device to device hierarchy </span></dt><dt><span class="refentrytitle"><a href="re236.html"><span>platform_device_del</span></a></span><span class="refpurpose"> — remove a platform-level device </span></dt><dt><span class="refentrytitle"><a href="re237.html"><span>platform_device_register</span></a></span><span class="refpurpose"> — add a platform-level device </span></dt><dt><span class="refentrytitle"><a href="re238.html"><span>platform_device_unregister</span></a></span><span class="refpurpose"> — unregister a platform-level device </span></dt><dt><span class="refentrytitle"><a href="re239.html"><span>platform_device_register_simple</span></a></span><span class="refpurpose"> — </span></dt><dt><span class="refentrytitle"><a href="re240.html"><span>platform_driver_register</span></a></span><span class="refpurpose"> — </span></dt><dt><span class="refentrytitle"><a href="re241.html"><span>platform_driver_unregister</span></a></span><span class="refpurpose"> — </span></dt><dt><span class="refentrytitle"><a href="re242.html"><span>platform_driver_probe</span></a></span><span class="refpurpose"> — register driver for non-hotpluggable device </span></dt><dt><span class="refentrytitle"><a href="re243.html"><span>bus_for_each_dev</span></a></span><span class="refpurpose"> — device iterator. </span></dt><dt><span class="refentrytitle"><a href="re244.html"><span>bus_find_device</span></a></span><span class="refpurpose"> — device iterator for locating a particular device. </span></dt><dt><span class="refentrytitle"><a href="re245.html"><span>bus_find_device_by_name</span></a></span><span class="refpurpose"> — device iterator for locating a particular device of a specific name </span></dt><dt><span class="refentrytitle"><a href="re246.html"><span>bus_for_each_drv</span></a></span><span class="refpurpose"> — driver iterator </span></dt><dt><span class="refentrytitle"><a href="re247.html"><span>bus_rescan_devices</span></a></span><span class="refpurpose"> — rescan devices on the bus for possible drivers </span></dt><dt><span class="refentrytitle"><a href="re248.html"><span>device_reprobe</span></a></span><span class="refpurpose"> — remove driver for a device and probe for a new driver </span></dt><dt><span class="refentrytitle"><a href="re249.html"><span>bus_register</span></a></span><span class="refpurpose"> — register a bus with the system. </span></dt><dt><span class="refentrytitle"><a href="re250.html"><span>bus_unregister</span></a></span><span class="refpurpose"> — remove a bus from the system </span></dt></dl></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="re164.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="re165.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span>devm_kfree</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span>driver_for_each_device</span></td></tr></table></div></body></html>