diff options
author | Bjørn Mork <bjorn@mork.no> | 2012-03-06 11:29:22 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-03-08 16:06:48 -0500 |
commit | 3cc3615749dbd1b891512d5c9a5bf4559cfa9741 (patch) | |
tree | 9e6d3b095c521d7114ac0b74ee280b31d2809d94 /include/linux/usb/cdc-wdm.h | |
parent | b0c13860808a528cd580fdca61aef9f73352a331 (diff) |
usb: cdc-wdm: adding usb_cdc_wdm_register subdriver support
This driver can be used as a subdriver of another USB driver, allowing
it to export a Device Managment interface consisting of a single interrupt
endpoint with no dedicated USB interface.
Some devices provide a Device Management function combined with a wwan
function in a single USB interface having three endpoints (bulk in/out
+ interrupt). If the interrupt endpoint is used exclusively for DM
notifications, then this driver can support that as a subdriver
provided that the wwan driver calls the appropriate entry points on
probe, suspend, resume, pre_reset, post_reset and disconnect.
The main driver must have full control over all interface related
settings, including the needs_remote_wakeup flag. A manage_power
function must be provided by the main driver.
A manage_power stub doing direct flag manipulation is used in normal
driver mode.
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Acked-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/usb/cdc-wdm.h')
-rw-r--r-- | include/linux/usb/cdc-wdm.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/usb/cdc-wdm.h b/include/linux/usb/cdc-wdm.h new file mode 100644 index 000000000000..719c332620fa --- /dev/null +++ b/include/linux/usb/cdc-wdm.h | |||
@@ -0,0 +1,19 @@ | |||
1 | /* | ||
2 | * USB CDC Device Management subdriver | ||
3 | * | ||
4 | * Copyright (c) 2012 Bjørn Mork <bjorn@mork.no> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License | ||
8 | * version 2 as published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #ifndef __LINUX_USB_CDC_WDM_H | ||
12 | #define __LINUX_USB_CDC_WDM_H | ||
13 | |||
14 | extern struct usb_driver *usb_cdc_wdm_register(struct usb_interface *intf, | ||
15 | struct usb_endpoint_descriptor *ep, | ||
16 | int bufsize, | ||
17 | int (*manage_power)(struct usb_interface *, int)); | ||
18 | |||
19 | #endif /* __LINUX_USB_CDC_WDM_H */ | ||