diff options
author | Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> | 2017-02-05 21:44:51 +0100 |
---|---|---|
committer | Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> | 2017-06-23 20:49:08 +0200 |
commit | c91da92ef2983ab3d50f5d6e5cbaf993fece6339 (patch) | |
tree | 4eeb8952954fcdef9b21c14bc60473806a69415b /include/linux | |
parent | a46b825a2f8cabebfa2bdc44342c676c0a620905 (diff) | |
download | kernel_samsung_smdk4412-c91da92ef2983ab3d50f5d6e5cbaf993fece6339.zip kernel_samsung_smdk4412-c91da92ef2983ab3d50f5d6e5cbaf993fece6339.tar.gz kernel_samsung_smdk4412-c91da92ef2983ab3d50f5d6e5cbaf993fece6339.tar.bz2 |
drivers: Backport cdc-wdm and new qmi_wwan
Backport is based on Aleksander Morgado's backport for OpenWrt to the
3.2 kernel[1], so it's a backport of a backport. I added the device
IDs for MDM9x15.
[1] https://gitorious.org/lanedo/linux-stable?p=lanedo:linux-stable.git;a=shortlog;h=refs/heads/v3.2.5-qmi
Signed-off-by: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/usb.h | 13 | ||||
-rw-r--r-- | include/linux/usb/cdc-wdm.h | 19 |
2 files changed, 32 insertions, 0 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h index eecfc67e..b639d84 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h @@ -1605,6 +1605,19 @@ usb_maxpacket(struct usb_device *udev, int pipe, int is_out) /* ----------------------------------------------------------------------- */ +/* translate USB error codes to codes user space understands */ +static inline int usb_translate_errors(int error_code) +{ + switch (error_code) { + case 0: + case -ENOMEM: + case -ENODEV: + return error_code; + default: + return -EIO; + } +} + /* Events from the usb core */ #define USB_DEVICE_ADD 0x0001 #define USB_DEVICE_REMOVE 0x0002 diff --git a/include/linux/usb/cdc-wdm.h b/include/linux/usb/cdc-wdm.h new file mode 100644 index 0000000..719c332 --- /dev/null +++ b/include/linux/usb/cdc-wdm.h @@ -0,0 +1,19 @@ +/* + * USB CDC Device Management subdriver + * + * Copyright (c) 2012 Bjørn Mork <bjorn@mork.no> + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + */ + +#ifndef __LINUX_USB_CDC_WDM_H +#define __LINUX_USB_CDC_WDM_H + +extern struct usb_driver *usb_cdc_wdm_register(struct usb_interface *intf, + struct usb_endpoint_descriptor *ep, + int bufsize, + int (*manage_power)(struct usb_interface *, int)); + +#endif /* __LINUX_USB_CDC_WDM_H */ |