'\" t .\" Title: struct device_driver .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: May 2018 .\" Manual: Device drivers infrastructure .\" Source: Kernel Hackers Manual 3.16.56 .\" Language: English .\" .TH "STRUCT DEVICE_DRIVER" "9" "May 2018" "Kernel Hackers Manual 3\&.16\&" "Device drivers infrastructure" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" struct_device_driver \- The basic device driver structure .SH "SYNOPSIS" .sp .nf struct device_driver { const char * name; struct bus_type * bus; struct module * owner; const char * mod_name; bool suppress_bind_attrs; const struct of_device_id * of_match_table; const struct acpi_device_id * acpi_match_table; int (* probe) (struct device *dev); int (* remove) (struct device *dev); void (* shutdown) (struct device *dev); int (* suspend) (struct device *dev, pm_message_t state); int (* resume) (struct device *dev); const struct attribute_group ** groups; const struct dev_pm_ops * pm; struct driver_private * p; }; .fi .SH "MEMBERS" .PP name .RS 4 Name of the device driver\&. .RE .PP bus .RS 4 The bus which the device of this driver belongs to\&. .RE .PP owner .RS 4 The module owner\&. .RE .PP mod_name .RS 4 Used for built\-in modules\&. .RE .PP suppress_bind_attrs .RS 4 Disables bind/unbind via sysfs\&. .RE .PP of_match_table .RS 4 The open firmware table\&. .RE .PP acpi_match_table .RS 4 The ACPI match table\&. .RE .PP probe .RS 4 Called to query the existence of a specific device, whether this driver can work with it, and bind the driver to a specific device\&. .RE .PP remove .RS 4 Called when the device is removed from the system to unbind a device from this driver\&. .RE .PP shutdown .RS 4 Called at shut\-down time to quiesce the device\&. .RE .PP suspend .RS 4 Called to put the device to sleep mode\&. Usually to a low power state\&. .RE .PP resume .RS 4 Called to bring a device from sleep mode\&. .RE .PP groups .RS 4 Default attributes that get created by the driver core automatically\&. .RE .PP pm .RS 4 Power management operations of the device which matched this driver\&. .RE .PP p .RS 4 Driver core\*(Aqs private data, no one other than the driver core can touch this\&. .RE .SH "DESCRIPTION" .PP The device driver\-model tracks all of the drivers known to the system\&. The main reason for this tracking is to enable the driver core to match up drivers with new devices\&. Once drivers are known objects within the system, however, a number of other things become possible\&. Device drivers can export information and configuration variables that are independent of any specific device\&. .SH "COPYRIGHT" .br