Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

struct_usb_device_driver(9) [centos man page]

USB_DEVICE_DR(9) Host-Side Data Types and Macro STRUCT USB_DEVICE_DR(9) NAME
struct_usb_device_driver - identifies USB device driver to usbcore SYNOPSIS
struct usb_device_driver { const char * name; int (* probe) (struct usb_device *udev); void (* disconnect) (struct usb_device *udev); int (* suspend) (struct usb_device *udev, pm_message_t message); int (* resume) (struct usb_device *udev, pm_message_t message); struct usbdrv_wrap drvwrap; unsigned int supports_autosuspend:1; }; MEMBERS
name The driver name should be unique among USB drivers, and should normally be the same as the module name. probe Called to see if the driver is willing to manage a particular device. If it is, probe returns zero and uses dev_set_drvdata to associate driver-specific data with the device. If unwilling to manage the device, return a negative errno value. disconnect Called when the device is no longer accessible, usually because it has been (or is being) disconnected or the driver's module is being unloaded. suspend Called when the device is going to be suspended by the system. resume Called when the device is being resumed by the system. drvwrap Driver-model core structure wrapper. supports_autosuspend if set to 0, the USB core will not allow autosuspend for devices bound to this driver. DESCRIPTION
USB drivers must provide all the fields listed above except drvwrap. COPYRIGHT
Kernel Hackers Manual 3.10 June 2014 STRUCT USB_DEVICE_DR(9)

Check Out this Related 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)
Man Page

6 More Discussions You Might Find Interesting

1. Programming

freeBSD device driver (use struct uio)

Hi, everybody I have next problem... 1) My Example program code void main() { int fd; int len; int buf; fd=open("mydev", O_RDONLY); lseek(fd, 0, SEEK_SET); len=read(fd, buf, sizeof(buf)); } 2) My Example Driver code static int mydev_read(dev_t dev, ?, ?, struct uio* uio) {... (0 Replies)
Discussion started by: Alex_T
0 Replies

2. Linux

udev core 5

installed fedora core 5 on a pc with USB and some usual things. in boot up it is stopped at "Starting udev:". Its harddisk light is busy. is it reconfiguring the kernel?. what do to solve this problem?. (0 Replies)
Discussion started by: GJ2
0 Replies

3. Linux

i need help on installing some drivers

hello everyone i am a windows user and now im migrating to unix systems, i installed openSUSE linux on my system and i need help on installing the driver for a wireless USB adapter (TP-Link )and the driver for the graphic Card (geforce 5500). (1 Reply)
Discussion started by: abu_malek
1 Replies

4. Debian

automount specific USB-disk to specified path

I was just talking to a friend of mine about a problem I have, and he suggested that udev could probably help me. Allthough he couldn't give me any hints on how to accomplish what i want to. I have read the manual and searched google, but without any good info... here's the thing... I am... (2 Replies)
Discussion started by: noratx
2 Replies

5. Hardware

how to write data into a device file?

Hi, I am working in device drivers. I am new to device drivers. i have invoked chardev.c. the driver is insmoded. now i want to write something into this and i want to look what i have written. but i don't know how to write and see. please help me (0 Replies)
Discussion started by: boidi
0 Replies

6. Shell Programming and Scripting

Pass params with Udev

Hello! I'm sorry if this is the false Forum, didn't really knew where to put it... My question: I have serveral USB-Sticks and wrote several Udev-Rules for theme, each Sticks needs to do something else, but all are using the same script (they have common tasks to do) and only some parts are... (2 Replies)
Discussion started by: al0x
2 Replies