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&#160;2.&#160;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>&#160;</td><th width="60%" align="center">Chapter&#160;2.&#160;Device drivers infrastructure</th><td width="20%" align="right">&#160;<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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
128   </span></dt><dt><span class="refentrytitle"><a href="API-device-attach.html"><span class="phrase">device_attach</span></a></span><span class="refpurpose"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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"> &#8212; 
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>&#160;</td><td width="20%" align="center"><a accesskey="u" href="devdrivers.html">Up</a></td><td width="40%" align="right">&#160;<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>&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;<span class="phrase">driver_init</span></td></tr></table></div></body></html>
205