Re: [RFCv4 PATCH 01/13] usb: composite: add make_group and add_function operations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Andrzej Pietrasiewicz | 2012-11-22 13:06:55 [+0100]:

>Using configfs to create/configure a usb gadget requires
>providing a method to create config group for a usb function
>and a wrapper for usb_add_function.
>
>Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@xxxxxxxxxxx>
>Signed-off-by: Kyungmin Park <kyungmin.park@xxxxxxxxxxx>

Just a side note: The signed-off here should show the way patch has been
passed. Based on this it looks like you stopped working on it and passed
it over to Kyungmin. That is okay but since you are posting it I guess
it is the other way around.

>diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h
>index e84c754..5bac1f8 100644
>--- a/include/linux/usb/composite.h
>+++ b/include/linux/usb/composite.h
>@@ -39,6 +39,7 @@
> #include <linux/usb/ch9.h>
> #include <linux/usb/gadget.h>
> #include <linux/log2.h>
>+#include <linux/configfs.h>
> 
> /*
>  * USB function drivers should return USB_GADGET_DELAYED_STATUS if they
>@@ -146,6 +147,11 @@ struct usb_function {
> 	 * we can't restructure things to avoid mismatching.
> 	 * Related:  unbind() may kfree() but bind() won't...
> 	 */
>+	
>+	struct config_group *(*make_group)(struct config_group *parent,
>+					   const char *name);
>+	int (*add_function)(struct usb_configuration *c, struct usb_function *f,
>+			    struct config_item *item, void *data);

a wrapper? I though you pass the configfs root node and the function
will add all files / subdirectories. Why do we have two callbacks?

Sebastian
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux