Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

struct_device_driver(9) [centos man page]

DEVICE_DRIVER(9) Device drivers infrastructure STRUCT DEVICE_DRIVER(9) NAME
struct_device_driver - The basic device driver structure SYNOPSIS
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; }; MEMBERS
name Name of the device driver. bus The bus which the device of this driver belongs to. owner The module owner. mod_name Used for built-in modules. suppress_bind_attrs Disables bind/unbind via sysfs. of_match_table The open firmware table. acpi_match_table The ACPI match table. probe Called to query the existence of a specific device, whether this driver can work with it, and bind the driver to a specific device. remove Called when the device is removed from the system to unbind a device from this driver. shutdown Called at shut-down time to quiesce the device. suspend Called to put the device to sleep mode. Usually to a low power state. resume Called to bring a device from sleep mode. groups Default attributes that get created by the driver core automatically. pm Power management operations of the device which matched this driver. p Driver core's private data, no one other than the driver core can touch this. DESCRIPTION
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. COPYRIGHT
Kernel Hackers Manual 3.10 June 2014 STRUCT DEVICE_DRIVER(9)

Check Out this Related Man Page

SPI_DRIVER(9) Serial Peripheral Interface (S STRUCT SPI_DRIVER(9) NAME
struct_spi_driver - Host side "protocol" driver SYNOPSIS
struct spi_driver { const struct spi_device_id * id_table; int (* probe) (struct spi_device *spi); int (* remove) (struct spi_device *spi); void (* shutdown) (struct spi_device *spi); int (* suspend) (struct spi_device *spi, pm_message_t mesg); int (* resume) (struct spi_device *spi); struct device_driver driver; }; MEMBERS
id_table List of SPI devices supported by this driver probe Binds this driver to the spi device. Drivers can verify that the device is actually present, and may need to configure characteristics (such as bits_per_word) which weren't needed for the initial configuration done during system setup. remove Unbinds this driver from the spi device shutdown Standard shutdown callback used during system state transitions such as powerdown/halt and kexec suspend Standard suspend callback used during system state transitions resume Standard resume callback used during system state transitions driver SPI device drivers should initialize the name and owner field of this structure. DESCRIPTION
This represents the kind of device driver that uses SPI messages to interact with the hardware at the other end of a SPI link. It's called a "protocol" driver because it works through messages rather than talking directly to SPI hardware (which is what the underlying SPI controller driver does to pass those messages). These protocols are defined in the specification for the device(s) supported by the driver. As a rule, those device protocols represent the lowest level interface supported by a driver, and it will support upper level interfaces too. Examples of such upper levels include frameworks like MTD, networking, MMC, RTC, filesystem character device nodes, and hardware monitoring. COPYRIGHT
Kernel Hackers Manual 2.6. July 2010 STRUCT SPI_DRIVER(9)
Man Page

Featured Tech Videos