1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>Device Drivers Base</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Linux Device Drivers"><link rel="up" href="devdrivers.html" title="Chapter 2. Device drivers infrastructure"><link rel="prev" href="API-module-driver.html" title="module_driver"><link rel="next" href="API-driver-init.html" title="driver_init"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Device Drivers Base</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-module-driver.html">Prev</a> </td><th width="60%" align="center">Chapter 2. Device drivers infrastructure</th><td width="20%" align="right"> <a accesskey="n" href="API-driver-init.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="idp1109164100"></a>Device Drivers Base</h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="refentrytitle"><a href="API-driver-init.html"><span class="phrase">driver_init</span></a></span><span class="refpurpose"> — 2 initialize driver model. 3 </span></dt><dt><span class="refentrytitle"><a href="API-driver-for-each-device.html"><span class="phrase">driver_for_each_device</span></a></span><span class="refpurpose"> — 4 Iterator for devices bound to a driver. 5 </span></dt><dt><span class="refentrytitle"><a href="API-driver-find-device.html"><span class="phrase">driver_find_device</span></a></span><span class="refpurpose"> — 6 device iterator for locating a particular device. 7 </span></dt><dt><span class="refentrytitle"><a href="API-driver-create-file.html"><span class="phrase">driver_create_file</span></a></span><span class="refpurpose"> — 8 create sysfs file for driver. 9 </span></dt><dt><span class="refentrytitle"><a href="API-driver-remove-file.html"><span class="phrase">driver_remove_file</span></a></span><span class="refpurpose"> — 10 remove sysfs file for driver. 11 </span></dt><dt><span class="refentrytitle"><a href="API-driver-register.html"><span class="phrase">driver_register</span></a></span><span class="refpurpose"> — 12 register driver with bus 13 </span></dt><dt><span class="refentrytitle"><a href="API-driver-unregister.html"><span class="phrase">driver_unregister</span></a></span><span class="refpurpose"> — 14 remove driver from system. 15 </span></dt><dt><span class="refentrytitle"><a href="API-driver-find.html"><span class="phrase">driver_find</span></a></span><span class="refpurpose"> — 16 locate driver on a bus by its name. 17 </span></dt><dt><span class="refentrytitle"><a href="API-dev-driver-string.html"><span class="phrase">dev_driver_string</span></a></span><span class="refpurpose"> — 18 Return a device's driver name, if at all possible 19 </span></dt><dt><span class="refentrytitle"><a href="API-device-create-file.html"><span class="phrase">device_create_file</span></a></span><span class="refpurpose"> — 20 create sysfs attribute file for device. 21 </span></dt><dt><span class="refentrytitle"><a href="API-device-remove-file.html"><span class="phrase">device_remove_file</span></a></span><span class="refpurpose"> — 22 remove sysfs attribute file. 23 </span></dt><dt><span class="refentrytitle"><a href="API-device-remove-file-self.html"><span class="phrase">device_remove_file_self</span></a></span><span class="refpurpose"> — 24 remove sysfs attribute file from its own method. 25 </span></dt><dt><span class="refentrytitle"><a href="API-device-create-bin-file.html"><span class="phrase">device_create_bin_file</span></a></span><span class="refpurpose"> — 26 create sysfs binary attribute file for device. 27 </span></dt><dt><span class="refentrytitle"><a href="API-device-remove-bin-file.html"><span class="phrase">device_remove_bin_file</span></a></span><span class="refpurpose"> — 28 remove sysfs binary attribute file 29 </span></dt><dt><span class="refentrytitle"><a href="API-device-initialize.html"><span class="phrase">device_initialize</span></a></span><span class="refpurpose"> — 30 init device structure. 31 </span></dt><dt><span class="refentrytitle"><a href="API-dev-set-name.html"><span class="phrase">dev_set_name</span></a></span><span class="refpurpose"> — 32 set a device name 33 </span></dt><dt><span class="refentrytitle"><a href="API-device-add.html"><span class="phrase">device_add</span></a></span><span class="refpurpose"> — 34 add device to device hierarchy. 35 </span></dt><dt><span class="refentrytitle"><a href="API-device-register.html"><span class="phrase">device_register</span></a></span><span class="refpurpose"> — 36 register a device with the system. 37 </span></dt><dt><span class="refentrytitle"><a href="API-get-device.html"><span class="phrase">get_device</span></a></span><span class="refpurpose"> — 38 increment reference count for device. 39 </span></dt><dt><span class="refentrytitle"><a href="API-put-device.html"><span class="phrase">put_device</span></a></span><span class="refpurpose"> — 40 decrement reference count. 41 </span></dt><dt><span class="refentrytitle"><a href="API-device-del.html"><span class="phrase">device_del</span></a></span><span class="refpurpose"> — 42 delete device from system. 43 </span></dt><dt><span class="refentrytitle"><a href="API-device-unregister.html"><span class="phrase">device_unregister</span></a></span><span class="refpurpose"> — 44 unregister device from system. 45 </span></dt><dt><span class="refentrytitle"><a href="API-device-for-each-child.html"><span class="phrase">device_for_each_child</span></a></span><span class="refpurpose"> — 46 device child iterator. 47 </span></dt><dt><span class="refentrytitle"><a href="API-device-find-child.html"><span class="phrase">device_find_child</span></a></span><span class="refpurpose"> — 48 device iterator for locating a particular device. 49 </span></dt><dt><span class="refentrytitle"><a href="API---root-device-register.html"><span class="phrase">__root_device_register</span></a></span><span class="refpurpose"> — 50 allocate and register a root device 51 </span></dt><dt><span class="refentrytitle"><a href="API-root-device-unregister.html"><span class="phrase">root_device_unregister</span></a></span><span class="refpurpose"> — 52 unregister and free a root device 53 </span></dt><dt><span class="refentrytitle"><a href="API-device-create-vargs.html"><span class="phrase">device_create_vargs</span></a></span><span class="refpurpose"> — 54 creates a device and registers it with sysfs 55 </span></dt><dt><span class="refentrytitle"><a href="API-device-create.html"><span class="phrase">device_create</span></a></span><span class="refpurpose"> — 56 creates a device and registers it with sysfs 57 </span></dt><dt><span class="refentrytitle"><a href="API-device-create-with-groups.html"><span class="phrase">device_create_with_groups</span></a></span><span class="refpurpose"> — 58 creates a device and registers it with sysfs 59 </span></dt><dt><span class="refentrytitle"><a href="API-device-destroy.html"><span class="phrase">device_destroy</span></a></span><span class="refpurpose"> — 60 removes a device that was created with <code class="function">device_create</code> 61 </span></dt><dt><span class="refentrytitle"><a href="API-device-rename.html"><span class="phrase">device_rename</span></a></span><span class="refpurpose"> — 62 renames a device 63 </span></dt><dt><span class="refentrytitle"><a href="API-device-move.html"><span class="phrase">device_move</span></a></span><span class="refpurpose"> — 64 moves a device to a new parent 65 </span></dt><dt><span class="refentrytitle"><a href="API-set-primary-fwnode.html"><span class="phrase">set_primary_fwnode</span></a></span><span class="refpurpose"> — 66 Change the primary firmware node of a given device. 67 </span></dt><dt><span class="refentrytitle"><a href="API-register-syscore-ops.html"><span class="phrase">register_syscore_ops</span></a></span><span class="refpurpose"> — 68 Register a set of system core operations. 69 </span></dt><dt><span class="refentrytitle"><a href="API-unregister-syscore-ops.html"><span class="phrase">unregister_syscore_ops</span></a></span><span class="refpurpose"> — 70 Unregister a set of system core operations. 71 </span></dt><dt><span class="refentrytitle"><a href="API-syscore-suspend.html"><span class="phrase">syscore_suspend</span></a></span><span class="refpurpose"> — 72 Execute all the registered system core suspend callbacks. 73 </span></dt><dt><span class="refentrytitle"><a href="API-syscore-resume.html"><span class="phrase">syscore_resume</span></a></span><span class="refpurpose"> — 74 Execute all the registered system core resume callbacks. 75 </span></dt><dt><span class="refentrytitle"><a href="API---class-create.html"><span class="phrase">__class_create</span></a></span><span class="refpurpose"> — 76 create a struct class structure 77 </span></dt><dt><span class="refentrytitle"><a href="API-class-destroy.html"><span class="phrase">class_destroy</span></a></span><span class="refpurpose"> — 78 destroys a struct class structure 79 </span></dt><dt><span class="refentrytitle"><a href="API-class-dev-iter-init.html"><span class="phrase">class_dev_iter_init</span></a></span><span class="refpurpose"> — 80 initialize class device iterator 81 </span></dt><dt><span class="refentrytitle"><a href="API-class-dev-iter-next.html"><span class="phrase">class_dev_iter_next</span></a></span><span class="refpurpose"> — 82 iterate to the next device 83 </span></dt><dt><span class="refentrytitle"><a href="API-class-dev-iter-exit.html"><span class="phrase">class_dev_iter_exit</span></a></span><span class="refpurpose"> — 84 finish iteration 85 </span></dt><dt><span class="refentrytitle"><a href="API-class-for-each-device.html"><span class="phrase">class_for_each_device</span></a></span><span class="refpurpose"> — 86 device iterator 87 </span></dt><dt><span class="refentrytitle"><a href="API-class-find-device.html"><span class="phrase">class_find_device</span></a></span><span class="refpurpose"> — 88 device iterator for locating a particular device 89 </span></dt><dt><span class="refentrytitle"><a href="API-class-compat-register.html"><span class="phrase">class_compat_register</span></a></span><span class="refpurpose"> — 90 register a compatibility class 91 </span></dt><dt><span class="refentrytitle"><a href="API-class-compat-unregister.html"><span class="phrase">class_compat_unregister</span></a></span><span class="refpurpose"> — 92 unregister a compatibility class 93 </span></dt><dt><span class="refentrytitle"><a href="API-class-compat-create-link.html"><span class="phrase">class_compat_create_link</span></a></span><span class="refpurpose"> — 94 create a compatibility class device link to a bus device 95 </span></dt><dt><span class="refentrytitle"><a href="API-class-compat-remove-link.html"><span class="phrase">class_compat_remove_link</span></a></span><span class="refpurpose"> — 96 remove a compatibility class device link to a bus device 97 </span></dt><dt><span class="refentrytitle"><a href="API-unregister-node.html"><span class="phrase">unregister_node</span></a></span><span class="refpurpose"> — 98 unregister a node device 99 </span></dt><dt><span class="refentrytitle"><a href="API-request-firmware.html"><span class="phrase">request_firmware</span></a></span><span class="refpurpose"> — 100 send firmware request and wait for it 101 </span></dt><dt><span class="refentrytitle"><a href="API-request-firmware-direct.html"><span class="phrase">request_firmware_direct</span></a></span><span class="refpurpose"> — 102 load firmware directly without usermode helper 103 </span></dt><dt><span class="refentrytitle"><a href="API-release-firmware.html"><span class="phrase">release_firmware</span></a></span><span class="refpurpose"> — 104 release the resource associated with a firmware image 105 </span></dt><dt><span class="refentrytitle"><a href="API-request-firmware-nowait.html"><span class="phrase">request_firmware_nowait</span></a></span><span class="refpurpose"> — 106 asynchronous version of request_firmware 107 </span></dt><dt><span class="refentrytitle"><a href="API-transport-class-register.html"><span class="phrase">transport_class_register</span></a></span><span class="refpurpose"> — 108 register an initial transport class 109 </span></dt><dt><span class="refentrytitle"><a href="API-transport-class-unregister.html"><span class="phrase">transport_class_unregister</span></a></span><span class="refpurpose"> — 110 unregister a previously registered class 111 </span></dt><dt><span class="refentrytitle"><a href="API-anon-transport-class-register.html"><span class="phrase">anon_transport_class_register</span></a></span><span class="refpurpose"> — 112 register an anonymous class 113 </span></dt><dt><span class="refentrytitle"><a href="API-anon-transport-class-unregister.html"><span class="phrase">anon_transport_class_unregister</span></a></span><span class="refpurpose"> — 114 unregister an anon class 115 </span></dt><dt><span class="refentrytitle"><a href="API-transport-setup-device.html"><span class="phrase">transport_setup_device</span></a></span><span class="refpurpose"> — 116 declare a new dev for transport class association but don't make it visible yet. 117 </span></dt><dt><span class="refentrytitle"><a href="API-transport-add-device.html"><span class="phrase">transport_add_device</span></a></span><span class="refpurpose"> — 118 declare a new dev for transport class association 119 </span></dt><dt><span class="refentrytitle"><a href="API-transport-configure-device.html"><span class="phrase">transport_configure_device</span></a></span><span class="refpurpose"> — 120 configure an already set up device 121 </span></dt><dt><span class="refentrytitle"><a href="API-transport-remove-device.html"><span class="phrase">transport_remove_device</span></a></span><span class="refpurpose"> — 122 remove the visibility of a device 123 </span></dt><dt><span class="refentrytitle"><a href="API-transport-destroy-device.html"><span class="phrase">transport_destroy_device</span></a></span><span class="refpurpose"> — 124 destroy a removed device 125 </span></dt><dt><span class="refentrytitle"><a href="API-device-bind-driver.html"><span class="phrase">device_bind_driver</span></a></span><span class="refpurpose"> — 126 bind a driver to one device. 127 </span></dt><dt><span class="refentrytitle"><a href="API-wait-for-device-probe.html"><span class="phrase">wait_for_device_probe</span></a></span><span class="refpurpose"> — 128 </span></dt><dt><span class="refentrytitle"><a href="API-device-attach.html"><span class="phrase">device_attach</span></a></span><span class="refpurpose"> — 129 try to attach device to a driver. 130 </span></dt><dt><span class="refentrytitle"><a href="API-driver-attach.html"><span class="phrase">driver_attach</span></a></span><span class="refpurpose"> — 131 try to bind driver to devices. 132 </span></dt><dt><span class="refentrytitle"><a href="API-device-release-driver.html"><span class="phrase">device_release_driver</span></a></span><span class="refpurpose"> — 133 manually detach device from driver. 134 </span></dt><dt><span class="refentrytitle"><a href="API-platform-device-register-resndata.html"><span class="phrase">platform_device_register_resndata</span></a></span><span class="refpurpose"> — 135 add a platform-level device with resources and platform-specific data 136 </span></dt><dt><span class="refentrytitle"><a href="API-platform-device-register-simple.html"><span class="phrase">platform_device_register_simple</span></a></span><span class="refpurpose"> — 137 add a platform-level device and its resources 138 </span></dt><dt><span class="refentrytitle"><a href="API-platform-device-register-data.html"><span class="phrase">platform_device_register_data</span></a></span><span class="refpurpose"> — 139 add a platform-level device with platform-specific data 140 </span></dt><dt><span class="refentrytitle"><a href="API-platform-get-resource.html"><span class="phrase">platform_get_resource</span></a></span><span class="refpurpose"> — 141 get a resource for a device 142 </span></dt><dt><span class="refentrytitle"><a href="API-platform-get-irq.html"><span class="phrase">platform_get_irq</span></a></span><span class="refpurpose"> — 143 get an IRQ for a device 144 </span></dt><dt><span class="refentrytitle"><a href="API-platform-get-resource-byname.html"><span class="phrase">platform_get_resource_byname</span></a></span><span class="refpurpose"> — 145 get a resource for a device by name 146 </span></dt><dt><span class="refentrytitle"><a href="API-platform-get-irq-byname.html"><span class="phrase">platform_get_irq_byname</span></a></span><span class="refpurpose"> — 147 get an IRQ for a device by name 148 </span></dt><dt><span class="refentrytitle"><a href="API-platform-add-devices.html"><span class="phrase">platform_add_devices</span></a></span><span class="refpurpose"> — 149 add a numbers of platform devices 150 </span></dt><dt><span class="refentrytitle"><a href="API-platform-device-put.html"><span class="phrase">platform_device_put</span></a></span><span class="refpurpose"> — 151 destroy a platform device 152 </span></dt><dt><span class="refentrytitle"><a href="API-platform-device-alloc.html"><span class="phrase">platform_device_alloc</span></a></span><span class="refpurpose"> — 153 create a platform device 154 </span></dt><dt><span class="refentrytitle"><a href="API-platform-device-add-resources.html"><span class="phrase">platform_device_add_resources</span></a></span><span class="refpurpose"> — 155 add resources to a platform device 156 </span></dt><dt><span class="refentrytitle"><a href="API-platform-device-add-data.html"><span class="phrase">platform_device_add_data</span></a></span><span class="refpurpose"> — 157 add platform-specific data to a platform device 158 </span></dt><dt><span class="refentrytitle"><a href="API-platform-device-add.html"><span class="phrase">platform_device_add</span></a></span><span class="refpurpose"> — 159 add a platform device to device hierarchy 160 </span></dt><dt><span class="refentrytitle"><a href="API-platform-device-del.html"><span class="phrase">platform_device_del</span></a></span><span class="refpurpose"> — 161 remove a platform-level device 162 </span></dt><dt><span class="refentrytitle"><a href="API-platform-device-register.html"><span class="phrase">platform_device_register</span></a></span><span class="refpurpose"> — 163 add a platform-level device 164 </span></dt><dt><span class="refentrytitle"><a href="API-platform-device-unregister.html"><span class="phrase">platform_device_unregister</span></a></span><span class="refpurpose"> — 165 unregister a platform-level device 166 </span></dt><dt><span class="refentrytitle"><a href="API-platform-device-register-full.html"><span class="phrase">platform_device_register_full</span></a></span><span class="refpurpose"> — 167 add a platform-level device with resources and platform-specific data 168 </span></dt><dt><span class="refentrytitle"><a href="API---platform-driver-register.html"><span class="phrase">__platform_driver_register</span></a></span><span class="refpurpose"> — 169 register a driver for platform-level devices 170 </span></dt><dt><span class="refentrytitle"><a href="API-platform-driver-unregister.html"><span class="phrase">platform_driver_unregister</span></a></span><span class="refpurpose"> — 171 unregister a driver for platform-level devices 172 </span></dt><dt><span class="refentrytitle"><a href="API---platform-driver-probe.html"><span class="phrase">__platform_driver_probe</span></a></span><span class="refpurpose"> — 173 register driver for non-hotpluggable device 174 </span></dt><dt><span class="refentrytitle"><a href="API---platform-create-bundle.html"><span class="phrase">__platform_create_bundle</span></a></span><span class="refpurpose"> — 175 register driver and create corresponding device 176 </span></dt><dt><span class="refentrytitle"><a href="API-bus-for-each-dev.html"><span class="phrase">bus_for_each_dev</span></a></span><span class="refpurpose"> — 177 device iterator. 178 </span></dt><dt><span class="refentrytitle"><a href="API-bus-find-device.html"><span class="phrase">bus_find_device</span></a></span><span class="refpurpose"> — 179 device iterator for locating a particular device. 180 </span></dt><dt><span class="refentrytitle"><a href="API-bus-find-device-by-name.html"><span class="phrase">bus_find_device_by_name</span></a></span><span class="refpurpose"> — 181 device iterator for locating a particular device of a specific name 182 </span></dt><dt><span class="refentrytitle"><a href="API-subsys-find-device-by-id.html"><span class="phrase">subsys_find_device_by_id</span></a></span><span class="refpurpose"> — 183 find a device with a specific enumeration number 184 </span></dt><dt><span class="refentrytitle"><a href="API-bus-for-each-drv.html"><span class="phrase">bus_for_each_drv</span></a></span><span class="refpurpose"> — 185 driver iterator 186 </span></dt><dt><span class="refentrytitle"><a href="API-bus-rescan-devices.html"><span class="phrase">bus_rescan_devices</span></a></span><span class="refpurpose"> — 187 rescan devices on the bus for possible drivers 188 </span></dt><dt><span class="refentrytitle"><a href="API-device-reprobe.html"><span class="phrase">device_reprobe</span></a></span><span class="refpurpose"> — 189 remove driver for a device and probe for a new driver 190 </span></dt><dt><span class="refentrytitle"><a href="API-bus-register.html"><span class="phrase">bus_register</span></a></span><span class="refpurpose"> — 191 register a driver-core subsystem 192 </span></dt><dt><span class="refentrytitle"><a href="API-bus-unregister.html"><span class="phrase">bus_unregister</span></a></span><span class="refpurpose"> — 193 remove a bus from the system 194 </span></dt><dt><span class="refentrytitle"><a href="API-subsys-dev-iter-init.html"><span class="phrase">subsys_dev_iter_init</span></a></span><span class="refpurpose"> — 195 initialize subsys device iterator 196 </span></dt><dt><span class="refentrytitle"><a href="API-subsys-dev-iter-next.html"><span class="phrase">subsys_dev_iter_next</span></a></span><span class="refpurpose"> — 197 iterate to the next device 198 </span></dt><dt><span class="refentrytitle"><a href="API-subsys-dev-iter-exit.html"><span class="phrase">subsys_dev_iter_exit</span></a></span><span class="refpurpose"> — 199 finish iteration 200 </span></dt><dt><span class="refentrytitle"><a href="API-subsys-system-register.html"><span class="phrase">subsys_system_register</span></a></span><span class="refpurpose"> — 201 register a subsystem at /sys/devices/system/ 202 </span></dt><dt><span class="refentrytitle"><a href="API-subsys-virtual-register.html"><span class="phrase">subsys_virtual_register</span></a></span><span class="refpurpose"> — 203 register a subsystem at /sys/devices/virtual/ 204 </span></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-module-driver.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="devdrivers.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-driver-init.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">module_driver</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span class="phrase">driver_init</span></td></tr></table></div></body></html> 205