summaryrefslogtreecommitdiff
path: root/drivers/usb/otg
AgeCommit message (Collapse)AuthorFilesLines
2012-10-02Merge branch 'for-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wqLinus Torvalds1-1/+1
Pull workqueue changes from Tejun Heo: "This is workqueue updates for v3.7-rc1. A lot of activities this round including considerable API and behavior cleanups. * delayed_work combines a timer and a work item. The handling of the timer part has always been a bit clunky leading to confusing cancelation API with weird corner-case behaviors. delayed_work is updated to use new IRQ safe timer and cancelation now works as expected. * Another deficiency of delayed_work was lack of the counterpart of mod_timer() which led to cancel+queue combinations or open-coded timer+work usages. mod_delayed_work[_on]() are added. These two delayed_work changes make delayed_work provide interface and behave like timer which is executed with process context. * A work item could be executed concurrently on multiple CPUs, which is rather unintuitive and made flush_work() behavior confusing and half-broken under certain circumstances. This problem doesn't exist for non-reentrant workqueues. While non-reentrancy check isn't free, the overhead is incurred only when a work item bounces across different CPUs and even in simulated pathological scenario the overhead isn't too high. All workqueues are made non-reentrant. This removes the distinction between flush_[delayed_]work() and flush_[delayed_]_work_sync(). The former is now as strong as the latter and the specified work item is guaranteed to have finished execution of any previous queueing on return. * In addition to the various bug fixes, Lai redid and simplified CPU hotplug handling significantly. * Joonsoo introduced system_highpri_wq and used it during CPU hotplug. There are two merge commits - one to pull in IRQ safe timer from tip/timers/core and the other to pull in CPU hotplug fixes from wq/for-3.6-fixes as Lai's hotplug restructuring depended on them." Fixed a number of trivial conflicts, but the more interesting conflicts were silent ones where the deprecated interfaces had been used by new code in the merge window, and thus didn't cause any real data conflicts. Tejun pointed out a few of them, I fixed a couple more. * 'for-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: (46 commits) workqueue: remove spurious WARN_ON_ONCE(in_irq()) from try_to_grab_pending() workqueue: use cwq_set_max_active() helper for workqueue_set_max_active() workqueue: introduce cwq_set_max_active() helper for thaw_workqueues() workqueue: remove @delayed from cwq_dec_nr_in_flight() workqueue: fix possible stall on try_to_grab_pending() of a delayed work item workqueue: use hotcpu_notifier() for workqueue_cpu_down_callback() workqueue: use __cpuinit instead of __devinit for cpu callbacks workqueue: rename manager_mutex to assoc_mutex workqueue: WORKER_REBIND is no longer necessary for idle rebinding workqueue: WORKER_REBIND is no longer necessary for busy rebinding workqueue: reimplement idle worker rebinding workqueue: deprecate __cancel_delayed_work() workqueue: reimplement cancel_delayed_work() using try_to_grab_pending() workqueue: use mod_delayed_work() instead of __cancel + queue workqueue: use irqsafe timer for delayed_work workqueue: clean up delayed_work initializers and add missing one workqueue: make deferrable delayed_work initializer names consistent workqueue: cosmetic whitespace updates for macro definitions workqueue: deprecate system_nrt[_freezable]_wq workqueue: deprecate flush[_delayed]_work_sync() ...
2012-10-02Merge tag 'cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-socLinus Torvalds1-1/+1
Pull ARM soc general cleanups from Olof Johansson: "This is a large branch that contains a handful of different cleanups: - Fixing up the I/O space remapping on PCI on ARM. This is a series from Rob Herring that restructures how all pci devices allocate I/O space, and it's part of the work to allow multiplatform kernels. - A number of cleanup series for OMAP, moving and removing some headers, sparse irq rework and in general preparation for multiplatform. - Final removal of all non-DT boards for Tegra, it is now device-tree-only! - Removal of a stale platform, nxp4008. It's an old mobile chipset that is no longer in use, and was very likely never really used with a mainline kernel. We have not been able to find anyone interested in keeping it around in the kernel. - Removal of the legacy dmaengine driver on tegra + A handful of other things that I haven't described above." Fix up some conflicts with the staging tree (and because nxp4008 was removed) * tag 'cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (184 commits) ARM: OMAP2+: serial: Change MAX_HSUART_PORTS to 6 ARM: OMAP4: twl-common: Support for additional devices on i2c1 bus ARM: mmp: using for_each_set_bit to simplify the code ARM: tegra: harmony: fix ldo7 regulator-name ARM: OMAP2+: Make omap4-keypad.h local ARM: OMAP2+: Make l4_3xxx.h local ARM: OMAP2+: Make l4_2xxx.h local ARM: OMAP2+: Make l3_3xxx.h local ARM: OMAP2+: Make l3_2xxx.h local ARM: OMAP1: Move irda.h from plat to mach ARM: OMAP2+: Make hdq1w.h local ARM: OMAP2+: Make gpmc-smsc911x.h local ARM: OMAP2+: Make gpmc-smc91x.h local ARM: OMAP1: Move flash.h from plat to mach ARM: OMAP2+: Make debug-devices.h local ARM: OMAP1: Move board-voiceblue.h from plat to mach ARM: OMAP1: Move board-sx1.h from plat to mach ARM: OMAP2+: Make omap-wakeupgen.h local ARM: OMAP2+: Make omap-secure.h local ARM: OMAP2+: Make ctrl_module_wkup_44xx.h local ...
2012-09-21ARM: OMAP1: Make plat/mux.h omap1 onlyTony Lindgren1-1/+1
We are moving omap2+ to use the device tree based pinctrl-single.c and will be removing the old mux framework. This will remove the omap1 specific parts from plat-omap. Acked-by: Felipe Balbi <balbi@ti.com> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: linux-usb@vger.kernel.org Cc: linux-pcmcia@lists.infradead.org Cc: spi-devel-general@lists.sourceforge.net Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-09-10usb: otg: mxs-phy: Fix mx23 operationMike Thompson1-3/+35
Currently mx23 fails to enumerate a USB device: [ 1.300000] hub 1-0:1.0: unable to enumerate USB device on port 1 [ 1.520000] hub 1-0:1.0: unable to enumerate USB device on port 1 [ 1.740000] hub 1-0:1.0: unable to enumerate USB device on port 1 [ 1.960000] hub 1-0:1.0: unable to enumerate USB device on port 1 [ 2.180000] hub 1-0:1.0: unable to enumerate USB device on port 1 Use a kernel workqueue to asynchronously delay the setting of ENHOSTDISCONDETECT bit until after higher level hub connect/reset processing is complete. Prematurely setting the bit prevents the connection processing from completing and not setting it prevents disconnect from being detected. No delay is needed for clearing of ENHOSTDISCONDETECT. Successfully tested on mx23-olinuxino (micro, mini and maxi variants) and mx28evk. Cc: stable@vger.kernel.org # v3.6 Signed-off-by: Mike Thompson <mpthompson@gmail.com> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-09-10usb: otg: move the dereference below the NULL testWei Yongjun1-10/+24
The dereference should be moved below the NULL test. spatch with a semantic match is used to found this. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-09-06usb: twl4030: Add device tree support for twl4030 usbKishon Vijay Abraham I1-6/+20
Add device tree support for twl4030 usb driver. Update the Documentation with device tree binding information. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-09-06usb: twl6030: Add dt support for twl6030 usbKishon Vijay Abraham I1-13/+26
Add device tree support for twl6030 usb driver. Update the Documentation with device tree binding information. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-09-06usb: otg: make twl6030_usb as a comparator driver to omap_usb2Kishon Vijay Abraham I2-101/+19
All the PHY configuration other than VBUS, ID GND and OTG SRP are removed from twl6030. The phy configurations are taken care by the dedicated usb2 phy driver. So twl6030 is made as comparator driver for VBUS and ID detection. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-08-21workqueue: deprecate flush[_delayed]_work_sync()Tejun Heo1-1/+1
flush[_delayed]_work_sync() are now spurious. Mark them deprecated and convert all users to flush[_delayed]_work(). If you're cc'd and wondering what's going on: Now all workqueues are non-reentrant and the regular flushes guarantee that the work item is not pending or running on any CPU on return, so there's no reason to use the sync flushes at all and they're going away. This patch doesn't make any functional difference. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Russell King <linux@arm.linux.org.uk> Cc: Paul Mundt <lethal@linux-sh.org> Cc: Ian Campbell <ian.campbell@citrix.com> Cc: Jens Axboe <axboe@kernel.dk> Cc: Mattia Dongili <malattia@linux.it> Cc: Kent Yoder <key@linux.vnet.ibm.com> Cc: David Airlie <airlied@linux.ie> Cc: Jiri Kosina <jkosina@suse.cz> Cc: Karsten Keil <isdn@linux-pingi.de> Cc: Bryan Wu <bryan.wu@canonical.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Alasdair Kergon <agk@redhat.com> Cc: Mauro Carvalho Chehab <mchehab@infradead.org> Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: David Woodhouse <dwmw2@infradead.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: linux-wireless@vger.kernel.org Cc: Anton Vorontsov <cbou@mail.ru> Cc: Sangbeom Kim <sbkim73@samsung.com> Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Eric Van Hensbergen <ericvh@gmail.com> Cc: Takashi Iwai <tiwai@suse.de> Cc: Steven Whitehouse <swhiteho@redhat.com> Cc: Petr Vandrovec <petr@vandrovec.name> Cc: Mark Fasheh <mfasheh@suse.com> Cc: Christoph Hellwig <hch@infradead.org> Cc: Avi Kivity <avi@redhat.com>
2012-08-09usb: otg: Remove the unneeded NULL checkShubhrajyoti D1-1/+1
The function usb_add_phy trusts the sanity of the caller. Also it accesses x after the NULL check. Remove the unneeded check. Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-08-03usb: xceiv: nop: let it work as USB2 and USB3 phyFelipe Balbi1-1/+6
We add a platform_data to pass the desired mode for the nop-xceiv so it can work on USB2 and USB3 modes. Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-08-03usb: xceiv: create nop-usb-xceiv.h and avoid pollution on otg.hFelipe Balbi1-0/+1
nop-usb-xceiv was polluting otg.h with its own function prototypes. Move those prototypes to a nop-usb-xceiv.h header. Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-08-01Merge tag 'random_for_linus' of ↵Linus Torvalds1-1/+0
git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random Pull random subsystem patches from Ted Ts'o: "This patch series contains a major revamp of how we collect entropy from interrupts for /dev/random and /dev/urandom. The goal is to addresses weaknesses discussed in the paper "Mining your Ps and Qs: Detection of Widespread Weak Keys in Network Devices", by Nadia Heninger, Zakir Durumeric, Eric Wustrow, J. Alex Halderman, which will be published in the Proceedings of the 21st Usenix Security Symposium, August 2012. (See https://factorable.net for more information and an extended version of the paper.)" Fix up trivial conflicts due to nearby changes in drivers/{mfd/ab3100-core.c, usb/gadget/omap_udc.c} * tag 'random_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random: (33 commits) random: mix in architectural randomness in extract_buf() dmi: Feed DMI table to /dev/random driver random: Add comment to random_initialize() random: final removal of IRQF_SAMPLE_RANDOM um: remove IRQF_SAMPLE_RANDOM which is now a no-op sparc/ldc: remove IRQF_SAMPLE_RANDOM which is now a no-op [ARM] pxa: remove IRQF_SAMPLE_RANDOM which is now a no-op board-palmz71: remove IRQF_SAMPLE_RANDOM which is now a no-op isp1301_omap: remove IRQF_SAMPLE_RANDOM which is now a no-op pxa25x_udc: remove IRQF_SAMPLE_RANDOM which is now a no-op omap_udc: remove IRQF_SAMPLE_RANDOM which is now a no-op goku_udc: remove IRQF_SAMPLE_RANDOM which was commented out uartlite: remove IRQF_SAMPLE_RANDOM which is now a no-op drivers: hv: remove IRQF_SAMPLE_RANDOM which is now a no-op xen-blkfront: remove IRQF_SAMPLE_RANDOM which is now a no-op n2_crypto: remove IRQF_SAMPLE_RANDOM which is now a no-op pda_power: remove IRQF_SAMPLE_RANDOM which is now a no-op i2c-pmcmsp: remove IRQF_SAMPLE_RANDOM which is now a no-op input/serio/hp_sdc.c: remove IRQF_SAMPLE_RANDOM which is now a no-op mfd: remove IRQF_SAMPLE_RANDOM which is now a no-op ...
2012-07-26Merge tag 'usb-3.6-rc1' of ↵Linus Torvalds13-138/+433
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB patches from Greg Kroah-Hartman: "Here's the big USB patch set for the 3.6-rc1 merge window. Lots of little changes in here, primarily for gadget controllers and drivers. There's some scsi changes that I think also went in through the scsi tree, but they merge just fine. All of these patches have been in the linux-next tree for a while now. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>" Fix up trivial conflicts in include/scsi/scsi_device.h (same libata conflict that Jeff had already encountered) * tag 'usb-3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (207 commits) usb: Add USB_QUIRK_RESET_RESUME for all Logitech UVC webcams usb: Add quirk detection based on interface information usb: s3c-hsotg: Add header file protection macros in s3c-hsotg.h USB: ehci-s5p: Add vbus setup function to the s5p ehci glue layer USB: add USB_VENDOR_AND_INTERFACE_INFO() macro USB: notify phy when root hub port connect change USB: remove 8 bytes of padding from usb_host_interface on 64 bit builds USB: option: add ZTE MF821D USB: sierra: QMI mode MC7710 moved to qcserial USB: qcserial: adding Sierra Wireless devices USB: qcserial: support generic Qualcomm serial ports USB: qcserial: make probe more flexible USB: qcserial: centralize probe exit path USB: qcserial: consolidate usb_set_interface calls USB: ehci-s5p: Add support for device tree USB: ohci-exynos: Add support for device tree USB: ehci-omap: fix compile failure(v1) usb: host: tegra: pass correct pointer in ehci_setup() USB: ehci-fsl: Update ifdef check to work on 64-bit ppc USB: serial: keyspan: Removed unrequired parentheses. ...
2012-07-19isp1301_omap: remove IRQF_SAMPLE_RANDOM which is now a no-opTheodore Ts'o1-1/+0
With the changes in the random tree, IRQF_SAMPLE_RANDOM is now a no-op; interrupt randomness is now collected unconditionally in a very low-overhead fashion; see commit 775f4b297b. The IRQF_SAMPLE_RANDOM flag was scheduled to be removed in 2009 on the feature-removal-schedule, so this patch is preparation for the final removal of this flag. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Cc: Felipe Balbi <balbi@ti.com>
2012-07-09usb: otg: add basic mxs phy driver supportRichard Zhao3-0/+197
mxs phy is used in Freescale i.MX SoCs, for example imx23, imx28, imx6Q. This patch adds the basic host support. Signed-off-by: Richard Zhao <richard.zhao@freescale.com> Signed-off-by: Marek Vasut <marex@denx.de> Cc: Peter Chen <peter.chen@freescale.com> Acked-by: Felipe Balbi <balbi@ti.com> Tested-by: Subodh Nijsure <snijsure@grid-net.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-09drivers: usb: otg: fix build break in twl6030-usb.cKishon Vijay Abraham I1-2/+0
Fixed a mistake in the merge conflict resoultion commit(ff9cce) in file twl6030-usb.c Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-06Merge tag 'xceiv-for-v3.6' of ↵Greg Kroah-Hartman10-136/+236
git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next usb: phy: patches for v3.6 merge window We are starting to support multiple USB phys as we should thanks for Kishon's work. DeviceTree support for USB PHYs won't come until discussion with DeviceTree maintainer is finished. Together with that series, we have one fix for twl4030 which missed a IRQF_ONESHOT annotation when requesting a threaded IRQ without a top half handler, and removal of an unused variable compilation warning to isp1301_omap.
2012-07-03Merge tag 'omap-cleanup-for-v3.6' of ↵Arnd Bergmann1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/cleanup From Tony Lindgren <tony@atomide.com> Here is some more omap clean-up. The biggest changes are hwmod, clock, and System Control Module cleanup, and the removal of the last instance of omap_read/write usage for omap2+ with the removal of unused USB OHCI Full Speed driver support. The removed OHCI is only currently used for omap1 as the actively used omap2+ boards have either MUSB or another instance of OHCI+EHCI that's more usable. * tag 'omap-cleanup-for-v3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP2+: hwmod: remove prm_clkdm, cm_clkdm; allow hwmods to have no clockdomain ARM: OMAP3: Move McBSP fck clock alias to hwmod data ARM: OMAP2: Move McBSP fck clock alias to hwmod data for OMAP2430 ARM: OMAP2: Move McBSP fck clock alias to hwmod data for OMAP2420 ARM: OMAP: dsp: interface to control module functions ARM: OMAP2+: control: new APIs to configure boot address and mode ARM: OMAP2+: CLEANUP: Remove ARCH_OMAPx ifdef from struct dpll_data ARM: OMAP2+: hwmod: use init-time function pointer for _init_clkdm ARM: OMAP2+: hwmod: use init-time function pointer for hardreset ARM: OMAP2+: hwmod: use init-time function pointer for wait_target_ready ARM: OMAP4: hwmod: drop extra cpu_is check from _wait_target_disable() ARM: OMAP2+: hwmod: use init-time function ptrs for enable/disable module ARM: OMAP4: hwmod: rename _enable_module to _omap4_enable_module() ARM: OMAP: Make FS USB omap1 only ARM: OMAP2: Remove legacy USB FS support ARM: OMAP3: There is no FS USB controller on omap3 ARM: OMAP: dma: Clear status registers on enable/disable irq Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2012-07-02usb: phy: fix error handling in usb_get_phyKishon Vijay Abraham I1-1/+2
spin_unlock_irqrestore() was not being called in the error path of usb_get_phy. It's fixed here. Reported-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-07-02usb: phy: fix return value check of usb_get_phyKishon Vijay Abraham I1-2/+2
usb_get_phy will return -ENODEV if it's not able to find the phy. Hence fixed all the callers of usb_get_phy to check for this error condition instead of relying on a non-zero value as success condition. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-25usb: otg: twl: use devres API to allocate resourcesKishon Vijay Abraham I2-25/+6
used devres API while allocating memory resource in twl4030 and twl6030 so that these resources are released automatically on driver detach. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-25usb: musb: move otg specific initializations from twl to glueKishon Vijay Abraham I2-14/+0
Moved otg specific state(OTG_STATE_B_IDLE, OTG_STATE_A_IDLE) initializations from twl to glue. These initializations are removed from twl4030 and twl6030 and moved to the mailbox API defined in glue. This is part of the cleanup in preparation to make use of usb2 phy driver. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-25usb: musb: twl: use mailbox API to send VBUS or ID eventsKishon Vijay Abraham I2-49/+44
The atomic notifier from twl4030/twl6030 to notifiy VBUS and ID events, is replaced by a direct call to omap musb blue. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-25usb: otg: utils: devres: Add API's to associate a device with the phyKishon Vijay Abraham I1-0/+62
Used devres API's to associate the phy with a device so that on driver detach, release function is invoked on the devres data(usb_phy) and devres data(usb_phy) is released. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-25usb: otg: support for multiple transceivers by a single controllerKishon Vijay Abraham I10-30/+102
Add a linked list for keeping multiple PHY instances with different types so that we can have separate USB2 and USB3 PHYs on one single board. _get_phy_ has been changed so that the controller gets the transceiver by type. _remove_phy_ has been added to let the phy be removed from the phy list. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-25usb: otg: utils: rename function name in OTG utilsKishon Vijay Abraham I10-35/+35
_transceiver() in otg.c is replaced with _phy. usb_set_transceiver is replaced with usb_add_phy to make it similar to other usb standard function names like usb_add_hcd. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-22usb: otg: twl6030-usb: Fix twl writesMoiz Sonasath1-9/+6
There were mistakes in writing to few twl registers. There was interchange in the parameters being passed to twl6030_writeb(). Signed-off-by: Moiz Sonasath <m-sonasath@ti.com> Signed-off-by: Ruslan Bilovol <ruslan.bilovol@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-14usb: otg: twl: add missing IRQF_ONESHOTFelipe Balbi1-2/+2
this patch fixes the following warning: [ 2.825378] genirq: Threaded irq requested \ with handler=NULL and !ONESHOT for irq 363 Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-04usb: otg: isp1301_omap: resolve unused variable warning from gccPaul Walmsley1-7/+8
Resolve this build warning: drivers/usb/otg/isp1301_omap.c: In function 'isp1301_set_peripheral': drivers/usb/otg/isp1301_omap.c:1340:6: warning: unused variable 'l' This shows up when building with the 'omap1_defconfig' and '5912osk_testconfig' configs from git://git.pwsan.com/omap_kconfigs. Compile-tested only. Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com> Cc: Felipe Balbi <balbi@ti.com> Signed-off-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-04ARM: OMAP: Make FS USB omap1 onlyTony Lindgren1-1/+1
As the FS USB code is not being actively used for omap2+ there's no point keeping it around for omap2+. Let's make the FS USB platform init code omap1 only so we can remove the last user of omap_read/write for omap2+, and simplify things for further USB, DMA, and device tree related work. While at it, also group the mach includes for the related drivers. Cc: linux-usb@vger.kernel.org Cc: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-05-17USB: gpio_vbus: wakeup support on GPIO VBUS interruptsShinya Kuribayashi1-0/+33
We'd like to see the system waking up from the system-wide suspend when it gets plugged-in, or the USB cable is pulled out. Also makes it configurable via platform data 'wakeup'. Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-17USB: gpio_vbus: a missing cancellation of workqueue in remove() functionShinya Kuribayashi1-0/+1
Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-17USB: gpio_vbus: handle IRQ flags properlyShinya Kuribayashi1-5/+6
Currently, 'res->flags' handlings are wrong in three respects: * the driver _modifies_ the contents of platform data * res->flags is set up, but not used anywhere in the driver * request_irq() always takes VBUS_IRQ_FLAGS, regardless of refs->flags This patch tries to fix this with a policy: If a platform IRQ resource is available, give preference to its IRQ flag(s) over a default one (VBUS_IRQ_FLAGS). Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-17USB: gpio_vbus: remove IRQF_SAMPLE_RANDOM useShinya Kuribayashi1-3/+2
IRQF_SAMPLE_RANDOM has been scheduled for removal for years (it was scheduled by July 2009, but not yet remvoed). I'm not sure when it's going to take place, but would be better to remove it now. Thanks for scripts/checkpatch secretary. Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-17USB: gpio_vbus: use cached IRQ number for consistency with the probed oneShinya Kuribayashi1-4/+6
gpio_vbus is designed to be able to get an IRQ number for VBUS change interrupt either (1) through platform_get_resource(IORESOURCE_IRQ) or (2) by processing gpio_to_irq(pdata->gpio_vbus), in probe() function. On the other hand, gpio_vbus_set_peripheral() and gpio_vbus_remove() are always doing gpio_to_irq(pdata->gpio_vbus) to get an IRQ number. This is not just inconsistent, but also broken. There is no guarantee that an IRQ number obtained by platform_get_resource() is equal to gpio_to_irq(pdata->gpio_vbus). Cache an IRQ number in probe() function, and use it where necessary. Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-17USB: twl6030-usb: pass IRQF_ONESHOT to request_threaded_irqMing Lei1-2/+2
The flag of IRQF_ONESHOT should be passed to request_threaded_irq, otherwise the following failure message will be dumped because hardware handler is defined as NULL: [ 2.271148] genirq: Threaded irq requested with handler=NULL and !ONESHOT for irq 356 [ 2.279541] twl6030_usb twl6030_usb: can't get IRQ 356, err -22 [ 2.285919] twl6030_usb: probe of twl6030_usb failed with error -22 The patch fixes the twl6030-usb probe failure. Signed-off-by: Ming Lei <ming.lei@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14USB: gpio_vbus: avoid consecutive vbus_session calls with the same "is_active"Shinya Kuribayashi1-2/+10
Basically, ->vbus_session() calls should be served when VBUS session starts and ends (it's not whenever transciever drivers detect VBUS _changes_). Otherwise, if UDC gadget drivers don't want for some reason ->vbus_session() calls with the same "is_active" value, either OTG or UDC drivers need to have some protection handlings. Also, on platforms using this 'gpio_vbus' driver, the driver is only allowed to check whether VBUS is applied. There is no kernel-standard way prepared for UDC gadget drivers to do that. With this in mind, gpio_vbus should try to prevent unnecessary consecutive vbus_session calls being served with the same "in_active" value. Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14USB: gpio_vbus: put a missing regulator_put() on errorShinya Kuribayashi1-0/+1
Note that regulator_put() doesn't care about whether ->vbus_draw is valid or not. Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14USB: gpio_vbus: provide an appropriate debounce intervalShinya Kuribayashi1-4/+4
In commit c2344f13b59e007d782a3e591ebc551bc583a8b7 (USB: gpio_vbus: add delayed vbus_session calls, 2009-01-24), usb_gadget_vbus_connect() and ...disconnect() were extracted from the interrupt handler, so to allow vbus_session handlers to deal with msleep() calls. This patch takes the approach one step further. USB2.0 specification (7.1.7.3 Connect and Disconnect Signaling) says that the USB system software (shall) provide a debounce interval with a minimum duration of 100 ms, which ensures that the electrical and mechanical connection is stable before software attempts to reset the attached device. Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14USB: gpio_vbus: fix inconsistent 'dev_id' parameters at free_irq()Shinya Kuribayashi1-2/+2
'dev_id' has to be the same with the one passed to request_irq(). Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-12usb: otg: gpio_vbus: Add otg transceiver events and notifiersHeiko Stübner1-1/+14
Commit 9ad63986c606 (pda_power: Add support for using otg transceiver events) converted the pda-power driver to use otg events to determine the status of the power supply. As gpio-vbus didn't use otg events until now, this change breaks setups of pda-power with a gpio-vbus transceiver. This patch adds the necessary otg events and notifiers to gpio-vbus. Signed-off-by: Heiko Stuebner <heiko@sntech.de> Reviewed-by: Dima Zavin <dima@android.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-03-03usb: otg: ab8500-usb: make probe() work againDan Carpenter1-1/+1
The probe() function will always fail because we're testing the wrong variable. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-01Merge tag 'xceiv-for-v3.4' of ↵Greg Kroah-Hartman17-686/+783
git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next USB: transceiver changes for 3.4 Here we have a big rework done by Heikki Krogerus (thanks) which splits OTG functionality away from transceivers. We have known for quite a long time that struct otg_transceiver was a bad name for the structure, considering transceiver is far from being OTG-specific (see 4e67185).
2012-02-27usb: otg: mv_otg: Start using struct usb_otgHeikki Krogerus2-49/+63
Use struct usb_otg members with OTG specific functions instead of usb_phy members. [ balbi@ti.com : fixed a compile error on isp1704_charger.c ] Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Reviewed-by: Marek Vasut <marek.vasut@gmail.com> Acked-by: Neil Zhang <zhangwm@marvell.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-02-13usb: otg: ulpi: Start using struct usb_otgHeikki Krogerus2-52/+64
Use struct usb_otg members with OTG specific functions instead of usb_phy members. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Acked-by: Igor Grinberg <grinberg@compulab.co.il> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-02-13usb: otg: twl6030: Start using struct usb_otgHeikki Krogerus1-50/+61
Use struct usb_otg members with OTG specific functions instead of usb_phy members. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Tested-by: Kishon Vijay Abraham I <kishon@ti.com> Reviewed-by: Marek Vasut <marek.vasut@gmail.com> Cc: Hema HK <hemahk@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-02-13usb: otg: twl4030: Start using struct usb_otgHeikki Krogerus1-35/+44
Use struct usb_otg members with OTG specific functions instead of usb_phy members. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Reviewed-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-02-13usb: otg: nop: Start using struct usb_otgHeikki Krogerus1-34/+30
Use struct usb_otg members with OTG specific functions instead of usb_phy members. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Reviewed-by: Marek Vasut <marek.vasut@gmail.com> Cc: Ajay Kumar Gupta <ajay.gupta@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-02-13usb: otg: msm: Start using struct usb_otgHeikki Krogerus1-193/+205
Use struct usb_otg members with OTG specific functions instead of usb_phy members. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Acked-by: Pavankumar Kondeti <pkondeti@codeaurora.org> Reviewed-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>