summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/udc/pxa27x_udc.c
AgeCommit message (Collapse)Author
2021-05-27usb: gadget: udc: pxa27x_udc: Fix documentation for 'pxa27x_udc_start()'Lee Jones
Fixes the following W=1 kernel build warning(s): drivers/usb/gadget/udc/pxa27x_udc.c:1749: warning: expecting prototype for pxa27x_start(). Prototype was for pxa27x_udc_start() instead Cc: Daniel Mack <daniel@zonque.org> Cc: Haojian Zhuang <haojian.zhuang@gmail.com> Cc: Robert Jarzmik <robert.jarzmik@free.fr> Cc: Felipe Balbi <balbi@kernel.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: linux-arm-kernel@lists.infradead.org Cc: linux-usb@vger.kernel.org Acked-by: Daniel Mack <daniel@zonque.org> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20210526130037.856068-19-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-27USB: gadget: pxa27x_udc: remove dentry storage for debugfs fileGreg Kroah-Hartman
There is no need to store the dentry pointer for a debugfs file that we only use to remove it when the device goes away. debugfs can do the lookup for us instead, saving us some trouble, and making things smaller overall. Cc: Daniel Mack <daniel@zonque.org> Cc: Haojian Zhuang <haojian.zhuang@gmail.com> Cc: Robert Jarzmik <robert.jarzmik@free.fr> Cc: Felipe Balbi <balbi@kernel.org> Link: https://lore.kernel.org/r/20210525171636.758758-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-28usb: gadget: pxa27x_udc: Replace in_interrupt() usage in commentsAhmed S. Darwish
The usage of in_interrupt() in drivers is phased out for various reasons. Documenting calling contexts of functions with 'in_interrupt()' or '!in_interrupt()' is imprecise: For a function which might sleep the condition is preemptible task context, which is not what '!in_interrupt()' describes. Replace the context docummentation with plain text and make them match reality. Signed-off-by: Ahmed S. Darwish <a.darwish@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Felipe Balbi <balbi@kernel.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: linux-arm-kernel@lists.infradead.org Cc: linux-usb@vger.kernel.org Link: https://lore.kernel.org/r/20201019101110.636378243@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-09usb: gadget: udc: pxa27x_udc: Fix a bunch of kerneldoc issuesLee Jones
Mostly bitrotted argument descriptions/names. Also the removal of a blank line in the middle of a kerneldoc header, which is not allowed. Fixes the following W=1 kernel build warning(s): drivers/usb/gadget/udc/pxa27x_udc.c:398: warning: Function parameter or member 'ep' not described in 'ep_write_UDCCSR' drivers/usb/gadget/udc/pxa27x_udc.c:398: warning: Excess function parameter 'udc' description in 'ep_write_UDCCSR' drivers/usb/gadget/udc/pxa27x_udc.c:479: warning: Function parameter or member 'udc' not described in 'set_ep0state' drivers/usb/gadget/udc/pxa27x_udc.c:479: warning: Excess function parameter 'dev' description in 'set_ep0state' drivers/usb/gadget/udc/pxa27x_udc.c:506: warning: Excess function parameter 'req' description in 'inc_ep_stats_reqs' drivers/usb/gadget/udc/pxa27x_udc.c:1476: warning: bad line: drivers/usb/gadget/udc/pxa27x_udc.c:1697: warning: Function parameter or member 'udc' not described in 'udc_enable' drivers/usb/gadget/udc/pxa27x_udc.c:1697: warning: Excess function parameter 'dev' description in 'udc_enable' drivers/usb/gadget/udc/pxa27x_udc.c:1750: warning: Function parameter or member 'g' not described in 'pxa27x_udc_start' drivers/usb/gadget/udc/pxa27x_udc.c:1750: warning: Excess function parameter 'bind' description in 'pxa27x_udc_start' drivers/usb/gadget/udc/pxa27x_udc.c:1784: warning: Excess function parameter 'driver' description in 'stop_activity' drivers/usb/gadget/udc/pxa27x_udc.c:1800: warning: Function parameter or member 'g' not described in 'pxa27x_udc_stop' drivers/usb/gadget/udc/pxa27x_udc.c:1800: warning: Excess function parameter 'driver' description in 'pxa27x_udc_stop' drivers/usb/gadget/udc/pxa27x_udc.c:2358: warning: Function parameter or member 'pdev' not described in 'pxa_udc_probe' drivers/usb/gadget/udc/pxa27x_udc.c:2358: warning: Excess function parameter '_dev' description in 'pxa_udc_probe' Cc: Daniel Mack <daniel@zonque.org> Cc: Haojian Zhuang <haojian.zhuang@gmail.com> Cc: Robert Jarzmik <robert.jarzmik@free.fr> Cc: Felipe Balbi <balbi@kernel.org> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20200706133341.476881-7-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-14usb: gadget: pxa27x: create debugfs directory under usb rootChunfeng Yun
Now the USB gadget subsystem can use the USB debugfs root directory, so move it's directory from the root of the debugfs filesystem into the root of usb Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Link: https://lore.kernel.org/r/1573541519-28488-11-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-04usb: gadget: pxa27x_udc: use devm_platform_ioremap_resource() to simplify codeYueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: YueHaibing <yuehaibing@huawei.com> Link: https://lore.kernel.org/r/20190904094557.22884-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-31USB: gadget: udc: pxa27x_udc: no need to check return value of ↵Greg Kroah-Hartman
debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. There is also no need to keep the file dentries around at all, so remove those variables from the device structure. Cc: Daniel Mack <daniel@zonque.org> Cc: Haojian Zhuang <haojian.zhuang@gmail.com> Cc: Felipe Balbi <balbi@kernel.org> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-09USB: gadget: pxa27x: Re-use DEFINE_SHOW_ATTRIBUTE() macroAndy Shevchenko
...instead of open coding file operations followed by custom ->open() callbacks per each attribute. Cc: Daniel Mack <daniel@zonque.org> Cc: Haojian Zhuang <haojian.zhuang@gmail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-11usb: gadget: pxa27x: Remove redundant assignment to is_short and devColin Ian King
Variable is_short is set to zero but this value is never read as it is overwritten with a new value later on, hence it is a redundant assignment and can be removed. Pointer dev is assigned a value that is not read and it is updated a few statements later, this too is redundant and can be removed. Cleans up clan warnings: drivers/usb/gadget/udc/pxa27x_udc.c:986:3: warning: Value stored to 'is_short' is never read drivers/usb/gadget/udc/pxa27x_udc.c:1141:2: warning: Value stored to 'dev' is never read Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2017-11-07USB: gadget: udc: Remove redundant license textGreg Kroah-Hartman
Now that the SPDX tag is in all USB files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Kevin Cernekee <cernekee@gmail.com> Cc: Florian Fainelli <f.fainelli@gmail.com> Cc: Vladimir Zapolskiy <vz@mleia.com> Cc: Sylvain Lemieux <slemieux.tyco@gmail.com> Cc: Daniel Mack <daniel@zonque.org> Cc: Haojian Zhuang <haojian.zhuang@gmail.com> Cc: Michal Simek <michal.simek@xilinx.com> Cc: "Sören Brinkmann" <soren.brinkmann@xilinx.com> Cc: Raviteja Garimella <raviteja.garimella@broadcom.com> Cc: Romain Perier <romain.perier@collabora.com> Cc: Johan Hovold <johan@kernel.org> Cc: Al Cooper <alcooperx@gmail.com> Cc: Srinath Mannam <srinath.mannam@broadcom.com> Cc: Roger Quadros <rogerq@ti.com> Cc: Krzysztof Opasiak <k.opasiak@samsung.com> Cc: Stefan Agner <stefan@agner.ch> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: "Felix Hädicke" <felixhaedicke@web.de> Cc: Peter Chen <peter.chen@nxp.com> Cc: Allen Pais <allen.lkml@gmail.com> Cc: Yuyang Du <yuyang.du@intel.com> Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Acked-by: Li Yang <leoyang.li@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-04USB: add SPDX identifiers to all remaining files in drivers/usb/Greg Kroah-Hartman
It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Update the drivers/usb/ and include/linux/usb* files with the correct SPDX license identifier based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Kate Stewart <kstewart@linuxfoundation.org> Cc: Philippe Ombredanne <pombredanne@nexb.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com> Acked-by: Johan Hovold <johan@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-27usb: gadget: pxa27x: Remove duplicate function prototypePetr Cvek
Functions udc_enable() and udc_disable() have a duplicated prototype. Remove it. Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Petr Cvek <petr.cvek@tul.cz> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2017-03-06usb: gadget: pxa27x: Test for a valid argument pointerPetr Cvek
A call usb_put_phy(udc->transceiver) must be tested for a valid pointer. Use an already existing test for usb_unregister_notifier call. Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Reported-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Petr Cvek <petr.cvek@tul.cz> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2017-01-24usb: gadget: udc: constify usb_ep_ops structuresBhumika Goyal
Declare usb_ep_ops structures as const as they are only stored in the ops field of an usb_ep structure. This field is of type const, so usb_ep_ops structures having this property can be made const too. Done using Coccinelle( A smaller version of the script) @r disable optional_qualifier@ identifier i; position p; @@ static struct usb_ep_ops i@p={...}; @ok@ identifier r.i; position p; struct mv_ep a; struct mv_u3d_ep b; struct omap_ep c; @@ ( a.ep.ops=&i@p; | b.ep.ops=&i@p; | c.ep.ops=&i@p; ) @bad@ position p!={r.p,ok.p}; identifier r.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ +const struct usb_ep_ops i; File size details before and after applying the patch. First line of every .o file shows the file size before patching and second line shows the file size after patching. text data bss dec hex filename 7782 384 8 8174 1fee usb/gadget/udc/fotg210-udc.o 7878 296 8 8182 1ff6 usb/gadget/udc/fotg210-udc.o 17866 992 40 18898 49d2 usb/gadget/udc/fsl_udc_core.o 17954 896 40 18890 49ca usb/gadget/udc/fsl_udc_core.o 9646 288 8 9942 26d6 usb/gadget/udc/fusb300_udc.o 9742 192 8 9942 26d6 usb/gadget/udc/fusb300_udc.o 12752 416 8 13176 3378 drivers/usb/gadget/udc/goku_udc.o 12832 328 8 13168 3370 drivers/usb/gadget/udc/goku_udc.o 16541 1696 8 18245 4745 drivers/usb/gadget/udc/gr_udc.o 16637 1600 8 18245 4745 drivers/usb/gadget/udc/gr_udc.o 15798 288 16 16102 3ee6 drivers/usb/gadget/udc/m66592-udc.o 15894 192 16 16102 3ee6 drivers/usb/gadget/udc/m66592-udc.o 17751 3808 16 21575 5447 usb/gadget/udc/mv_u3d_core.o 17839 3712 16 21567 543f usb/gadget/udc/mv_u3d_core.o 17348 1112 24 18484 4834 usb/gadget/udc/mv_udc_core.o 17436 1016 24 18476 482c usb/gadget/udc/mv_udc_core.o 25990 2620 13 28623 6fcf drivers/usb/gadget/udc/net2272.o 26086 2524 13 28623 6fcf drivers/usb/gadget/udc/net2272.o 18409 7312 8 25729 6481 drivers/usb/gadget/udc/pxa27x_udc.o 18505 7208 8 25721 6479 drivers/usb/gadget/udc/pxa27x_udc.o 18644 288 16 18948 4a04 usb/gadget/udc/r8a66597-udc.o 18740 192 16 18948 4a04 usb/gadget/udc/r8a66597-udc.o Files: drivers/usb/gadget/udc/{s3c-hsudc.o/omap_udc.o/fsl_qe_udc.o} did not complie. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-08-25usb: gadget: pxa27x: add phy notifier event handlerRobert Jarzmik
In the legacy behavior, and USB phy, upon detection a VBus signal, was calling usb_gadget_vbus_(dis)connect(). This model doesn't work if the phy is generic and doesn't have an adherence to the gadget API. Instead of relying on the phy to call the gadget API, hook up the phy notifier to report the VBus event, and upon it call the usb gadget API ourselves. This brings a new ordering problem, as before even if the usb_get_phy() was failing because the UDC was probed before the phy, the phy would call the gadget anyway, making the VBus connection event forwarded to the gadget. Now we rely on the notifier, we have to ensure the xxx_get_phy() does indeed work. In order to cope with this, it is assumed that : - for legacy platform_data machine, as the ordering cannot be ensured, the phy must call usb_gadget_vbus_(dis)connect, such as phy-gpio-vbus-usb.c - for new devicetree platforms, we'll rely on the probe deferral, and the phy can be gadget API agnostic. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2016-06-21usb: pxa27x_udc: remove unused function argumentArnd Bergmann
We get a warning for this when building with W=1 because the argument gets assigned to something else but never read: drivers/usb/gadget/udc/pxa27x_udc.c: In function 'stop_activity': drivers/usb/gadget/udc/pxa27x_udc.c:1828:74: error: parameter 'driver' set but not used [-Werror=unused-but-set-parameter] This remove the argument entirely. Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2015-11-19usb: gadget: pxa27x: fix suspend callbackFelipe Balbi
pxa27x disconnects pullups on suspend but doesn't notify the gadget driver about it, so gadget driver can't disable the endpoints it was using. This causes problems on resume because gadget core will think endpoints are still enabled and just ignore the following usb_ep_enable(). Fix this problem by calling gadget_driver->disconnect(). Cc: <stable@vger.kernel.org> # v3.10+ Tested-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-07-30usb: gadget: add 'quirk_altset_not_supp' to usb_gadgetRobert Baldyga
Due to some UDC controllers may not support altsettings, usb gadget layer needs to provide a generic way to inform gadget functions about non-standard hardware limitations. This patch adds 'quirk_altset_not_supp' field to struct usb_gadget and helper function gadget_is_altset_supported(). It also sets 'quirk_altset_not_supp' to 1 in pxa25x_udc and pxa27x_udc drivers, which have such limitation. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-07-29usb: pass flags parameter to gpiod_get functionsUwe Kleine-König
Since 39b2bbe3d715 (gpio: add flags argument to gpiod_get*() functions) which appeared in v3.17-rc1, the gpiod_get* functions take an additional parameter that allows to specify direction and initial value for output. Currently this parameter is made optional with the help of a cpp trick. To allow dropping this hack convert callers to explictly pass a value for flags. Acked-by: Felipe Balbi <balbi@ti.com> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-03-19usb: gadget: constify of_device_id arrayFabian Frederick
of_device_id is always used as const. (See driver.of_match_table and open firmware functions) Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-03-10usb: gadget: udc: pxa27x_udc: Remove use of seq_printf return valueJoe Perches
The seq_printf return value, because it's frequently misused, will eventually be converted to void. See: commit 1f33c41c03da ("seq_file: Rename seq_overflow() to seq_has_overflowed() and make public") While there, simplify the error handler logic by returning immediately and remove the unnecessary labels. Tested-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-12usb: gadget: pxa27x_udc: delete pullup operation at .udc_start and .udc_stopPeter Chen
UDC core has already done it before .udc_stop and after .udc_start. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-12-14Merge tag 'driver-core-3.19-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core update from Greg KH: "Here's the set of driver core patches for 3.19-rc1. They are dominated by the removal of the .owner field in platform drivers. They touch a lot of files, but they are "simple" changes, just removing a line in a structure. Other than that, a few minor driver core and debugfs changes. There are some ath9k patches coming in through this tree that have been acked by the wireless maintainers as they relied on the debugfs changes. Everything has been in linux-next for a while" * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits) Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries" fs: debugfs: add forward declaration for struct device type firmware class: Deletion of an unnecessary check before the function call "vunmap" firmware loader: fix hung task warning dump devcoredump: provide a one-way disable function device: Add dev_<level>_once variants ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries ath: use seq_file api for ath9k debugfs files debugfs: add helper function to create device related seq_file drivers/base: cacheinfo: remove noisy error boot message Revert "core: platform: add warning if driver has no owner" drivers: base: support cpu cache information interface to userspace via sysfs drivers: base: add cpu_device_create to support per-cpu devices topology: replace custom attribute macros with standard DEVICE_ATTR* cpumask: factor out show_cpumap into separate helper function driver core: Fix unbalanced device reference in drivers_probe driver core: fix race with userland in device_add() sysfs/kernfs: make read requests on pre-alloc files use the buffer. sysfs/kernfs: allow attributes to request write buffer be pre-allocated. fs: sysfs: return EGBIG on write if offset is larger than file size ...
2014-11-10usb: gadget: pxa27x_udc: fix warning in non device-tree buildRobert Jarzmik
The recent change bringing device-tree support triggers a warning in a non device-tree build : drivers/usb/gadget/udc/pxa27x_udc.c:2405:28: warning: 'udc_pxa_dt_ids' defined but not used [-Wunused-variable] Fix the warning with a preprocessor condition. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-11-03usb: gadget: udc: pxa27x: do not call usb_gadget_unregister_driver()Felipe Balbi
that call is completely unnecessary because usb_del_gadget_udc() already makes sure the gadget driver is properly unregistered from the UDC. Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-11-03usb: gadget: pxa27x_udc: fix clock prepare and enableRobert Jarzmik
As the udc clock controls both the output signals and the internal IP, it must be enabled before any UDC register is touched. The bug is revealed when the clock framework disables the clock for a couple of milliseconds during the boot sequence, and the endpoint configuration is lost. The bug is hidden when clock framework is not used, because no "unused clocks disable" occurs. This patch fixes the wrong behaviour by ensuring that : - whenever a UDC register is read or written, the clock is enabled - reworks the endpoints programming to have it done under running clock - reworks suspend/resume to ensure the same thing Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-11-03usb: gadget: pxa27x_udc: use devm_* helpersRobert Jarzmik
Use devm_* helpers in the probe function to simplify the error path and the remove path. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-11-03usb: gadget: remove unnecessary 'driver' argumentFelipe Balbi
now that no UDC driver relies on the extra 'driver' argument to ->udc_stop(), we can safely remove it. This commit is based on previous work by Robert Baldyga <r.baldyga@samsung.com> which can be found at [1]; however that patch turned out to have a high probability of regressing many UDC drivers because of a blind search & replace s/driver/$udc->driver/ which caused the 'driver' argument to stop_activity() to be a valid non-NULL pointer when it should be NULL, thus causing UDCs to mistakenly call gadget driver's ->disconnect() callback. [1] http://markmail.org/message/x5zneg4xea4zntab Acked-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-11-03usb: gadget: udc: pxa27x: do not rely on 'driver' argumentFelipe Balbi
future patches will remove the extra 'driver' argument to ->udc_stop(), in order to do that, we must make sure that our UDC does not rely on it first. Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-11-03usb: gadget: pxa27x_udc: add devicetree supportRobert Jarzmik
Add support for device-tree device discovery. If devicetree is not provided, fallback to legacy platform data "discovery". Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Cc: devicetree@vger.kernel.org Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-11-03usb: gadget: pxa27x_udc: transfer mach_info into pxa_udcRobert Jarzmik
Convert the mach info, and store the udc_command in the pxa_udc control structure. It is to be noticed that the udc_is_connected() in mach info is not transfered. This was not used, as mioa701 machine doesn't need it, balloon3 doesn't really use it, and most importantly the current driver never uses it. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-11-03usb: gadget: pxa27x_udc: prepare device-tree supportRobert Jarzmik
For this preparation, a preliminary cleanup is done : - convert the probing of pxa27x_udc to gpio_desc. The conversion is partial because : - the platform data still provides a gpio number, not a gpio desc Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-10-20usb: gadget: udc: drop owner assignment from platform_driversWolfram Sang
A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-09-25usb: gadget: Refactor request completionMichal Sojka
Use the recently introduced usb_gadget_giveback_request() in favor of direct invocation of the completion routine. All places in drivers/usb/ matching "[-.]complete(" were replaced with a call to usb_gadget_giveback_request(). This was compile-tested with all ARM drivers enabled and runtime-tested for musb. Signed-off-by: Michal Sojka <sojka@merica.cz> Acked-by: Felipe Balbi <balbi@ti.com> Tested-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-16usb: gadget: Gadget directory cleanup - group UDC driversAndrzej Pietrasiewicz
The drivers/usb/gadget directory contains many files. Files which are related can be distributed into separate directories. This patch moves the UDC drivers into a separate directory. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>