public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [RFC] Added USB_DEVICE_INTERFACE_PROTOCOL
@ 2007-05-02 15:03 Jan Kratochvil
  2007-05-02 22:04 ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Kratochvil @ 2007-05-02 15:03 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Dmitry Torokhov
  Cc: linux-input, linux-usb-devel, linux-kernel, Jiri Kosina

The USB_DEVICE_INTERFACE_PROTOCOL will allow to match one interface
protocol of vendor specific device.
This macro is used in patch adding support for xbox360 to xpad.c

Signed-off-by: Jan Kratochvil <honza@jikos.cz>
---
 include/linux/usb.h |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/include/linux/usb.h b/include/linux/usb.h
index cfbd2bb..84e2330 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -729,6 +729,21 @@ static inline int usb_endpoint_is_isoc_out(const struct usb_endpoint_descriptor
 	.bcdDevice_lo = (lo), .bcdDevice_hi = (hi)
 
 /**
+ * USB_DEVICE_INTERFACE_PROTOCOL - macro used to describe a usb 
+ *		device with a specific interface protocol
+ * @vend: the 16 bit USB Vendor ID
+ * @prod: the 16 bit USB Product ID
+ * @pr: bInterfaceProtocol value
+ *
+ * This macro is used to create a struct usb_device_id that matches a
+ * specific interface protocol of devices.
+ */
+#define USB_DEVICE_INTERFACE_PROTOCOL(vend,prod,pr) \
+	.match_flags = USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_INT_PROTOCOL, \
+	.idVendor = (vend), \
+	.idProduct = (prod), \
+	.bInterfaceProtocol = (pr)
+/**
  * USB_DEVICE_INFO - macro used to describe a class of usb devices
  * @cl: bDeviceClass value
  * @sc: bDeviceSubClass value
-- 
1.5.0.6



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] [RFC] Added USB_DEVICE_INTERFACE_PROTOCOL
  2007-05-02 15:03 [PATCH] [RFC] Added USB_DEVICE_INTERFACE_PROTOCOL Jan Kratochvil
@ 2007-05-02 22:04 ` Greg KH
  2007-05-03  2:56   ` Dmitry Torokhov
  0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2007-05-02 22:04 UTC (permalink / raw)
  To: Jan Kratochvil
  Cc: Dmitry Torokhov, linux-input, linux-usb-devel, linux-kernel,
	Jiri Kosina

On Wed, May 02, 2007 at 05:03:05PM +0200, Jan Kratochvil wrote:
> The USB_DEVICE_INTERFACE_PROTOCOL will allow to match one interface
> protocol of vendor specific device.
> This macro is used in patch adding support for xbox360 to xpad.c
> 
> Signed-off-by: Jan Kratochvil <honza@jikos.cz>

I have no objection to this, other than you need an additional newline
after the #define :)

Dmitry, I can take this through my tree, or you can take it through
yours, as I think the other patches in this series depend on this.

If you want to take it through yours, feel free to add:
	Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

to it.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] [RFC] Added USB_DEVICE_INTERFACE_PROTOCOL
  2007-05-02 22:04 ` Greg KH
@ 2007-05-03  2:56   ` Dmitry Torokhov
  0 siblings, 0 replies; 3+ messages in thread
From: Dmitry Torokhov @ 2007-05-03  2:56 UTC (permalink / raw)
  To: linux-input
  Cc: Greg KH, Jan Kratochvil, linux-usb-devel, linux-kernel,
	Jiri Kosina

On Wednesday 02 May 2007 18:04, Greg KH wrote:
> On Wed, May 02, 2007 at 05:03:05PM +0200, Jan Kratochvil wrote:
> > The USB_DEVICE_INTERFACE_PROTOCOL will allow to match one interface
> > protocol of vendor specific device.
> > This macro is used in patch adding support for xbox360 to xpad.c
> > 
> > Signed-off-by: Jan Kratochvil <honza@jikos.cz>
> 
> I have no objection to this, other than you need an additional newline
> after the #define :)
> 
> Dmitry, I can take this through my tree, or you can take it through
> yours, as I think the other patches in this series depend on this.
> 
> If you want to take it through yours, feel free to add:
> 	Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
> 

I will grab it once some issues with the patch set are resolved.

Thanks,

-- 
Dmitry

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-05-03  2:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-02 15:03 [PATCH] [RFC] Added USB_DEVICE_INTERFACE_PROTOCOL Jan Kratochvil
2007-05-02 22:04 ` Greg KH
2007-05-03  2:56   ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox