- 15 1月, 2015 10 次提交
-
-
由 Markus Pargmann 提交于
While the code is correct and functions well, it's still a bit misleading to add the reference operator in from of the buf argument. This patch simply removes that operator in order to make use of buf slightly better to the eyes. Signed-off-by: NMarkus Pargmann <mpa@pengutronix.de> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Robert Baldyga 提交于
Since we can compose gadgets from many functions, there is the problem related to gadget breakage while FunctionFS daemon being closed. FFS function is userspace code so there is no way to know when it will close files (it doesn't matter what is the reason of this situation, it can be daemon logic, program breakage, process kill or any other). So when we have another function in gadget which, for example, sends some amount of data, does some software update or implements some real-time functionality, we may want to keep the gadget connected despite FFS function is no longer functional. We can't just remove one of functions from gadget since it has been enumerated, so the only way to keep entire gadget working is to make broken FFS function deactivated but still visible to host. For this purpose this patch introduces "no_disconnect" mode. It can be enabled by setting mount option "no_disconnect=1", and results with defering function disconnect to the moment of reopen ep0 file or filesystem unmount. After closing all endpoint files, FunctionFS is set to state FFS_DEACTIVATED. When ffs->state == FFS_DEACTIVATED: - function is still bound and visible to host, - setup requests are automatically stalled, - transfers on other endpoints are refused, - epfiles, except ep0, are deleted from the filesystem, - opening ep0 causes the function to be closed, and then FunctionFS is ready for descriptors and string write, - altsetting change causes the function to be closed - we want to keep function alive until another functions are potentialy used, altsetting change means that another configuration is being selected or USB cable was unplugged, which indicates that we don't need to stay longer in FFS_DEACTIVATED state - unmounting of the FunctionFS instance causes the function to be closed. Tested-by: NDavid Cohen <david.a.cohen@linux.intel.com> Acked-by: NMichal Nazarewicz <mina86@mina86.com> Signed-off-by: NRobert Baldyga <r.baldyga@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Heikki Krogerus 提交于
Removing a few items that are not needed anymore and adding separate function for quirks. Acked-by: NHuang Rui <ray.huang@amd.com> Signed-off-by: NHeikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Heikki Krogerus 提交于
There is nothing specific being done in the suspend and resume callbacks that is not already taken care of in PCI driver core, so dropping the functions. Acked-by: NHuang Rui <ray.huang@amd.com> Signed-off-by: NHeikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Heikki Krogerus 提交于
None of the PCI platforms need the NOP transceivers, and since we can now live without the PHYs, removing registration of the platform devices for them. Acked-by: NHuang Rui <ray.huang@amd.com> Signed-off-by: NHeikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 kbuild test robot 提交于
drivers/usb/gadget/function/uvc_configfs.c:46:28: sparse: symbol 'to_uvcg_control_header' was not declared. Should it be static? drivers/usb/gadget/function/uvc_configfs.c:138:25: sparse: symbol 'uvcg_control_header_type' was not declared. Should it be static? drivers/usb/gadget/function/uvc_configfs.c:164:6: sparse: symbol 'uvcg_control_header_drop' was not declared. Should it be static? drivers/usb/gadget/function/uvc_configfs.c:721:20: sparse: symbol 'to_uvcg_format' was not declared. Should it be static? drivers/usb/gadget/function/uvc_configfs.c:798:30: sparse: symbol 'to_uvcg_streaming_header' was not declared. Should it be static? drivers/usb/gadget/function/uvc_configfs.c:950:25: sparse: symbol 'uvcg_streaming_header_type' was not declared. Should it be static? drivers/usb/gadget/function/uvc_configfs.c:976:6: sparse: symbol 'uvcg_streaming_header_drop' was not declared. Should it be static? drivers/usb/gadget/function/uvc_configfs.c:1020:19: sparse: symbol 'to_uvcg_frame' was not declared. Should it be static? drivers/usb/gadget/function/uvc_configfs.c:1265:25: sparse: symbol 'uvcg_frame_type' was not declared. Should it be static? drivers/usb/gadget/function/uvc_configfs.c:1315:6: sparse: symbol 'uvcg_frame_drop' was not declared. Should it be static? drivers/usb/gadget/function/uvc_configfs.c:1338:26: sparse: symbol 'to_uvcg_uncompressed' was not declared. Should it be static? drivers/usb/gadget/function/uvc_configfs.c:1548:25: sparse: symbol 'uvcg_uncompressed_type' was not declared. Should it be static? drivers/usb/gadget/function/uvc_configfs.c:1586:6: sparse: symbol 'uvcg_uncompressed_drop' was not declared. Should it be static? drivers/usb/gadget/function/uvc_configfs.c:1610:19: sparse: symbol 'to_uvcg_mjpeg' was not declared. Should it be static? drivers/usb/gadget/function/uvc_configfs.c:1761:25: sparse: symbol 'uvcg_mjpeg_type' was not declared. Should it be static? drivers/usb/gadget/function/uvc_configfs.c:1793:6: sparse: symbol 'uvcg_mjpeg_drop' was not declared. Should it be static? Signed-off-by: NFengguang Wu <fengguang.wu@intel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Robert Baldyga 提交于
This makes examples more platform independent and more compatible with USB standard, as endpoint addresses in given interface may differ between hardware platforms or even between configurations in single USB device. Signed-off-by: NRobert Baldyga <r.baldyga@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Ricardo Ribalda Delgado 提交于
Fix sparse warning Fixes: cb442ee1 (usb: gadget: udc: net2280: Re-enable dynamic debug messages) Reported-by: Nkbuild test robot <fengguang.wu@intel.com> Signed-off-by: NRicardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Peter Chen 提交于
Fix one code style problem. Signed-off-by: NPeter Chen <peter.chen@freescale.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Peter Chen 提交于
Since we call gaudio_cleanup at f_audio_free, the f_uac1_opts doesn't need to use gaudio any more. Signed-off-by: NPeter Chen <peter.chen@freescale.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 13 1月, 2015 30 次提交
-
-
由 Sergei Shtylyov 提交于
On the Renesas R8A7791 SoC based boards there's MAX3355 USB OTG chip and mini-AB USB connector corresponding to USB port 0 driven either by EHCI/OHCI or Renesas USBHS gadget controller. And we'd like the host/gadget drivers to work based on the cable type connected. An 'extcon' driver for MAX3355 has been written, so we only need to bind to it via device tree which I'm doing in this patch. (Perhaps, it would also make sense to use OTG HNP when the USBHS host mode is active and a B-cable is connected but I don't have access to host-capable USBHS, so wouldn't be able to test it.) Signed-off-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Mian Yousaf Kaukab 提交于
If usb bus is reset without a physical disconnection, all endpoints will remain open. Call s3c_hsotg_disconnect() from reset handler to report a disconnect to gadget framework. hsotg->connected is checked in s3c_hsotg_disconnect() before processing disconnect. In some cases, USBRst is seen before EnumDone and after it as well. So move setting of hsotg->connected to set-address to avoid reporting extra disconnection in this case. Tested-by: NRobert Baldyga <r.baldyga@samsung.com> Acked-by: NPaul Zimmerman <paulz@synopsys.com> Signed-off-by: NMian Yousaf Kaukab <yousaf.kaukab@intel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Gregory Herrero 提交于
When booting with id pin grounded, dwc2 default to host mode. Thus, force device mode prior initializing gadget part. Else fifo init will fail since fifo values are not correct in host mode. Tested-by: NRobert Baldyga <r.baldyga@samsung.com> Acked-by: NPaul Zimmerman <paulz@synopsys.com> Signed-off-by: NGregory Herrero <gregory.herrero@intel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Gregory Herrero 提交于
This callback informs the driver about the total amount of current it is allowed to draw. Share this information with the phy so that current limits can be set for charging for example. Tested-by: NRobert Baldyga <r.baldyga@samsung.com> Acked-by: NPaul Zimmerman <paulz@synopsys.com> Signed-off-by: NGregory Herrero <gregory.herrero@intel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Gregory Herrero 提交于
Gadget must be informed about disconnection when pullup is removed. Tested-by: NRobert Baldyga <r.baldyga@samsung.com> Acked-by: NPaul Zimmerman <paulz@synopsys.com> Signed-off-by: NGregory Herrero <gregory.herrero@intel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Gregory Herrero 提交于
After all endpoints are disabled, fifo_map should have reached 0. Its a bug if if didn't, so warn about it and reset it to 0 so that driver can continue using all the fifos. Tested-by: NRobert Baldyga <r.baldyga@samsung.com> Acked-by: NPaul Zimmerman <paulz@synopsys.com> Signed-off-by: NGregory Herrero <gregory.herrero@intel.com> Signed-off-by: NMian Yousaf Kaukab <yousaf.kaukab@intel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Mian Yousaf Kaukab 提交于
When selecting different alt setting, s3c_hsotg_ep_enable can be called with fifo already allocated. Allocate fifo again only if required and after deallocating the previous fifo. Tested-by: NRobert Baldyga <r.baldyga@samsung.com> Acked-by: NPaul Zimmerman <paulz@synopsys.com> Signed-off-by: NMian Yousaf Kaukab <yousaf.kaukab@intel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Mian Yousaf Kaukab 提交于
Current algorithm picks the first fifo which is equal to or greater than the required size. This can result in bigger fifos assigned to endpoints with smaller maxps. Change the algorithm to pick the smallest fifo which is greater than or equal to the required size. Moreover, only use signed variables when required. Tested-by: NRobert Baldyga <r.baldyga@samsung.com> Acked-by: NPaul Zimmerman <paulz@synopsys.com> Signed-off-by: NMian Yousaf Kaukab <yousaf.kaukab@intel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Mian Yousaf Kaukab 提交于
This flag is set before sending the zlp. So use present tense instead of the past tense. Tested-by: NRobert Baldyga <r.baldyga@samsung.com> Acked-by: NPaul Zimmerman <paulz@synopsys.com> Signed-off-by: NMian Yousaf Kaukab <yousaf.kaukab@intel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Gregory Herrero 提交于
Enable phy driver to report vbus session. This allows us to remove D+ pullup when vbus is not present. Tested-by: NRobert Baldyga <r.baldyga@samsung.com> Acked-by: NPaul Zimmerman <paulz@synopsys.com> Signed-off-by: NGregory Herrero <gregory.herrero@intel.com> Signed-off-by: NMian Yousaf Kaukab <yousaf.kaukab@intel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Gregory Herrero 提交于
Can't stay in the loop forever. Break it after timeout. Tested-by: NRobert Baldyga <r.baldyga@samsung.com> Acked-by: NPaul Zimmerman <paulz@synopsys.com> Signed-off-by: NGregory Herrero <gregory.herrero@intel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Mian Yousaf Kaukab 提交于
The warning is probably good but it has false positives in both dma and non-dma cases. So its not very helpful in either. Tested-by: NRobert Baldyga <r.baldyga@samsung.com> Acked-by: NPaul Zimmerman <paulz@synopsys.com> Signed-off-by: NMian Yousaf Kaukab <yousaf.kaukab@intel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Mian Yousaf Kaukab 提交于
According to programming guide, zero length packet should be programmed on its own and should not be counted in DIEPTSIZ.PktCnt with other packets. For ep0, this is the zlp for DATA IN stage (if required) and not for the STATUS stage. Tested-by: NRobert Baldyga <r.baldyga@samsung.com> Acked-by: NPaul Zimmerman <paulz@synopsys.com> Signed-off-by: NGregory Herrero <gregory.herrero@intel.com> Signed-off-by: NMian Yousaf Kaukab <yousaf.kaukab@intel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Mian Yousaf Kaukab 提交于
Manage ep0 state in software to add handling of status OUT stage. Just toggling hsotg->setup in s3c_hsotg_handle_outdone leaves it in wrong state in 2-stage control transfers. Moreover, ensure that for setup-packet s3c_hsotg_handle_outdone is called either from SetupDone or OutDone but not both. Dwc2 ip v3.00a generates both SetupDone and OutDone on setup packets. Tested-by: NRobert Baldyga <r.baldyga@samsung.com> Acked-by: NPaul Zimmerman <paulz@synopsys.com> Signed-off-by: NMian Yousaf Kaukab <yousaf.kaukab@intel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Mian Yousaf Kaukab 提交于
kill_all_requests() can flush the fifo. Call it after disabling the endpoint. Tested-by: NRobert Baldyga <r.baldyga@samsung.com> Acked-by: NPaul Zimmerman <paulz@synopsys.com> Signed-off-by: NMian Yousaf Kaukab <yousaf.kaukab@intel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Mian Yousaf Kaukab 提交于
When matching tx fifo to endpoint, consider all fifos instead of hard limiting to 8 Moreover, print error in case no fifo could be found. Tested-by: NRobert Baldyga <r.baldyga@samsung.com> Acked-by: NPaul Zimmerman <paulz@synopsys.com> Signed-off-by: NMian Yousaf Kaukab <yousaf.kaukab@intel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Mian Yousaf Kaukab 提交于
< 15 check doesn't show debug information for endpoint 15. It is possible to have less than 15 endpoints so use limit provided by hardware configuration. Tested-by: NRobert Baldyga <r.baldyga@samsung.com> Acked-by: NPaul Zimmerman <paulz@synopsys.com> Signed-off-by: NMian Yousaf Kaukab <yousaf.kaukab@intel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Mian Yousaf Kaukab 提交于
These members are only occupying space. Tested-by: NRobert Baldyga <r.baldyga@samsung.com> Acked-by: NPaul Zimmerman <paulz@synopsys.com> Signed-off-by: NMian Yousaf Kaukab <yousaf.kaukab@intel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Gregory Herrero 提交于
Tested-by: NRobert Baldyga <r.baldyga@samsung.com> Acked-by: NPaul Zimmerman <paulz@synopsys.com> Signed-off-by: NGregory Herrero <gregory.herrero@intel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Gregory Herrero 提交于
As fifo size can vary between SOCs, add possibility to configure them from device tree. Fifo sizes used by the legacy driver will be used If they are not provided by the device tree. Tested-by: NRobert Baldyga <r.baldyga@samsung.com> Acked-by: NPaul Zimmerman <paulz@synopsys.com> Signed-off-by: NGregory Herrero <gregory.herrero@intel.com> Signed-off-by: NMian Yousaf Kaukab <yousaf.kaukab@intel.com> Reviewed-by: NRobert Baldyga <r.baldyga@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Mian Yousaf Kaukab 提交于
Current code does not check endpoint 15 interrupt. Use number of endpoint configured in hardware instead of the hardcoded value. Tested-by: NRobert Baldyga <r.baldyga@samsung.com> Acked-by: NPaul Zimmerman <paulz@synopsys.com> Signed-off-by: NMian Yousaf Kaukab <yousaf.kaukab@intel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Mian Yousaf Kaukab 提交于
GHWCFG1 provides hardware configuration of each endpoint. Use it to configure the endpoints instead of assuming all even endpoint are OUT and all odd endpoints are IN. Tested-by: NRobert Baldyga <r.baldyga@samsung.com> Acked-by: NPaul Zimmerman <paulz@synopsys.com> Signed-off-by: NMian Yousaf Kaukab <yousaf.kaukab@intel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Gregory Herrero 提交于
Indicate if gadget driver must use dma for usb transfers. Tested-by: NRobert Baldyga <r.baldyga@samsung.com> Acked-by: NPaul Zimmerman <paulz@synopsys.com> Signed-off-by: NGregory Herrero <gregory.herrero@intel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Gregory Herrero 提交于
* Add an of specific function to parse device node properties. * Enable dma usage only if device tree property 'g_use_dma' is present. Tested-by: NRobert Baldyga <r.baldyga@samsung.com> Acked-by: NPaul Zimmerman <paulz@synopsys.com> Signed-off-by: NGregory Herrero <gregory.herrero@intel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Gregory Herrero 提交于
Do a read-modify-write instead of only setting DMAEn bit. Tested-by: NRobert Baldyga <r.baldyga@samsung.com> Acked-by: NPaul Zimmerman <paulz@synopsys.com> Signed-off-by: NGregory Herrero <gregory.herrero@intel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Gregory Herrero 提交于
HBstLen is GAHBCFG[4:1]. Use GAHBCFG_HBSTLEN_SHIFT to write burst- length at correct position. Tested-by: NRobert Baldyga <r.baldyga@samsung.com> Acked-by: NPaul Zimmerman <paulz@synopsys.com> Signed-off-by: NGregory Herrero <gregory.herrero@intel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Mian Yousaf Kaukab 提交于
In the error path, s3c_hsotg_phy_disable should be called after a call to s3c_hsotg_phy_enable is made. Tested-by: NRobert Baldyga <r.baldyga@samsung.com> Acked-by: NPaul Zimmerman <paulz@synopsys.com> Signed-off-by: NMian Yousaf Kaukab <yousaf.kaukab@intel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Mian Yousaf Kaukab 提交于
When using DMA, data of the previous setup packet can be read back from cache because ep0 and ctrl buffers are embedded in struct s3c_hsotg. Allocate buffers instead of embedding them. Tested-by: NRobert Baldyga <r.baldyga@samsung.com> Acked-by: NPaul Zimmerman <paulz@synopsys.com> Signed-off-by: NMian Yousaf Kaukab <yousaf.kaukab@intel.com> Reviewed-by: NRobert Baldyga <r.baldyga@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Mian Yousaf Kaukab 提交于
Only process DOEPINT.XferCompl on data packet as DOEPINTn.SetUp can occur with or without DOEPINT.XferCompl. When DOEPINT.SetUp occurs with DOEPINT.XferCompl, only DOEPINT.SetUp needs to be handled. Moreover, ignore DOEPINT.XferCompl when it occurs with DOEPINT.StupPktRcvd as driver needs to wait for DOEPINT.SetUp to continue. Tested-by: NRobert Baldyga <r.baldyga@samsung.com> Acked-by: NPaul Zimmerman <paulz@synopsys.com> Signed-off-by: NMian Yousaf Kaukab <yousaf.kaukab@intel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Mian Yousaf Kaukab 提交于
When using DMA, keep fifo empty interrupt disabled. Otherwise core is flooded by interrupts. Tested-by: NRobert Baldyga <r.baldyga@samsung.com> Acked-by: NPaul Zimmerman <paulz@synopsys.com> Signed-off-by: NGregory Herrero <gregory.herrero@intel.com> Signed-off-by: NMian Yousaf Kaukab <yousaf.kaukab@intel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-