1<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><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-builtin-driver.html" title="builtin_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-builtin-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="id-1.4.3"></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-for-each-child-reverse.html"><span class="phrase">device_for_each_child_reverse</span></a></span><span class="refpurpose"> — 
48     device child iterator in reversed order.
49 </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"> — 
50     device iterator for locating a particular device.
51 </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"> — 
52     allocate and register a root device
53 </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"> — 
54     unregister and free a root device
55 </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"> — 
56     creates a device and registers it with sysfs
57 </span></dt><dt><span class="refentrytitle"><a href="API-device-create.html"><span class="phrase">device_create</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-create-with-groups.html"><span class="phrase">device_create_with_groups</span></a></span><span class="refpurpose"> — 
60     creates a device and registers it with sysfs
61 </span></dt><dt><span class="refentrytitle"><a href="API-device-destroy.html"><span class="phrase">device_destroy</span></a></span><span class="refpurpose">
62     removes a device that was created with device_create
63 </span></dt><dt><span class="refentrytitle"><a href="API-device-rename.html"><span class="phrase">device_rename</span></a></span><span class="refpurpose"> — 
64     renames a device
65 </span></dt><dt><span class="refentrytitle"><a href="API-device-move.html"><span class="phrase">device_move</span></a></span><span class="refpurpose"> — 
66     moves a device to a new parent
67 </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"> — 
68     Change the primary firmware node of a given device.
69 </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"> — 
70  Register a set of system core operations.
71 </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"> — 
72     Unregister a set of system core operations.
73 </span></dt><dt><span class="refentrytitle"><a href="API-syscore-suspend.html"><span class="phrase">syscore_suspend</span></a></span><span class="refpurpose"> — 
74     Execute all the registered system core suspend callbacks.
75 </span></dt><dt><span class="refentrytitle"><a href="API-syscore-resume.html"><span class="phrase">syscore_resume</span></a></span><span class="refpurpose"> — 
76     Execute all the registered system core resume callbacks.
77 </span></dt><dt><span class="refentrytitle"><a href="API---class-create.html"><span class="phrase">__class_create</span></a></span><span class="refpurpose"> — 
78  create a struct class structure
79 </span></dt><dt><span class="refentrytitle"><a href="API-class-destroy.html"><span class="phrase">class_destroy</span></a></span><span class="refpurpose"> — 
80     destroys a struct class structure
81 </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"> — 
82     initialize class device iterator
83 </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"> — 
84     iterate to the next device
85 </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"> — 
86     finish iteration
87 </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"> — 
88     device iterator
89 </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"> — 
90     device iterator for locating a particular device
91 </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"> — 
92     register a compatibility class
93 </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"> — 
94     unregister a compatibility class
95 </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"> — 
96     create a compatibility class device link to a bus device
97 </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"> — 
98     remove a compatibility class device link to a bus device
99 </span></dt><dt><span class="refentrytitle"><a href="API-unregister-node.html"><span class="phrase">unregister_node</span></a></span><span class="refpurpose"> — 
100  unregister a node device
101 </span></dt><dt><span class="refentrytitle"><a href="API-request-firmware.html"><span class="phrase">request_firmware</span></a></span><span class="refpurpose"> — 
102  send firmware request and wait for it
103 </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"> — 
104     load firmware directly without usermode helper
105 </span></dt><dt><span class="refentrytitle"><a href="API-release-firmware.html"><span class="phrase">release_firmware</span></a></span><span class="refpurpose"> — 
106     release the resource associated with a firmware image
107 </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"> — 
108     asynchronous version of request_firmware
109 </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"> — 
110  register an initial transport class
111 </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"> — 
112     unregister a previously registered class
113 </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"> — 
114     register an anonymous class
115 </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"> — 
116     unregister an anon class
117 </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"> — 
118     declare a new dev for transport class association but don't make it visible yet.
119 </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"> — 
120     declare a new dev for transport class association
121 </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"> — 
122     configure an already set up device
123 </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"> — 
124     remove the visibility of a device
125 </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"> — 
126     destroy a removed device
127 </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"> — 
128  bind a driver to one device.
129 </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"> — 
130   </span></dt><dt><span class="refentrytitle"><a href="API-device-attach.html"><span class="phrase">device_attach</span></a></span><span class="refpurpose"> — 
131     try to attach device to a driver.
132 </span></dt><dt><span class="refentrytitle"><a href="API-driver-attach.html"><span class="phrase">driver_attach</span></a></span><span class="refpurpose"> — 
133     try to bind driver to devices.
134 </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"> — 
135     manually detach device from driver.
136 </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"> — 
137  add a platform-level device with resources and platform-specific data
138 </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"> — 
139     add a platform-level device and its resources
140 </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"> — 
141     add a platform-level device with platform-specific data
142 </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"> — 
143  get a resource for a device
144 </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"> — 
145     get an IRQ for a device
146 </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"> — 
147     get a resource for a device by name
148 </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"> — 
149     get an IRQ for a device by name
150 </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"> — 
151     add a numbers of platform devices
152 </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"> — 
153     destroy a platform device
154 </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"> — 
155     create a platform device
156 </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"> — 
157     add resources to a platform device
158 </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"> — 
159     add platform-specific data to a platform device
160 </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"> — 
161     add a platform device to device hierarchy
162 </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"> — 
163     remove a platform-level device
164 </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"> — 
165     add a platform-level device
166 </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"> — 
167     unregister a platform-level device
168 </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"> — 
169     add a platform-level device with resources and platform-specific data
170 </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"> — 
171     register a driver for platform-level devices
172 </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"> — 
173     unregister a driver for platform-level devices
174 </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"> — 
175     register driver for non-hotpluggable device
176 </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"> — 
177     register driver and create corresponding device
178 </span></dt><dt><span class="refentrytitle"><a href="API---platform-register-drivers.html"><span class="phrase">__platform_register_drivers</span></a></span><span class="refpurpose"> — 
179     register an array of platform drivers
180 </span></dt><dt><span class="refentrytitle"><a href="API-platform-unregister-drivers.html"><span class="phrase">platform_unregister_drivers</span></a></span><span class="refpurpose"> — 
181     unregister an array of platform drivers
182 </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"> — 
183  device iterator.
184 </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"> — 
185     device iterator for locating a particular device.
186 </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"> — 
187     device iterator for locating a particular device of a specific name
188 </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"> — 
189     find a device with a specific enumeration number
190 </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"> — 
191     driver iterator
192 </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"> — 
193     rescan devices on the bus for possible drivers
194 </span></dt><dt><span class="refentrytitle"><a href="API-device-reprobe.html"><span class="phrase">device_reprobe</span></a></span><span class="refpurpose"> — 
195     remove driver for a device and probe for a new driver
196 </span></dt><dt><span class="refentrytitle"><a href="API-bus-register.html"><span class="phrase">bus_register</span></a></span><span class="refpurpose"> — 
197     register a driver-core subsystem
198 </span></dt><dt><span class="refentrytitle"><a href="API-bus-unregister.html"><span class="phrase">bus_unregister</span></a></span><span class="refpurpose"> — 
199     remove a bus from the system
200 </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"> — 
201     initialize subsys device iterator
202 </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"> — 
203     iterate to the next device
204 </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"> — 
205     finish iteration
206 </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"> — 
207     register a subsystem at /sys/devices/system/
208 </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"> — 
209     register a subsystem at /sys/devices/virtual/
210 </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-builtin-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">builtin_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>
211