Hi Oliver,
On 02/29/2016 08:34 AM, Felipe Balbi wrote:
>
> Hi,
>
> Olivier Schonken writes:
>> Hope I'm not raising an issue which actually is my own stupidity.
>>
>> I recently upstreamed my embedded Linux kernel to version 4.4, after which
>> I started
PTH_n), as specified during
coreConsultant configuration."
That means, that we have to setup only FIFO start addresses (DPTxFStAddr),
taking into account reset values of DPTxFSize.
Initialize FIFO start addresses properly and remove unneeded core related
to incorrect FIFO size initialization.
Signed-off-
In context of FIFO registers we use ep->fifo_index instead of ep->index.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drivers/usb/dwc2/gadget.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/ga
Hello,
This patch series fixes TX FIFO handling in UDC part of DWC2 driver.
It gets rid of few bugs, improves compliance with DWC2 documentation
and cleanes up driver code. More detailed description is provided in
commit messages.
Best regards,
Robert Baldyga
Changelog:
v2:
- Addressed
As kill_all_requests() potentially flushes TX FIFO, we should should
free FIFO after calling it. Otherwise FIFO could stay unflushed properly.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drivers/usb/dwc2/gadget.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
Generate descriptors in new format and attach them to USB function in
prep_descs(). Change set_alt() implementation and implement clear_alt()
operation. Remove boilerplate code.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drivers/usb/gadget/function/f_mass_storage.
As we have automatic endpoint state handling it's no longer needed.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drivers/usb/gadget/function/u_serial.c | 16
1 file changed, 16 deletions(-)
diff --git a/drivers/usb/gadget/function/u_serial.c
b/drivers/usb/
automatically by composite framwework. Remove boilerplate
code.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drivers/usb/gadget/function/f_uvc.c | 478
drivers/usb/gadget/function/uvc.h | 3 -
2 files changed, 160 insertions(+), 321 del
Fixes: 76e0da34c7cec5a7dc94667326a948de2e9c8c8d
("usb-gadget/uvc: use per-attribute show and store methods")
s/aname/cname - 'cname' was originally used as an attribute name,
because UVCG_OPTS_ATTR() macro doesn't have 'aname' parameter.
Signed-off-by: Robert Baldy
Update documentation to reflect changes in UVC configfs interface.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
Documentation/ABI/testing/configfs-usb-gadget-uvc | 39 ---
Documentation/usb/gadget-testing.txt | 18 +++
2 files chang
As we have automatic endpoint state handling it's no longer needed.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drivers/usb/gadget/function/u_ether.c | 28 ++--
1 file changed, 2 insertions(+), 26 deletions(-)
diff --git a/drivers/usb/gadget/fu
Generate descriptors in new format and attach them to USB function in
prep_descs(). Implement prep_vendor_descs() to supply class specific
descriptors. Change set_alt() implementation and implement clear_alt()
operation. Remove boilerplate code.
Signed-off-by: Robert Baldyga <r.b
So far USB requests allocated in hidg_set_alt() were not freed. Now we
free them in case of hidg_set_alt() failure (when we are not able to
allocate and enqueue all the requests) or in hidg_disable() function.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drivers/usb/gadget/fu
.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drivers/usb/gadget/composite.c | 162 +
include/linux/usb/composite.h | 3 +
2 files changed, 165 insertions(+)
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index 3
some class or vendor specific setup requests.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drivers/usb/gadget/composite.c | 19 +++
include/linux/usb/composite.h | 2 ++
2 files changed, 21 insertions(+)
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/
-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drivers/usb/gadget/function/f_sourcesink.c | 63 --
1 file changed, 51 insertions(+), 12 deletions(-)
diff --git a/drivers/usb/gadget/function/f_sourcesink.c
b/drivers/usb/gadget/function/f_sourcesink.c
index e
Generate descriptors in new format and attach them to USB function in
prep_descs(). Implement prep_vendor_descs() to supply class specific
descriptors. Change set_alt() implementation and implement clear_alt()
operation. Remove boilerplate code.
Signed-off-by: Robert Baldyga <r.b
Generate descriptors in new format and attach them to USB function in
prep_descs(). Implement prep_vendor_descs() to supply class specific
descriptors. Change set_alt() implementation and implement clear_alt()
operation. Remove boilerplate code.
Signed-off-by: Robert Baldyga <r.b
Generate descriptors in new format and attach them to USB function in
prep_descs(). Change set_alt() implementation and implement clear_alt()
operation. Remove boilerplate code.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drivers/usb/gadget/function/f_serial.c
Generate descriptors in new format and attach them to USB function in
prep_descs(). Implement prep_vendor_descs() to supply class specific
descriptors. Change set_alt() implementation and implement clear_alt()
operation. Remove boilerplate code.
Signed-off-by: Robert Baldyga <r.b
function bound.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drivers/usb/gadget/function/f_sourcesink.c | 98 --
drivers/usb/gadget/function/g_zero.h | 3 +
drivers/usb/gadget/legacy/zero.c | 6 ++
3 files changed, 76 insertions(
. I can send them as RFC to show what is final result
which I want to achieve.
Best regards,
Robert Baldyga
Changelog:
v4:
- Added 7 new patches
- Few minor fixes
v3: https://lkml.org/lkml/2015/12/11/311
- Fixed handling of vendor specific descriptor attached to endpoint
- Added 6 new patches convert
, because we now store information about
endpoints, allows us to handle endpoint state inside composite framework,
and in result remove lots of boilerplate code from USB functions.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
include/linux/usb/composite.h
-by: Robert Baldyga <r.bald...@samsung.com>
---
drivers/usb/gadget/function/f_loopback.c | 58 +---
1 file changed, 23 insertions(+), 35 deletions(-)
diff --git a/drivers/usb/gadget/function/f_loopback.c
b/drivers/usb/gadget/function/f_loopback.c
index ddc3aad..f
As usb_gstrings_attach() failure can happen when some USB functions are
are already added to some configurations (in previous loop iterations),
we should always call purge_configs_funcs() to be sure that failure is
be handled properly.
Signed-off-by: Robert Baldyga <r.bald...@samsung.
nal spinlock protecting deactivation
counter.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drivers/usb/gadget/composite.c | 9 +
include/linux/usb/composite.h | 1 +
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/gadget/composite.c b/dr
Since FIFO is always freed in dwc2_hsotg_ep_disable(), ep->fifo_index
is always 0 in dwc2_hsotg_ep_enable(), hence code inside if() block is
never executed.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drivers/usb/dwc2/gadget.c | 13 +
1 file changed, 1 inserti
Since we handle FIFOs and endpoint separately, using variable named 'ep'
in context of FIFO is misleading, hence we rename it to 'fifo'.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drivers/usb/dwc2/gadget.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff
Generate descriptors in new format and attach them to USB function in
prep_descs(). Implement prep_vendor_descs() to supply class specific
descriptors. Change set_alt() implementation and implement clear_alt()
operation. Remove boilerplate code.
Signed-off-by: Robert Baldyga <r.b
Generate descriptors in new format and attach them to USB function in
prep_descs(). Implement prep_vendor_descs() to supply class specific
descriptors. Change set_alt() implementation and implement clear_alt()
operation. Remove boilerplate code.
Signed-off-by: Robert Baldyga <r.b
Generate descriptors in new format and attach them to USB function in
prep_descs(). Implement prep_vendor_descs() to supply class specific
descriptors. Change set_alt() implementation and implement clear_alt()
operation. Remove boilerplate code.
Signed-off-by: Robert Baldyga <r.b
code. Change USB request lifetime management - now
it's allocated in set_alt() and freed in clear_alt().
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drivers/usb/gadget/function/f_ecm.c | 321 +++-
1 file changed, 92 insertions(+), 229 deletions(-)
.
Call usb_config_do_bind() in legacy gadget zero, because it uses
usb_add_config_only() instead of usb_add_config() and prepares
configuration manually.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drivers/usb/gadget/function/f_sourcesink.c
Handle functions using new API properly.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drivers/usb/gadget/configfs.c | 22 ++
1 file changed, 22 insertions(+)
diff --git a/drivers/usb/gadget/configfs.c b/drivers/usb/gadget/configfs.c
index fb3c9ba..60c6898
of usb_add_config() and prepares
configuration manually.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drivers/usb/gadget/function/f_loopback.c | 162 ++-
drivers/usb/gadget/legacy/zero.c | 3 +
2 files changed, 33 insertions(+), 132 deletions(-)
diff
Introduce function returning endpoint of given index in active altsetting
of specified interface. It's intended to be used in set_alt() callback
to obtain endpoints of currently selected altsetting.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drivers/usb/gadget/composite.
As now we store current altsetting number for each interface, we can
handle USB_REQ_GET_INTERFACE automatically.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drivers/usb/gadget/composite.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/
in function and pass it to set_alt()
callback instead of passing index of interface in configuration which has
to be obtained from interface descriptor. This simplifies altsetting
changes handling in code of USB functions.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drive
Introduce function returning address of given endpoint within the function.
This value can be useful during preparation of class or vendor specific
descriptors in prep_vendor_descs() callback. It can be also necessary
to handle some class or vendor specific setup requests.
Signed-off-by: Robert
As we don't need distinction between interface descriptors for different
speeds, we can remove some amount of unnecessary code. Additionally we
simplify configfs interface of UVC function.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drivers/usb/gadget/function/f_uvc.c
Generate descriptors in new format and attach them to USB function in
prep_descs(). Implement prep_vendor_descs() to supply class specific
descriptors. Change set_alt() implementation and implement clear_alt()
operation. Remove boilerplate code.
Signed-off-by: Robert Baldyga <r.b
allocated in set_alt() and freed in clear_alt().
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drivers/usb/gadget/function/f_rndis.c | 321 --
1 file changed, 112 insertions(+), 209 deletions(-)
diff --git a/drivers/usb/gadget/function/f_rndi
Generate descriptors in new format and attach them to USB function in
prep_descs(). Implement prep_vendor_descs() to supply class specific
descriptors. Change set_alt() implementation and implement clear_alt()
operation. Remove boilerplate code.
Signed-off-by: Robert Baldyga <r.b
Changes meaning of disable() operation for functions using new API.
Before calling disable() callback composite automatically disables
endpoints of active altsettings of given USB function. This reduces
amount of boilerplate code in USB functions.
Signed-off-by: Robert Baldyga <r.b
After binding all configurations in gadget, call prep_vendor_descs()
for each function which uses new API and implements this callback.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drivers/usb/gadget/composite.c | 31 +++
include/linux/usb/compo
, which means that interface numbers and endpoint addresses
are already assigned so that function can use these values to prepare
class or vendor specific descriptors and attach them to function.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
include/linux/usb/composite.h | 8 +
(). It also takes over the function of
disable() opetarion, so it can be removed after converting all USB
functions to new API.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drivers/usb/gadget/composite.c | 12
include/linux/usb/composite.h | 4
2 files chang
For now we generate descriptor arrays for each speed as it is done by old
API functions, to allow use mixed new and old API based functions in single
configurations.
This will be removed after complete switch to new API.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drive
descriptors format.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drivers/usb/gadget/composite.c | 343 +
include/linux/usb/composite.h | 52 +++
2 files changed, 395 insertions(+)
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/
gt; EIP is at kfree+0x172/0x180
> Call Trace:
> [<80c0e3b6>] ? usb_ep_autoconfig_ss+0x86/0x170
> [<80c13345>] gs_free_req+0x15/0x30
> [<80c12df1>] acm_bind+0x1c1/0x2d0
> [<80c0e9be>] usb_add_function+0x6e/0x120
> [<80c213cb>] acm_function_bind_con
PTH_n), as specified during
coreConsultant configuration."
That means, that we have to setup only FIFO start addresses (DPTxFStAddr),
taking into account reset values of DPTxFSize.
Initialize FIFO start addresses properly and remove unneeded core related
to incorrect FIFO size initialization.
Signed-off-
Since FIFO is always freed in dwc2_hsotg_ep_disable(), ep->fifo_index
is always 0 in dwc2_hsotg_ep_enable(), hence code inside if() block is
never executed.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drivers/usb/dwc2/gadget.c | 13 +
1 file changed, 1 inserti
Since we handle FIFOs and endpoint separately, using variable named 'ep'
in context of FIFO is misleading, hence we rename it to 'fifo'.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drivers/usb/dwc2/gadget.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff
As kill_all_requests() potentially flushes TX FIFO, we should should
free FIFO after calling it. Otherwise FIFO could stay unflushed properly.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drivers/usb/dwc2/gadget.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
Hello,
This patch series fixes TX FIFO handling in UDC part of DWC2 driver.
It gets rid of few bugs, improves compliance with DWC2 documentation
and cleanes up driver code. More detailed description is provided in
commit messages.
Best regards,
Robert Baldyga
Robert Baldyga (5):
usb: dwc2
In context of FIFO registers we use ep->fifo_index instead of ep->index.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drivers/usb/dwc2/gadget.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/ga
l Trace:
> [<80c0e3b6>] ? usb_ep_autoconfig_ss+0x86/0x170
> [<80c13345>] gs_free_req+0x15/0x30
> [<80c12df1>] acm_bind+0x1c1/0x2d0
> [<80c0e9be>] usb_add_function+0x6e/0x120
> [<80c213cb>] acm_function_bind_config+0x2b/0x90
>
Reviewed-by:
Hi Felipe,
I can see that you have applied the documentation fix patch to your
tree. Have also you looked at the remaining patches of this series? What
do you think about this concept? Any comments?
Best regards,
Robert
On 12/11/2015 12:24 PM, Robert Baldyga wrote:
> Hi Felipe,
>
> H
Generate descriptors in new format and attach them to USB function in
prep_descs(). Implement prep_vendor_descs() to supply class specific
descriptors. Change set_alt() implementation and implement clear_alt()
operation. Remove boilerplate code.
Signed-off-by: Robert Baldyga <r.b
Generate descriptors in new format and attach them to USB function in
prep_descs(). Implement prep_vendor_descs() to supply class specific
descriptors. Change set_alt() implementation and implement clear_alt()
operation. Remove boilerplate code.
Signed-off-by: Robert Baldyga <r.b
Generate descriptors in new format and attach them to USB function in
prep_descs(). Implement prep_vendor_descs() to supply class specific
descriptors. Change set_alt() implementation and implement clear_alt()
operation. Remove boilerplate code.
Signed-off-by: Robert Baldyga <r.b
Generate descriptors in new format and attach them to USB function in
prep_descs(). Implement prep_vendor_descs() to supply class specific
descriptors. Change set_alt() implementation and implement clear_alt()
operation. Remove boilerplate code.
Signed-off-by: Robert Baldyga <r.b
Generate descriptors in new format and attach them to USB function in
prep_descs(). Change set_alt() implementation and implement clear_alt()
operation. Remove boilerplate code.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drivers/usb/gadget/function/f_mass_storage.
Generate descriptors in new format and attach them to USB function in
prep_descs(). Implement prep_vendor_descs() to supply class specific
descriptors. Change set_alt() implementation and implement clear_alt()
operation. Remove boilerplate code.
Signed-off-by: Robert Baldyga <r.b
It seems that gitotious repository is no longer accessible, so we replace
it with address to active repository.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
Documentation/usb/gadget-testing.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentati
as RFC to show what is final result
which I want to achieve.
Best regards,
Robert Baldyga
Changelog:
v3:
- Fixed handling of vendor specific descriptor attached to endpoint
- Added 6 new patches converting Functions to new API
v2: https://lkml.org/lkml/2015/11/27/180
- Addressed comments fro
-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drivers/usb/gadget/function/f_sourcesink.c | 63 --
1 file changed, 51 insertions(+), 12 deletions(-)
diff --git a/drivers/usb/gadget/function/f_sourcesink.c
b/drivers/usb/gadget/function/f_sourcesink.c
index e
Generate descriptors in new format and attach them to USB function in
prep_descs(). Implement prep_vendor_descs() to supply class specific
descriptors. Change set_alt() implementation and implement clear_alt()
operation. Remove boilerplate code.
Signed-off-by: Robert Baldyga <r.b
-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drivers/usb/gadget/function/f_hid.c | 305 ++--
1 file changed, 119 insertions(+), 186 deletions(-)
diff --git a/drivers/usb/gadget/function/f_hid.c
b/drivers/usb/gadget/function/f_hid.c
index 0456a53..8770289
So far USB requests allocated in hidg_set_alt() were not freed. Now we
free them in case of hidg_set_alt() failure (when we are not able to
allocate and enqueue all the requests) or in hidg_disable() function.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drivers/usb/gadget/fu
Generate descriptors in new format and attach them to USB function in
prep_descs(). Implement prep_vendor_descs() to supply class specific
descriptors. Change set_alt() implementation and implement clear_alt()
operation. Remove boilerplate code.
Signed-off-by: Robert Baldyga <r.b
code. Change USB request lifetime management - now
it's allocated in set_alt() and freed in clear_alt().
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drivers/usb/gadget/function/f_ecm.c | 321 +++-
1 file changed, 92 insertions(+), 229 deletions(-)
allocated in set_alt() and freed in clear_alt().
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drivers/usb/gadget/function/f_rndis.c | 321 --
1 file changed, 112 insertions(+), 209 deletions(-)
diff --git a/drivers/usb/gadget/function/f_rndi
Generate descriptors in new format and attach them to USB function in
prep_descs(). Implement prep_vendor_descs() to supply class specific
descriptors. Change set_alt() implementation and implement clear_alt()
operation. Remove boilerplate code.
Signed-off-by: Robert Baldyga <r.b
Generate descriptors in new format and attach them to USB function in
prep_descs(). Change set_alt() implementation and implement clear_alt()
operation. Remove boilerplate code.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drivers/usb/gadget/function/f_serial.c
Generate descriptors in new format and attach them to USB function in
prep_descs(). Implement prep_vendor_descs() to supply class specific
descriptors. Change set_alt() implementation and implement clear_alt()
operation. Remove boilerplate code.
Signed-off-by: Robert Baldyga <r.b
some class or vendor specific setup requests.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drivers/usb/gadget/composite.c | 19 +++
include/linux/usb/composite.h | 2 ++
2 files changed, 21 insertions(+)
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/
in composite framework.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drivers/usb/gadget/composite.c | 40 +++-
1 file changed, 31 insertions(+), 9 deletions(-)
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index 261023b..b
Introduce function returning endpoint of given index in active altsetting
of specified interface. It's intended to be used in set_alt() callback
to obtain endpoints of currently selected altsetting.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drivers/usb/gadget/composite.
Handle functions using new API properly.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drivers/usb/gadget/configfs.c | 22 ++
1 file changed, 22 insertions(+)
diff --git a/drivers/usb/gadget/configfs.c b/drivers/usb/gadget/configfs.c
index 0557f80..153adf7
As now we store current altsetting number for each interface, we can
handle USB_REQ_GET_INTERFACE automatically.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drivers/usb/gadget/composite.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/
.
Call usb_config_do_bind() in legacy gadget zero, because it uses
usb_add_config_only() instead of usb_add_config() and prepares
configuration manually.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drivers/usb/gadget/function/f_sourcesink.c
of usb_add_config() and prepares
configuration manually.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drivers/usb/gadget/function/f_loopback.c | 162 ++-
drivers/usb/gadget/legacy/zero.c | 3 +
2 files changed, 33 insertions(+), 132 deletions(-)
diff
(). It also takes over the function of
disable() opetarion, so it can be removed after converting all USB
functions to new API.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drivers/usb/gadget/composite.c | 12
include/linux/usb/composite.h | 4
2 files chang
function bound.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drivers/usb/gadget/function/f_sourcesink.c | 98 --
drivers/usb/gadget/function/g_zero.h | 3 +
drivers/usb/gadget/legacy/zero.c | 6 ++
3 files changed, 76 insertions(
As usb_gstrings_attach() failure can happen when some USB functions are
are already added to some configurations (in previous loop iterations),
we should always call purge_configs_funcs() to be sure that failure is
be handled properly.
Signed-off-by: Robert Baldyga <r.bald...@samsung.
, which means that interface numbers and endpoint addresses
are already assigned so that function can use these values to prepare
class or vendor specific descriptors and attach them to function.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
include/linux/usb/composite.h | 8 +
After binding all configurations in gadget, call prep_vendor_descs()
for each function which uses new API and implements this callback.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drivers/usb/gadget/composite.c | 31 +++
include/linux/usb/compo
For now we generate descriptor arrays for each speed as it is done by old
API functions, to allow use mixed new and old API based functions in single
configurations.
This will be removed after complete switch to new API.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drive
descriptors format.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drivers/usb/gadget/composite.c | 347 +
include/linux/usb/composite.h | 52 ++
2 files changed, 399 insertions(+)
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/
Changes meaning of disable() operation for functions using new API.
Before calling disable() callback composite automatically disables
endpoints of active altsettings of given USB function. This reduces
amount of boilerplate code in USB functions.
Signed-off-by: Robert Baldyga <r.b
, because we now store information about
endpoints, allows us to handle endpoint state inside composite framework,
and in result remove lots of boilerplate code from USB functions.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
include/linux/usb/composite.h
in function and pass it to set_alt()
callback instead of passing index of interface in configuration which has
to be obtained from interface descriptor. This simplifies altsetting
changes handling in code of USB functions.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drive
.
Signed-off-by: Robert Baldyga <r.bald...@samsung.com>
---
drivers/usb/gadget/composite.c | 162 +
include/linux/usb/composite.h | 3 +
2 files changed, 165 insertions(+)
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index 3
-by: Robert Baldyga <r.bald...@samsung.com>
---
drivers/usb/gadget/function/f_loopback.c | 58 +---
1 file changed, 23 insertions(+), 35 deletions(-)
diff --git a/drivers/usb/gadget/function/f_loopback.c
b/drivers/usb/gadget/function/f_loopback.c
index ddc3aad..f
Hi Felipe,
On 12/02/2015 07:55 PM, Felipe Balbi wrote:
> So far, dwc3 has always missed request->zero
> handling for every endpoint. Let's implement
> that so we can handle cases where transfer must
> be finished with a ZLP.
>
> Note that dwc3 is a little special. Even though
> we're dealing
Generate descriptors in new format and attach them to USB function in
prep_descs(). Implement prep_vendor_descs() to supply class specific
descriptors. Change set_alt() implementation and implement clear_alt()
operation. Remove boilerplate code.
Signed-off-by: Robert Baldyga <r.b
Generate descriptors in new format and attach them to USB function in
prep_descs(). Implement prep_vendor_descs() to supply class specific
descriptors. Change set_alt() implementation and implement clear_alt()
operation. Remove boilerplate code.
Signed-off-by: Robert Baldyga <r.b
Generate descriptors in new format and attach them to USB function in
prep_descs(). Implement prep_vendor_descs() to supply class specific
descriptors. Change set_alt() implementation and implement clear_alt()
operation. Remove boilerplate code.
Signed-off-by: Robert Baldyga <r.b
-by: Robert Baldyga <r.bald...@samsung.com>
---
drivers/usb/gadget/function/f_loopback.c | 58 +---
1 file changed, 23 insertions(+), 35 deletions(-)
diff --git a/drivers/usb/gadget/function/f_loopback.c
b/drivers/usb/gadget/function/f_loopback.c
index 23933bd..7
1 - 100 of 875 matches
Mail list logo