diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-07 22:23:21 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-07 22:23:21 -0500 |
commit | c96e2c92072d3e78954c961f53d8c7352f7abbd7 (patch) | |
tree | d844f26f926ff40e98e9eae0e11fd71acad81df4 /include | |
parent | f2aca47dc3c2d0c2d5dbd972558557e74232bbce (diff) | |
parent | 64358164f5bfe5e11d4040c1eb674c29e1436ce5 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6: (70 commits)
USB: remove duplicate device id from zc0301
USB: remove duplicate device id from usb_storage
USB: remove duplicate device id from keyspan
USB: remove duplicate device id from ftdi_sio
USB: remove duplicate device id from visor
USB: a bit more coding style cleanup
usbcore: trivial whitespace fixes
usb-storage: use first bulk endpoints, not last
EHCI: fix interrupt-driven remote wakeup
USB: switch ehci-hcd to new polling scheme
USB: autosuspend for usb printer driver
USB Input: Added kernel module to support all GTCO CalComp USB InterWrite School products
USB: Sierra Wireless auto set D0
USB: usb ethernet gadget recognizes HUSB2DEV
USB: list atmel husb2_udc gadget controller
USB: gadgetfs AIO tweaks
USB: gadgetfs behaves better on userspace init bug
USB: gadgetfs race fix
USB: gadgetfs simplifications
USB: gadgetfs cleanups
...
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/Kbuild | 2 | ||||
-rw-r--r-- | include/linux/hid.h | 1 | ||||
-rw-r--r-- | include/linux/usb.h | 34 | ||||
-rw-r--r-- | include/linux/usb/Kbuild | 5 | ||||
-rw-r--r-- | include/linux/usb/ch9.h (renamed from include/linux/usb_ch9.h) | 1 | ||||
-rw-r--r-- | include/linux/usb/serial.h | 5 | ||||
-rw-r--r-- | include/linux/usb_gadgetfs.h | 2 |
7 files changed, 43 insertions, 7 deletions
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index 157db77a7170..683513e310de 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -11,6 +11,7 @@ header-y += netfilter_arp/ | |||
11 | header-y += netfilter_bridge/ | 11 | header-y += netfilter_bridge/ |
12 | header-y += netfilter_ipv4/ | 12 | header-y += netfilter_ipv4/ |
13 | header-y += netfilter_ipv6/ | 13 | header-y += netfilter_ipv6/ |
14 | header-y += usb/ | ||
14 | 15 | ||
15 | header-y += affs_hardblocks.h | 16 | header-y += affs_hardblocks.h |
16 | header-y += aio_abi.h | 17 | header-y += aio_abi.h |
@@ -326,7 +327,6 @@ unifdef-y += udp.h | |||
326 | unifdef-y += uinput.h | 327 | unifdef-y += uinput.h |
327 | unifdef-y += uio.h | 328 | unifdef-y += uio.h |
328 | unifdef-y += unistd.h | 329 | unifdef-y += unistd.h |
329 | unifdef-y += usb_ch9.h | ||
330 | unifdef-y += usbdevice_fs.h | 330 | unifdef-y += usbdevice_fs.h |
331 | unifdef-y += user.h | 331 | unifdef-y += user.h |
332 | unifdef-y += utsname.h | 332 | unifdef-y += utsname.h |
diff --git a/include/linux/hid.h b/include/linux/hid.h index 93173fe45634..d26b08f461f2 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h | |||
@@ -266,6 +266,7 @@ struct hid_item { | |||
266 | #define HID_QUIRK_BAD_RELATIVE_KEYS 0x00010000 | 266 | #define HID_QUIRK_BAD_RELATIVE_KEYS 0x00010000 |
267 | #define HID_QUIRK_SKIP_OUTPUT_REPORTS 0x00020000 | 267 | #define HID_QUIRK_SKIP_OUTPUT_REPORTS 0x00020000 |
268 | #define HID_QUIRK_IGNORE_MOUSE 0x00040000 | 268 | #define HID_QUIRK_IGNORE_MOUSE 0x00040000 |
269 | #define HID_QUIRK_SONY_PS3_CONTROLLER 0x00080000 | ||
269 | 270 | ||
270 | /* | 271 | /* |
271 | * This is the global environment of the parser. This information is | 272 | * This is the global environment of the parser. This information is |
diff --git a/include/linux/usb.h b/include/linux/usb.h index 733f38de4978..b5c226a87ed8 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -2,7 +2,7 @@ | |||
2 | #define __LINUX_USB_H | 2 | #define __LINUX_USB_H |
3 | 3 | ||
4 | #include <linux/mod_devicetable.h> | 4 | #include <linux/mod_devicetable.h> |
5 | #include <linux/usb_ch9.h> | 5 | #include <linux/usb/ch9.h> |
6 | 6 | ||
7 | #define USB_MAJOR 180 | 7 | #define USB_MAJOR 180 |
8 | #define USB_DEVICE_MAJOR 189 | 8 | #define USB_DEVICE_MAJOR 189 |
@@ -107,7 +107,8 @@ enum usb_interface_condition { | |||
107 | * @needs_remote_wakeup: flag set when the driver requires remote-wakeup | 107 | * @needs_remote_wakeup: flag set when the driver requires remote-wakeup |
108 | * capability during autosuspend. | 108 | * capability during autosuspend. |
109 | * @dev: driver model's view of this device | 109 | * @dev: driver model's view of this device |
110 | * @class_dev: driver model's class view of this device. | 110 | * @usb_dev: if an interface is bound to the USB major, this will point |
111 | * to the sysfs representation for that device. | ||
111 | * @pm_usage_cnt: PM usage counter for this interface; autosuspend is not | 112 | * @pm_usage_cnt: PM usage counter for this interface; autosuspend is not |
112 | * allowed unless the counter is 0. | 113 | * allowed unless the counter is 0. |
113 | * | 114 | * |
@@ -152,7 +153,7 @@ struct usb_interface { | |||
152 | unsigned needs_remote_wakeup:1; /* driver requires remote wakeup */ | 153 | unsigned needs_remote_wakeup:1; /* driver requires remote wakeup */ |
153 | 154 | ||
154 | struct device dev; /* interface specific device info */ | 155 | struct device dev; /* interface specific device info */ |
155 | struct class_device *class_dev; | 156 | struct device *usb_dev; /* pointer to the usb class's device, if any */ |
156 | int pm_usage_cnt; /* usage counter for autosuspend */ | 157 | int pm_usage_cnt; /* usage counter for autosuspend */ |
157 | }; | 158 | }; |
158 | #define to_usb_interface(d) container_of(d, struct usb_interface, dev) | 159 | #define to_usb_interface(d) container_of(d, struct usb_interface, dev) |
@@ -372,7 +373,7 @@ struct usb_device { | |||
372 | char *serial; /* iSerialNumber string, if present */ | 373 | char *serial; /* iSerialNumber string, if present */ |
373 | 374 | ||
374 | struct list_head filelist; | 375 | struct list_head filelist; |
375 | struct class_device *class_dev; | 376 | struct device *usbfs_dev; |
376 | struct dentry *usbfs_dentry; /* usbfs dentry entry for the device */ | 377 | struct dentry *usbfs_dentry; /* usbfs dentry entry for the device */ |
377 | 378 | ||
378 | /* | 379 | /* |
@@ -475,6 +476,8 @@ extern void usb_driver_release_interface(struct usb_driver *driver, | |||
475 | struct usb_interface *iface); | 476 | struct usb_interface *iface); |
476 | const struct usb_device_id *usb_match_id(struct usb_interface *interface, | 477 | const struct usb_device_id *usb_match_id(struct usb_interface *interface, |
477 | const struct usb_device_id *id); | 478 | const struct usb_device_id *id); |
479 | extern int usb_match_one_id(struct usb_interface *interface, | ||
480 | const struct usb_device_id *id); | ||
478 | 481 | ||
479 | extern struct usb_interface *usb_find_interface(struct usb_driver *drv, | 482 | extern struct usb_interface *usb_find_interface(struct usb_driver *drv, |
480 | int minor); | 483 | int minor); |
@@ -554,6 +557,18 @@ static inline int usb_endpoint_xfer_bulk(const struct usb_endpoint_descriptor *e | |||
554 | } | 557 | } |
555 | 558 | ||
556 | /** | 559 | /** |
560 | * usb_endpoint_xfer_control - check if the endpoint has control transfer type | ||
561 | * @epd: endpoint to be checked | ||
562 | * | ||
563 | * Returns true if the endpoint is of type control, otherwise it returns false. | ||
564 | */ | ||
565 | static inline int usb_endpoint_xfer_control(const struct usb_endpoint_descriptor *epd) | ||
566 | { | ||
567 | return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == | ||
568 | USB_ENDPOINT_XFER_CONTROL); | ||
569 | } | ||
570 | |||
571 | /** | ||
557 | * usb_endpoint_xfer_int - check if the endpoint has interrupt transfer type | 572 | * usb_endpoint_xfer_int - check if the endpoint has interrupt transfer type |
558 | * @epd: endpoint to be checked | 573 | * @epd: endpoint to be checked |
559 | * | 574 | * |
@@ -723,11 +738,21 @@ static inline int usb_endpoint_is_isoc_out(const struct usb_endpoint_descriptor | |||
723 | 738 | ||
724 | /* ----------------------------------------------------------------------- */ | 739 | /* ----------------------------------------------------------------------- */ |
725 | 740 | ||
741 | /* Stuff for dynamic usb ids */ | ||
726 | struct usb_dynids { | 742 | struct usb_dynids { |
727 | spinlock_t lock; | 743 | spinlock_t lock; |
728 | struct list_head list; | 744 | struct list_head list; |
729 | }; | 745 | }; |
730 | 746 | ||
747 | struct usb_dynid { | ||
748 | struct list_head node; | ||
749 | struct usb_device_id id; | ||
750 | }; | ||
751 | |||
752 | extern ssize_t usb_store_new_id(struct usb_dynids *dynids, | ||
753 | struct device_driver *driver, | ||
754 | const char *buf, size_t count); | ||
755 | |||
731 | /** | 756 | /** |
732 | * struct usbdrv_wrap - wrapper for driver-model structure | 757 | * struct usbdrv_wrap - wrapper for driver-model structure |
733 | * @driver: The driver-model core driver structure. | 758 | * @driver: The driver-model core driver structure. |
@@ -1086,7 +1111,6 @@ struct urb | |||
1086 | struct kref kref; /* reference count of the URB */ | 1111 | struct kref kref; /* reference count of the URB */ |
1087 | spinlock_t lock; /* lock for the URB */ | 1112 | spinlock_t lock; /* lock for the URB */ |
1088 | void *hcpriv; /* private data for host controller */ | 1113 | void *hcpriv; /* private data for host controller */ |
1089 | int bandwidth; /* bandwidth for INT/ISO request */ | ||
1090 | atomic_t use_count; /* concurrent submissions counter */ | 1114 | atomic_t use_count; /* concurrent submissions counter */ |
1091 | u8 reject; /* submissions will fail */ | 1115 | u8 reject; /* submissions will fail */ |
1092 | 1116 | ||
diff --git a/include/linux/usb/Kbuild b/include/linux/usb/Kbuild new file mode 100644 index 000000000000..43f160cfe003 --- /dev/null +++ b/include/linux/usb/Kbuild | |||
@@ -0,0 +1,5 @@ | |||
1 | unifdef-y += audio.h | ||
2 | unifdef-y += cdc.h | ||
3 | unifdef-y += ch9.h | ||
4 | unifdef-y += midi.h | ||
5 | |||
diff --git a/include/linux/usb_ch9.h b/include/linux/usb/ch9.h index c720d107ff29..ae7833749fa2 100644 --- a/include/linux/usb_ch9.h +++ b/include/linux/usb/ch9.h | |||
@@ -224,6 +224,7 @@ struct usb_device_descriptor { | |||
224 | #define USB_CLASS_CONTENT_SEC 0x0d /* content security */ | 224 | #define USB_CLASS_CONTENT_SEC 0x0d /* content security */ |
225 | #define USB_CLASS_VIDEO 0x0e | 225 | #define USB_CLASS_VIDEO 0x0e |
226 | #define USB_CLASS_WIRELESS_CONTROLLER 0xe0 | 226 | #define USB_CLASS_WIRELESS_CONTROLLER 0xe0 |
227 | #define USB_CLASS_MISC 0xef | ||
227 | #define USB_CLASS_APP_SPEC 0xfe | 228 | #define USB_CLASS_APP_SPEC 0xfe |
228 | #define USB_CLASS_VENDOR_SPEC 0xff | 229 | #define USB_CLASS_VENDOR_SPEC 0xff |
229 | 230 | ||
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h index 10f99e5f1a97..33dcd8576696 100644 --- a/include/linux/usb/serial.h +++ b/include/linux/usb/serial.h | |||
@@ -179,6 +179,9 @@ static inline void usb_set_serial_data (struct usb_serial *serial, void *data) | |||
179 | * memory structure allocation at this point in time. | 179 | * memory structure allocation at this point in time. |
180 | * @shutdown: pointer to the driver's shutdown function. This will be | 180 | * @shutdown: pointer to the driver's shutdown function. This will be |
181 | * called when the device is removed from the system. | 181 | * called when the device is removed from the system. |
182 | * @usb_driver: pointer to the struct usb_driver that controls this | ||
183 | * device. This is necessary to allow dynamic ids to be added to | ||
184 | * the driver from sysfs. | ||
182 | * | 185 | * |
183 | * This structure is defines a USB Serial driver. It provides all of | 186 | * This structure is defines a USB Serial driver. It provides all of |
184 | * the information that the USB serial core code needs. If the function | 187 | * the information that the USB serial core code needs. If the function |
@@ -202,6 +205,8 @@ struct usb_serial_driver { | |||
202 | 205 | ||
203 | struct list_head driver_list; | 206 | struct list_head driver_list; |
204 | struct device_driver driver; | 207 | struct device_driver driver; |
208 | struct usb_driver *usb_driver; | ||
209 | struct usb_dynids dynids; | ||
205 | 210 | ||
206 | int (*probe) (struct usb_serial *serial, const struct usb_device_id *id); | 211 | int (*probe) (struct usb_serial *serial, const struct usb_device_id *id); |
207 | int (*attach) (struct usb_serial *serial); | 212 | int (*attach) (struct usb_serial *serial); |
diff --git a/include/linux/usb_gadgetfs.h b/include/linux/usb_gadgetfs.h index b53d6ae8e55e..8086d5a9b94e 100644 --- a/include/linux/usb_gadgetfs.h +++ b/include/linux/usb_gadgetfs.h | |||
@@ -2,7 +2,7 @@ | |||
2 | #include <asm/types.h> | 2 | #include <asm/types.h> |
3 | #include <asm/ioctl.h> | 3 | #include <asm/ioctl.h> |
4 | 4 | ||
5 | #include <linux/usb_ch9.h> | 5 | #include <linux/usb/ch9.h> |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Filesystem based user-mode API to USB Gadget controller hardware | 8 | * Filesystem based user-mode API to USB Gadget controller hardware |