[PATCH v4 08/16] usb/gadget: f_rndis: remove compatibility layer

2013-12-02 Thread Andrzej Pietrasiewicz
There are no old function interface users left, so the old interface can be removed. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- drivers/usb/gadget/f_rndis.c | 72

[PATCH v4 05/16] usb/gadget: g_ffs: convert to new interface of f_subset

2013-12-02 Thread Andrzej Pietrasiewicz
There is a new function interface of f_subset and g_ffs is the last to use the old one. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- drivers/usb/gadget/Kconfig |1 + drivers

[PATCH v4 02/16] usb/gadget: g_ffs: remove a reduntant gfs_ether_setup variable

2013-12-02 Thread Andrzej Pietrasiewicz
a comment to be consistent with the code. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- drivers/usb/gadget/g_ffs.c | 13 + 1 files changed, 5 insertions(+), 8

[PATCH v4 01/16] usb/gadget: configfs: allow setting function instance's name

2013-12-02 Thread Andrzej Pietrasiewicz
with the instance name. In a typical case, the struct usb_function_instance is embedded in a larger struct which is retrieved in set_inst_name() with container_of(), and the larger struct contains a field to store the instance name. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed

Re: [PATCH 1/8] usb/gadget: uvc: move descriptors to their only user

2013-11-29 Thread Andrzej Pietrasiewicz
Hi Laurent, hi Michael, W dniu 28.11.2013 22:59, Michael Grzeschik pisze: On Thu, Nov 28, 2013 at 10:53:03PM +0100, Laurent Pinchart wrote: On Thursday 28 November 2013 08:43:35 Andrzej Pietrasiewicz wrote: A bunch of descriptors is defined in webcam.c. They are used only by f_uvc. Move them

[PATCH 7/8] usb/gadget: f_uvc: use usb_gstrings_attach

2013-11-27 Thread Andrzej Pietrasiewicz
Attach strings to gadget with usb_strings_attach. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- drivers/usb/gadget/f_uvc.c | 29 - 1 files changed, 12 insertions(+), 17 deletions(-) diff --git

[PATCH 1/8] usb/gadget: uvc: move descriptors to their only user

2013-11-27 Thread Andrzej Pietrasiewicz
A bunch of descriptors is defined in webcam.c. They are used only by f_uvc. Move them to their only user. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- drivers/usb/gadget/f_uvc.c | 271

[PATCH 3/8] usb/gadget: uvc: separately compile some components of f_uvc

2013-11-27 Thread Andrzej Pietrasiewicz
Compile uvc_queue, uvc_v4l2, uvc_video separately so that later they can be all combined in a separately compiled f_uvc. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- drivers/usb/gadget/Makefile|2 +- drivers/usb

[PATCH 8/8] usb/gadget: f_uvc: add configfs support

2013-11-27 Thread Andrzej Pietrasiewicz
Add support for using uvc as a component of a composite gadget set up with configfs. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- Documentation/ABI/testing/configfs-usb-gadget-uvc | 11 + drivers/usb/gadget/Kconfig

[PATCH 5/8] usb/gadget: webcam: convert webcam to new interface of f_uvc

2013-11-27 Thread Andrzej Pietrasiewicz
Use the new function interface of f_uvc. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- drivers/usb/gadget/Kconfig |1 + drivers/usb/gadget/Makefile |4 +- drivers/usb/gadget/f_uvc.c |4 --- drivers/usb/gadget

[PATCH 6/8] usb/gadget: f_uvc: remove compatibility layer

2013-11-27 Thread Andrzej Pietrasiewicz
There are no users of the old interface left. Remove it. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- drivers/usb/gadget/f_uvc.c | 129 1 files changed, 0 insertions(+), 129

[PATCH 4/8] usb/gadget: f_uvc: convert f_uvc to new function interface

2013-11-27 Thread Andrzej Pietrasiewicz
Use the new function registration interface. It is required in order to integrate configfs support. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- drivers/usb/gadget/Kconfig |3 + drivers/usb/gadget/Makefile |2

[PATCH 2/8] usb/gadget: uvc: move module parameters from f_uvc

2013-11-27 Thread Andrzej Pietrasiewicz
When configfs support is integrated the future uvc function module must not take any parameters. Move parameters to webcam. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- drivers/usb/gadget/f_uvc.c | 27

Re: [PATCH v2 4/4] usb/gadget: f_sourcesink: add configfs support

2013-11-26 Thread Andrzej Pietrasiewicz
W dniu 26.11.2013 20:51, Felipe Balbi pisze: On Thu, Nov 07, 2013 at 08:41:28AM +0100, Andrzej Pietrasiewicz wrote: Add support for using the sourcesink function in gadgets composed with configfs. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park

Re: [PATCH 10/16] usb/gadget: FunctionFS: Remove VLAIS usage from gadget code

2013-11-11 Thread Andrzej Pietrasiewicz
W dniu 08.11.2013 16:38, Sebastian Andrzej Siewior pisze: On 11/08/2013 04:01 PM, Andrzej Pietrasiewicz wrote: Hello Sebastian, Hallo Andrzej, Please correct me if I'm wrong but I think it is not possible to use usb_gstrings_attach(). Basically, usb_gstrings_attach() requires struct

Re: [PATCH 10/16] usb/gadget: FunctionFS: Remove VLAIS usage from gadget code

2013-11-08 Thread Andrzej Pietrasiewicz
Hello Sebastian, thank you for review, please see inline W dniu 08.11.2013 09:02, Sebastian Andrzej Siewior pisze: On 10/23/2013 02:25 PM, Andrzej Pietrasiewicz wrote: diff --git a/drivers/usb/gadget/f_fs.c b/drivers/usb/gadget/f_fs.c index 0658908..9ccda73 100644 --- a/drivers/usb/gadget

Re: [PATCH 10/16] usb/gadget: FunctionFS: Remove VLAIS usage from gadget code

2013-11-08 Thread Andrzej Pietrasiewicz
W dniu 07.11.2013 19:28, Mark Charlebois pisze: On Sat, Nov 2, 2013 at 10:44 AM, Michal Nazarewicz min...@mina86.com mailto:min...@mina86.com wrote: On Wed, Oct 23 2013, Andrzej Pietrasiewicz wrote: From: Mark Charlebois charl...@gmail.com mailto:charl...@gmail.com

[PATCH v2 03/16] usb/gadget: g_ffs: convert to new interface of f_ecm

2013-11-06 Thread Andrzej Pietrasiewicz
There is a new funtion interface and g_ffs is the last gadget to use the old. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- drivers/usb/gadget/Kconfig |1 + drivers/usb

[PATCH v2 06/16] usb/gadget: f_subset: remove compatibility layer

2013-11-06 Thread Andrzej Pietrasiewicz
There are no old function interface users left, so the old interface can be removed. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- drivers/usb/gadget/f_subset.c | 60

[PATCH v2 05/16] usb/gadget: g_ffs: convert to new interface of f_subset

2013-11-06 Thread Andrzej Pietrasiewicz
There is a new function interface of f_subset and g_ffs is the last to use the old one. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- drivers/usb/gadget/Kconfig |1 + drivers

[PATCH v2 01/16] usb/gadget: configfs: allow setting function instance's name

2013-11-06 Thread Andrzej Pietrasiewicz
with the instance name. In a typical case, the struct usb_function_instance is embedded in a larger struct which is retrieved in set_inst_name() with container_of(), and the larger struct contains a field to store the instance name. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed

[PATCH v2 04/16] usb/gadget: f_ecm: remove compatibility layer

2013-11-06 Thread Andrzej Pietrasiewicz
There are no old function interface users left, so the old interface can be removed. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmim Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- drivers/usb/gadget/f_ecm.c | 73

[PATCH v2 00/16] Equivalent of g_ffs with configfs

2013-11-06 Thread Andrzej Pietrasiewicz
need to be closed and then the respective modules can be unloaded. TESTING THE FUNCTIONS (actually there is only one) = FunctionFS) device: connect the gadget, enable it host: mount the ptp device, adb shell Andrzej Pietrasiewicz (16): usb/gadget: configfs: allow setting

[PATCH v2 07/16] usb/gadget: g_ffs: convert to new interface of f_rndis

2013-11-06 Thread Andrzej Pietrasiewicz
There is a new interface of f_rndis and g_ffs is the last to use the old one. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- drivers/usb/gadget/Kconfig |1 + drivers/usb

[PATCH v2 02/16] usb/gadget: g_ffs: remove a reduntant gfs_ether_setup variable

2013-11-06 Thread Andrzej Pietrasiewicz
a comment to be consistent with the code. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- drivers/usb/gadget/g_ffs.c | 13 + 1 files changed, 5 insertions(+), 8

[PATCH v2 09/16] usb/gadget: rndis: merge u_rndis.ko with usb_f_rndis.ko

2013-11-06 Thread Andrzej Pietrasiewicz
The rndis function's users use only the new interface, so the two modules can be merged. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- drivers/usb/gadget/Kconfig |7

[PATCH v2 10/16] usb/gadget: FunctionFS: Remove VLAIS usage from gadget code

2013-11-06 Thread Andrzej Pietrasiewicz
kmalloc and kfree calls. This version uses group vs struct since it really is not a struct and is essentially a group of VLA in a common allocated block. This version also fixes the issues pointed out by Andrzej Pietrasiewicz and Michal Nazarewicz. Signed-off-by: Mark Charlebois charl...@gmail.com

[PATCH v2 11/16] usb/gadget: FunctionFS: create utility file

2013-11-06 Thread Andrzej Pietrasiewicz
A header file to be used by f_fs.c and g_ffs.c will be required when f_fs.c is converted into a module. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- drivers/usb/gadget/f_fs.c

[PATCH v2 12/16] usb/gadget: FunctionFS: add devices management code

2013-11-06 Thread Andrzej Pietrasiewicz
This will be required in order to use the new function interface (usb_get_function_instance/usb_put_function_instance) Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyunmgin Park kyungmin.p...@samsung.com --- drivers/usb/gadget/f_fs.c | 41

[PATCH v2 08/16] usb/gadget: f_rndis: remove compatibility layer

2013-11-06 Thread Andrzej Pietrasiewicz
There are no old function interface users left, so the old interface can be removed. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- drivers/usb/gadget/f_rndis.c | 72

[PATCH RESEND v2 00/16] Equivalent of g_ffs with configfs

2013-11-06 Thread Andrzej Pietrasiewicz
need to be closed and then the respective modules can be unloaded. TESTING THE FUNCTIONS (actually there is only one) = FunctionFS) device: connect the gadget, enable it host: mount the ptp device, adb shell Andrzej Pietrasiewicz (16): usb/gadget: configfs: allow setting

[PATCH RESEND v2 02/16] usb/gadget: g_ffs: remove a reduntant gfs_ether_setup variable

2013-11-06 Thread Andrzej Pietrasiewicz
a comment to be consistent with the code. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- drivers/usb/gadget/g_ffs.c | 13 + 1 files changed, 5 insertions(+), 8

[PATCH RESEND v2 05/16] usb/gadget: g_ffs: convert to new interface of f_subset

2013-11-06 Thread Andrzej Pietrasiewicz
There is a new function interface of f_subset and g_ffs is the last to use the old one. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- drivers/usb/gadget/Kconfig |1 + drivers

[PATCH RESEND v2 03/16] usb/gadget: g_ffs: convert to new interface of f_ecm

2013-11-06 Thread Andrzej Pietrasiewicz
There is a new funtion interface and g_ffs is the last gadget to use the old. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- drivers/usb/gadget/Kconfig |1 + drivers/usb

[PATCH RESEND v2 16/16] usb/gadget: FunctionFS: add configfs support

2013-11-06 Thread Andrzej Pietrasiewicz
Add support for using FunctionFS in configfs-based USB gadgets. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- Documentation/ABI/testing/configfs-usb-gadget-ffs |9 ++ drivers

[PATCH RESEND v2 13/16] usb/gadget: FunctionFS: convert to new function interface with backward compatibility

2013-11-06 Thread Andrzej Pietrasiewicz
This is required in order to integrate configfs support. f_fs needs to be a separately compiled module and so it needs to use the new interface. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min

[PATCH RESEND v2 04/16] usb/gadget: f_ecm: remove compatibility layer

2013-11-06 Thread Andrzej Pietrasiewicz
There are no old function interface users left, so the old interface can be removed. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmim Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- drivers/usb/gadget/f_ecm.c | 73

[PATCH RESEND v2 01/16] usb/gadget: configfs: allow setting function instance's name

2013-11-06 Thread Andrzej Pietrasiewicz
with the instance name. In a typical case, the struct usb_function_instance is embedded in a larger struct which is retrieved in set_inst_name() with container_of(), and the larger struct contains a field to store the instance name. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed

[PATCH RESEND v2 10/16] usb/gadget: FunctionFS: Remove VLAIS usage from gadget code

2013-11-06 Thread Andrzej Pietrasiewicz
kmalloc and kfree calls. This version uses group vs struct since it really is not a struct and is essentially a group of VLA in a common allocated block. This version also fixes the issues pointed out by Andrzej Pietrasiewicz and Michal Nazarewicz. Signed-off-by: Mark Charlebois charl...@gmail.com

[PATCH RESEND v2 12/16] usb/gadget: FunctionFS: add devices management code

2013-11-06 Thread Andrzej Pietrasiewicz
This will be required in order to use the new function interface (usb_get_function_instance/usb_put_function_instance) Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- drivers/usb/gadget/f_fs.c | 41

[PATCH RESEND v2 14/16] usb/gadget: g_ffs: convert to new interface of f_fs

2013-11-06 Thread Andrzej Pietrasiewicz
Prepare for configfs integration. Use the new interface so that f_fs can be made a module. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- drivers/usb/gadget/Kconfig |1 + drivers/usb/gadget/g_ffs.c | 135

[PATCH RESEND v2 15/16] usb/gadget: FunctionFS: Remove compatibility layer

2013-11-06 Thread Andrzej Pietrasiewicz
There are no old function interface users left, so the old interface can be removed. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- drivers/usb/gadget/f_fs.c | 148

[PATCH RESEND v2 09/16] usb/gadget: rndis: merge u_rndis.ko with usb_f_rndis.ko

2013-11-06 Thread Andrzej Pietrasiewicz
The rndis function's users use only the new interface, so the two modules can be merged. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- drivers/usb/gadget/Kconfig |7

[PATCH RESEND v2 11/16] usb/gadget: FunctionFS: create utility file

2013-11-06 Thread Andrzej Pietrasiewicz
A header file to be used by f_fs.c and g_ffs.c will be required when f_fs.c is converted into a module. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- drivers/usb/gadget/f_fs.c

[PATCH RESEND v2 06/16] usb/gadget: f_subset: remove compatibility layer

2013-11-06 Thread Andrzej Pietrasiewicz
There are no old function interface users left, so the old interface can be removed. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- drivers/usb/gadget/f_subset.c | 60

[PATCH RESEND v2 08/16] usb/gadget: f_rndis: remove compatibility layer

2013-11-06 Thread Andrzej Pietrasiewicz
There are no old function interface users left, so the old interface can be removed. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- drivers/usb/gadget/f_rndis.c | 72

[PATCH RESEND v2 07/16] usb/gadget: g_ffs: convert to new interface of f_rndis

2013-11-06 Thread Andrzej Pietrasiewicz
There is a new interface of f_rndis and g_ffs is the last to use the old one. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- drivers/usb/gadget/Kconfig |1 + drivers/usb

[PATCH v2 2/4] usb/gadget: factor out alloc_ep_req

2013-11-06 Thread Andrzej Pietrasiewicz
alloc_ep_req() is a function repeated in several modules. Make a common implementation and use it. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- drivers/usb/gadget/Makefile

[PATCH v2 3/4] usb/gadget: f_loopback: add configfs support

2013-11-06 Thread Andrzej Pietrasiewicz
Add support for using the loopback USB function in gadgets composed with configfs. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- .../ABI/testing/configfs-usb-gadget-loopback |8 ++ drivers/usb/gadget/Kconfig

[PATCH v2 1/4] usb/gadget: composite: redirect setup requests

2013-11-06 Thread Andrzej Pietrasiewicz
, but with configfs it is not possible to specify config drivers. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- drivers/usb/gadget/composite.c | 16 +++- 1 files changed, 15 insertions(+), 1 deletions(-) diff --git a/drivers/usb

[PATCH v2 4/4] usb/gadget: f_sourcesink: add configfs support

2013-11-06 Thread Andrzej Pietrasiewicz
Add support for using the sourcesink function in gadgets composed with configfs. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- .../ABI/testing/configfs-usb-gadget-sourcesink | 12 + drivers/usb/gadget/Kconfig

[PATCH v2 0/4] Equivalent of g_zero with configfs

2013-11-06 Thread Andrzej Pietrasiewicz
: run the gadget host: test-usb http://www.linux-usb.org/usbtest/testusb.c The results should be the same as with the g_zero.ko. Andrzej Pietrasiewicz (4): usb/gadget: composite: redirect setup requests usb/gadget: factor out alloc_ep_req usb/gadget: f_loopback: add configfs support usb

[PATCH 1/4] usb/gadget: composite: redirect setup requests

2013-11-04 Thread Andrzej Pietrasiewicz
, but with configfs it is not possible to specify config drivers. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- drivers/usb/gadget/composite.c | 17 - 1 files changed, 16 insertions(+), 1 deletions(-) diff --git a/drivers/usb

[PATCH 3/4] usb/gadget: f_loopback: add configfs support

2013-11-04 Thread Andrzej Pietrasiewicz
Add support for using the loopback USB function in gadgets composed with configfs. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- .../ABI/testing/configfs-usb-gadget-loopback |8 ++ drivers/usb/gadget/Kconfig

[PATCH 2/4] usb/gadget: factor out alloc_ep_req

2013-11-04 Thread Andrzej Pietrasiewicz
alloc_ep_req() is a function repeated in several modules. Make a common implementation and use it. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- drivers/usb/gadget/Makefile |2 +- drivers/usb/gadget/f_hid.c

[PATCH 4/4] usb/gadget: f_sourcesink: add configfs support

2013-11-04 Thread Andrzej Pietrasiewicz
Add support for using the sourcesink function in gadgets composed with configfs. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- .../ABI/testing/configfs-usb-gadget-sourcesink | 12 + drivers/usb/gadget/Kconfig

[PATCH 0/4] Equivalent of g_zero with configfs

2013-11-04 Thread Andrzej Pietrasiewicz
. Andrzej Pietrasiewicz (4): usb/gadget: composite: redirect setup requests usb/gadget: factor out alloc_ep_req usb/gadget: f_loopback: add configfs support usb/gadget: f_sourcesink: add configfs support .../ABI/testing/configfs-usb-gadget-loopback |8 + .../ABI/testing/configfs-usb

about libusbg (formerly libgadget)

2013-11-04 Thread Andrzej Pietrasiewicz
Hi Matt, Thank you for the library: http://thread.gmane.org/gmane.linux.kernel/1556137 I'd like to make some comments you might want to consider. I don't like too much the idea of hardcoding the set of available functions. When new functions' conversions to use configfs are available (or

[PATCH][bugfix] usb/gadget: f_mass_storage: fix mass storage dependency

2013-11-04 Thread Andrzej Pietrasiewicz
Legacy gadgets supporting mass storage (g_mass_storage, g_acm_ms, g_multi) all depend on BLOCK. Make the standalone compilation of f_mass_storage (without any legacy gadget) dependent no BLOCK, too. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park

Re: [PATCH 1/2] Moved mkdir functions, added MAX_LENGHT MAX_PATH_LENGHT

2013-11-04 Thread Andrzej Pietrasiewicz
W dniu 04.11.2013 14:55, Stanislaw Wadas pisze: mkdir() function are now called after successfull function creation. Added inline to gadget_write_string(). 256 hard coded value has been replaced by two defined constants MAX_LENGHT and MAX_PATH_LENGHT LENGHT - LENGTH Change-Id:

[PATCH][bugfix] usb/gadget: f_mass_storage: use string literal as format in dev_set_name

2013-10-25 Thread Andrzej Pietrasiewicz
Fix commit b27c08c953e994f792a03d9b7cbc5cf3f9844135 where dev_set_name() is used without a string literal as format. Reported-by: Fengguang Wu fengguang...@intel.com Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- drivers/usb

[PATCH 01/16] usb/gadget: configfs: allow setting function instance's name

2013-10-23 Thread Andrzej Pietrasiewicz
with the instance name. In a typical case, the struct usb_function_instance is embedded in a larger struct which is retrieved in set_inst_name() with container_of(), and the larger struct contains a field to store the instance name. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed

[PATCH 04/16] usb/gadget: f_ecm: remove compatibility layer

2013-10-23 Thread Andrzej Pietrasiewicz
There are no old function interface users left, so the old interface can be removed. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmim Park kyungmin.p...@samsung.com --- drivers/usb/gadget/f_ecm.c | 73 +- drivers/usb

[PATCH 11/16] usb/gadget: FunctionFS: create utility file

2013-10-23 Thread Andrzej Pietrasiewicz
A header file to be used by f_fs.c and g_ffs.c will be required when f_fs.c is converted into a module. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- drivers/usb/gadget/f_fs.c |1 + drivers/usb/gadget/g_ffs.c | 19

[PATCH 06/16] usb/gadget: f_subset: remove compatibility layer

2013-10-23 Thread Andrzej Pietrasiewicz
There are no old function interface users left, so the old interface can be removed. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- drivers/usb/gadget/f_subset.c | 60 + drivers/usb

[PATCH 02/16] usb/gadget: g_ffs: remove a reduntant gfs_ether_setup variable

2013-10-23 Thread Andrzej Pietrasiewicz
a comment to be consistent with the code. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- drivers/usb/gadget/g_ffs.c | 13 + 1 files changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/usb/gadget/g_ffs.c

[PATCH 05/16] usb/gadget: g_ffs: convert to new interface of f_subset

2013-10-23 Thread Andrzej Pietrasiewicz
There is a new function interface of f_subset and g_ffs is the last to use the old one. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- drivers/usb/gadget/Kconfig |1 + drivers/usb/gadget/g_ffs.c | 69

[PATCH 09/16] usb/gadget: rndis: merge u_rndis.ko with usb_f_rndis.ko

2013-10-23 Thread Andrzej Pietrasiewicz
The rndis function's users use only the new interface, so the two modules can be merged. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- drivers/usb/gadget/Kconfig |7 --- drivers/usb/gadget/Makefile |4

[PATCH 08/16] usb/gadget: f_rndis: remove compatibility layer

2013-10-23 Thread Andrzej Pietrasiewicz
There are no old function interface users left, so the old interface can be removed. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- drivers/usb/gadget/f_rndis.c | 72 +- drivers/usb

[PATCH 12/16] usb/gadget: FunctionFS: add devices management code

2013-10-23 Thread Andrzej Pietrasiewicz
This will be required in order to use the new function interface (usb_get_function_instance/usb_put_function_instance) Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyunmgin Park kyungmin.p...@samsung.com --- drivers/usb/gadget/f_fs.c | 41

[PATCH 10/16] usb/gadget: FunctionFS: Remove VLAIS usage from gadget code

2013-10-23 Thread Andrzej Pietrasiewicz
macros. The previous patch required multiple kmalloc and kfree calls. This version uses group vs struct since it really is not a struct and is essentially a group of VLA in a common allocated block. This version also fixes the issues pointed out by Andrzej Pietrasiewicz. Signed-off-by: Mark Charlebois

[PATCH 03/16] usb/gadget: g_ffs: convert to new interface of f_ecm

2013-10-23 Thread Andrzej Pietrasiewicz
There is a new funtion interface and g_ffs is the last gadget to use the old. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- drivers/usb/gadget/Kconfig |1 + drivers/usb/gadget/g_ffs.c | 94

[PATCH 07/16] usb/gadget: g_ffs: convert to new interface of f_rndis

2013-10-23 Thread Andrzej Pietrasiewicz
There is a new interface of f_rndis and g_ffs is the last to use the old one. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- drivers/usb/gadget/Kconfig |1 + drivers/usb/gadget/g_ffs.c | 105

[PATCH 14/16] usb/gadget: g_ffs: convert to new interface of f_fs

2013-10-23 Thread Andrzej Pietrasiewicz
Prepare for configfs integration. Use the new interface so that f_fs can be made a module. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- drivers/usb/gadget/Kconfig |1 + drivers/usb/gadget/g_ffs.c | 138

[PATCH 15/16] usb/gadget: FunctionFS: Remove compatibility layer

2013-10-23 Thread Andrzej Pietrasiewicz
There are no old function interface users left, so the old interface can be removed. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- drivers/usb/gadget/f_fs.c | 148 +--- drivers/usb

[PATCH 16/16] usb/gadget: FunctionFS: add configfs support

2013-10-23 Thread Andrzej Pietrasiewicz
Add support for using FunctionFS in configfs-based USB gadgets. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- Documentation/ABI/testing/configfs-usb-gadget-ffs |9 ++ drivers/usb/gadget/f_fs.c

[PATCH 13/16] usb/gadget: FunctionFS: convert to new function interface with backward compatibility

2013-10-23 Thread Andrzej Pietrasiewicz
This is required in order to integrate configfs support. f_fs needs to be a separately compiled module and so it needs to use the new interface. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- drivers/usb/gadget/Kconfig

[PATCH] usb/gadget: f_mass_storage: style corrections, cleanup simplification

2013-10-16 Thread Andrzej Pietrasiewicz
Fix spacing, improve error code returned, remove unused #define, use strtobool() instead of kstrtou8(). Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- Hi Felipe, These are corrections after Michal's review. I did post

[PATCH v2 1/2] usb/gadget: storage_common: use strtobool instead of kstrtouint

2013-10-15 Thread Andrzej Pietrasiewicz
strtobool is more flexible for the user and is more appropriate in the context. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- drivers/usb/gadget/storage_common.c | 16

[PATCH v2 0/2] Fixes for mass_storage

2013-10-15 Thread Andrzej Pietrasiewicz
review; thanks Michal! - added a comment for a function requiring a semaphore - simplified error recovery paths in fsg_store_ro() and fsg_store_cdrom() Andrzej Pietrasiewicz (2): usb/gadget: storage_common: use strtobool instead of kstrtouint usb/gadget: storage_common: pass filesem

[PATCH v2 2/2] usb/gadget: storage_common: pass filesem to fsg_store_cdrom

2013-10-15 Thread Andrzej Pietrasiewicz
If cdrom flag is set ro flag is implied. Try setting the ro first, and only if it succeeds set the cdrom flag. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- drivers/usb/gadget

Re: [PATCH 0/2] Fixes for mass_storage

2013-10-15 Thread Andrzej Pietrasiewicz
W dniu 15.10.2013 00:48, Felipe Balbi pisze: Hi, On Mon, Oct 14, 2013 at 11:21:45AM +0200, Andrzej Pietrasiewicz wrote: A short series to fix 2 issues: - use strtobool instead of kstrtouint with base 2 for: ro, nofua, cdrom, removable attrs (better fits the context and more flexible to users

Re: [PATCH v6 14/14] usb/gadget: f_mass_storage: add configfs support

2013-10-15 Thread Andrzej Pietrasiewicz
W dniu 14.10.2013 22:39, Michal Nazarewicz pisze: I generally agree, but please see inline. I will post the corrected patch as a reply to this thread. On Wed, Oct 09 2013, Andrzej Pietrasiewicz andrze...@samsung.com wrote: From this commit on f_mass_storage is available through configfs

[PATCH v6 resend 14/14] usb/gadget: f_mass_storage: add configfs support

2013-10-15 Thread Andrzej Pietrasiewicz
From this commit on f_mass_storage is available through configfs. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- .../ABI/testing/configfs-usb-gadget-mass-storage | 31

[PATCH 2/2] usb/gadget: storage_common: pass filesem to fsg_store_cdrom

2013-10-14 Thread Andrzej Pietrasiewicz
If cdrom flag is set ro flag is implied. Try setting the ro first, and only if it succeeds set the cdrom flag. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- drivers/usb/gadget/f_mass_storage.c |7 - drivers/usb

[PATCH 0/2] Fixes for mass_storage

2013-10-14 Thread Andrzej Pietrasiewicz
A short series to fix 2 issues: - use strtobool instead of kstrtouint with base 2 for: ro, nofua, cdrom, removable attrs (better fits the context and more flexible to users) - setting a lun to be cdrom implies read-only and succeeds only if the lun is not open Andrzej Pietrasiewicz (2): usb

[PATCH 1/2] usb/gadget: storage_common: use strtobool instead of kstrtouint

2013-10-14 Thread Andrzej Pietrasiewicz
strtobool is more flexible for the user and is more appropriate in the context. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- drivers/usb/gadget/storage_common.c | 16 1 files changed, 8 insertions(+), 8

Re: [PATCH v6 13/14] usb/gadget: storage_common: add methods to show/store 'cdrom' and 'removable'

2013-10-11 Thread Andrzej Pietrasiewicz
W dniu 10.10.2013 20:05, Michal Nazarewicz pisze: On Wed, Oct 09 2013, Andrzej Pietrasiewicz wrote: This will be required by configfs integration. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungin Park kyungmin.p...@samsung.com --- drivers/usb/gadget

[PATCH v6 08/14] usb/gadget: f_mass_storage: create fsg_common_set_inquiry_string for use in fsg_common_init

2013-10-09 Thread Andrzej Pietrasiewicz
fsg_common_init is a lengthy function. Factor a portion of it out. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- drivers/usb/gadget/f_mass_storage.c | 29

[PATCH v6 09/14] usb/gadget: f_mass_storage: create fsg_common_run_thread for use in fsg_common_init

2013-10-09 Thread Andrzej Pietrasiewicz
fsg_common_init is a lengthy function. Factor a portion of it out. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- drivers/usb/gadget/f_mass_storage.c | 32

[PATCH v6 06/14] usb/gadget: f_mass_storage: create fsg_common_set_cdev for use in fsg_common_init

2013-10-09 Thread Andrzej Pietrasiewicz
fsg_common_init is a lengthy function. Factor a portion of it out. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- drivers/usb/gadget/f_mass_storage.c | 50

[PATCH v6 12/14] usb/gadget: storage_common: make attribute operations more generic

2013-10-09 Thread Andrzej Pietrasiewicz
Show/store methods for sysfs attributes contain code which can be used also by configfs. Make them abstract the source the lun and rw_semaphore are taken from. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- drivers/usb/gadget

[PATCH v6 11/14] usb/gadget: mass_storage: convert to new interface of f_mass_storage

2013-10-09 Thread Andrzej Pietrasiewicz
Convert old mass_storage gadget to use the new interface of f_mass_storage so that later the compatibility layer in f_mass_storage can be removed. struct fsg_common is not known to mass_storage.c, so a setter method is added to f_mass_storage. Signed-off-by: Andrzej Pietrasiewicz andrze

[PATCH v6 05/14] usb/gadget: f_mass_storage: create lun handling helpers for use in fsg_common_init

2013-10-09 Thread Andrzej Pietrasiewicz
fsg_common_init is a lengthy function. Factor portions of it out. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- drivers/usb/gadget/f_mass_storage.c | 80

[PATCH v6 10/14] usb/gadget: f_mass_storage: convert to new function interface with backward compatibility

2013-10-09 Thread Andrzej Pietrasiewicz
is provided by means of a preprocessor conditional directives. After all users are converted, the old interface can be removed. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- drivers

[PATCH v6 07/14] usb/gadget: f_mass_storage: create lun creation helpers for use in fsg_common_init

2013-10-09 Thread Andrzej Pietrasiewicz
fsg_common_init is a lengthy function. Factor portions of it out. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- drivers/usb/gadget/f_mass_storage.c | 238

[PATCH v6 03/14] usb/gadget: f_mass_storage: create fsg_common_setup for use in fsg_common_init

2013-10-09 Thread Andrzej Pietrasiewicz
fsg_common_init is a lengthy function. Factor a portion of it out. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- drivers/usb/gadget/f_mass_storage.c | 40

[PATCH v6 13/14] usb/gadget: storage_common: add methods to show/store 'cdrom' and 'removable'

2013-10-09 Thread Andrzej Pietrasiewicz
This will be required by configfs integration. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungin Park kyungmin.p...@samsung.com --- drivers/usb/gadget/storage_common.c | 42 +++ drivers/usb/gadget/storage_common.h |5 2

[PATCH v6 04/14] usb/gadget: f_mass_storage: create fsg_common_set_num_buffers for use in fsg_common_init

2013-10-09 Thread Andrzej Pietrasiewicz
fsg_common_init is a lengthy function. Factor a portion of it out. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- drivers/usb/gadget/f_mass_storage.c | 72

[PATCH v6 02/14] usb/gadget: f_mass_storage: make sysfs interface optional

2013-10-09 Thread Andrzej Pietrasiewicz
in struct fsg_lun. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- drivers/usb/gadget/f_mass_storage.c | 51 --- drivers/usb/gadget/f_mass_storage.h |2

<    2   3   4   5   6   7   8   9   10   11   >