summaryrefslogtreecommitdiff
path: root/drivers/usb/otg
AgeCommit message (Collapse)AuthorFilesLines
2010-03-02usb: otg: twl4030: move to request_threaded_irqFelipe Balbi1-9/+1
move to request_threaded_irq() on twl4030 children. Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02USB: otg: twl4030: add support for notifierFelipe Balbi1-21/+14
it's expected that the transceiver driver will initialize and call the notifier chain when necessary. Implement that for twl4030-usb driver. Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-02-16USB: otg Kconfig: let USB_OTG_UTILS select USB_ULPI optionValentin Longchamp1-0/+1
With CONFIG_USB_ULPI=y, CONFIG_USB<=m, CONFIG_PCI=n and CONFIG_USB_OTG_UTILS=n, which is the default used for mx31moboard, the build for all mx3 platforms fails because drivers/usb/otg/ulpi.c where otg_ulpi_create is defined is not compiled. Build error: arch/arm/mach-mx3/built-in.o: In function `mxc_board_init': kzmarm11.c:(.init.text+0x73c): undefined reference to `otg_ulpi_create' kzmarm11.c:(.init.text+0x1020): undefined reference to `otg_ulpi_create' This isn't a strong dependency as drivers/usb/otg/ulpi.c doesn't use functions defined in drivers/usb/otg/otg.o and is only needed to get ulpi.o linked into the kernel image. Signed-off-by: Valentin Longchamp <valentin.longchamp@epfl.ch> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-23usb: otg: isp1301_omap: fix compile errorFelipe Balbi1-2/+2
commit 91c8a5a9985d5bf9c55f6f82f183f57b050b2a3a broke compilation of this driver after it introduced otg_init() as a static inline in <linux/usb/otg.h> Reported-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-13mfd: Rename all twl4030_i2c*Balaji T K1-18/+18
This patch renames function names like twl4030_i2c_write_u8, twl4030_i2c_read_u8 to twl_i2c_write_u8, twl_i2c_read_u8 and also common variable in twl-core.c Signed-off-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Balaji T K <balajitk@ti.com> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Acked-by: Kevin Hilman <khilman@deeprootsystems.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2009-12-13mfd: Rename twl4030* driver files to enable re-useSantosh Shilimkar1-1/+1
The upcoming TWL6030 is companion chip for OMAP4 like the current TWL4030 for OMAP3. The common modules like RTC, Regulator creates opportunity to re-use the most of the code from twl4030. This patch renames few common drivers twl4030* files to twl* to enable the code re-use. Signed-off-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Balaji T K <balajitk@ti.com> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Acked-by: Kevin Hilman <khilman@deeprootsystems.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2009-12-11USB: twl4030: Enable USB regulators before enabling USB chargingAguilar Pena, Leed1-2/+2
For TWL family of power management ICs, USB charging works only when USB regulators are in enabled state: 3v1, 1v5, 1v8 On a USB cable attach, twl4030_phy_resume(twl) function enables the regulators. Enable USB charging, only after all regulators are enabled. Its observed that enabling USB charging before regulators are enabled, causes USB charging to fail. Tested on: Zoom2: omap3430: ES3.1 + TWL5030 Needs T2-MADC and T2-BCI drivers which are still not upstreamed. Signed-off-by: Moiz Sonasath <m-sonasath@ti.com> Signed-off-by: Leed Aguilar <leed.aguilar@ti.com> Acked-by: Vikram Pandita <vikram.pandita@ti.com> Acked-by: Anand Gadiyar <gadiyar@ti.com> Acked-by: Nishanth Menon <nm@ti.com> Acked-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11USB OTG: Add generic driver for ULPI OTG transceiverDaniel Mack3-0/+146
This adds a minimal generic driver for ULPI connected transceivers, using the OTG framework functions recently introduced. The driver got a table to match the ULPI chips, which currently only has one entry for NXP's ISP 1504 transceiver. Signed-off-by: Daniel Mack <daniel@caiaq.de> Cc: Heikki Krogerus <ext-heikki.krogerus@nokia.com> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-10-20omap: headers: Move remaining headers from include/mach to include/platTony Lindgren1-2/+2
Move the remaining headers under plat-omap/include/mach to plat-omap/include/plat. Also search and replace the files using these headers to include using the right path. This was done with: #!/bin/bash mach_dir_old="arch/arm/plat-omap/include/mach" plat_dir_new="arch/arm/plat-omap/include/plat" headers=$(cd $mach_dir_old && ls *.h) omap_dirs="arch/arm/*omap*/ \ drivers/video/omap \ sound/soc/omap" other_files="drivers/leds/leds-ams-delta.c \ drivers/mfd/menelaus.c \ drivers/mfd/twl4030-core.c \ drivers/mtd/nand/ams-delta.c" for header in $headers; do old="#include <mach\/$header" new="#include <plat\/$header" for dir in $omap_dirs; do find $dir -type f -name \*.[chS] | \ xargs sed -i "s/$old/$new/" done find drivers/ -type f -name \*omap*.[chS] | \ xargs sed -i "s/$old/$new/" for file in $other_files; do sed -i "s/$old/$new/" $file done done for header in $(ls $mach_dir_old/*.h); do git mv $header $plat_dir_new/ done Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-09-23USB: OMAP: ISP1301: Compile fixAnand Gadiyar1-20/+3
OMAP: ISP1301: Compile fix Fix this build error on non- OMAP-H2/H3/H4 systems: (factored out two empty functions as part of the fix) CC drivers/usb/otg/isp1301_omap.o drivers/usb/otg/isp1301_omap.c: In function 'otg_update_isp': drivers/usb/otg/isp1301_omap.c:635: error: implicit declaration of function 'notresponding' drivers/usb/otg/isp1301_omap.c: In function 'b_peripheral': drivers/usb/otg/isp1301_omap.c:973: error: implicit declaration of function 'enable_vbus_draw' drivers/usb/otg/isp1301_omap.c: In function 'isp_update_otg': drivers/usb/otg/isp1301_omap.c:1003: error: implicit declaration of function 'enable_vbus_source' make[2]: *** [drivers/usb/otg/isp1301_omap.o] Error 1 make[1]: *** [drivers/usb/otg] Error 2 make: *** [drivers] Error 2 Signed-off-by: Anand Gadiyar <gadiyar@ti.com> Cc: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-23USB: otg: fix twl4030-usb buildRandy Dunlap1-1/+1
subsys_initcall_sync() is only defined for built-in code, not for loadable modules, so this driver build fails when built as a module. However, the _sync() forms of the initcalls are not implemented, so this should not be used -- just use the non-sync form of it. drivers/usb/otg/twl4030-usb.c:777: warning: data definition has no type or storage class drivers/usb/otg/twl4030-usb.c:777: warning: type defaults to 'int' in declaration of 'subsys_initcall_sync' drivers/usb/otg/twl4030-usb.c:777: warning: parameter names (without types) in function declaration Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-23USB: otg: twl4030-usb.c: mark .init as subsys_initcall_syncMing Lei1-1/+1
This patch fixes the .probe failure of twl4030_usb driver if it is compiled into kernel. Since twl4030_usb USB transceiver .probe depends on twl4030-regulator, marking twl4030_usb_init as subsys_initcall_sync can make it called after twl4030-regulator initialization is finished, then twl4030_usb USB transceiver driver can be probed successfully. Signed-off-by: Ming Lei <tom.leiming@gmail.com> Cc: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-07-12USB: otg: fix module reinsert issueAjay Kumar Gupta1-0/+1
Platform_device instance (pd) is not set to NULL in usb_nop_xceiv_unregister() causing usb_nop_xceiv_register() to fail during module reinsert. From: Ajay Kumar Gupta <ajay.gupta@ti.com> Signed-off-by: Babu Ravi <ravibabu@ti.com> Acked-by: David Brownell <dbrownell@users.sourceforge.net>
2009-07-12Revert "USB: Add Intel Langwell USB OTG Transceiver Drive"Greg Kroah-Hartman3-1930/+0
This reverts commit 453f77558810ffa669ed5a510a7173ec49def396. The driver should not have been accepted as the MSRT code is not in the main kernel yet, which this depends on. Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Hao Wu <hao.wu@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-15USB: Add Intel Langwell USB OTG Transceiver DriveHao Wu3-0/+1930
Description: This driver is used for Intel Langwell* USB OTG controller in Intel Moorestown* platform. It tries to implement host/device role switch according to OTG spec. The actual hsot and device functions are accomplished in modified EHCI driver and Intel Langwell USB OTG client controller driver. * Langwell and Moorestown are names used in development. They are not approved official name. Note: This patch is the first version Intel Langwell USB OTG Transceiver driver. The development is not finished, and the bug fixing is on going for some hardware and software issues. The main purpose of this submission is for code view. Supported features: - Data-line Pulsing SRP - Support HNP to switch roles - PCI D0/D3 power management support Known issues: - HNP is only tested with another Moorestown platform. - PCI D0/D3 power management support is not fully tested. - VBus Pulsing SRP is not support in current version. Signed-off-by: Hao Wu <hao.wu@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-15USB: nop-usb-xceiv: behave when linked as a moduleDavid Brownell1-15/+10
The NOP OTG transceiver driver needs to be usable from modules. Make sure its symbols are always accessible at both compile and link time, and make sure the device instance is allocated from the heap so that device lifetime rules are obeyed. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-15USB: twl4030-usb: fix minor reporting goofageDavid Brownell1-7/+19
Fix a reporting glitch in the twl4030 USB transceiver code. It wasn't properly distinguishing the two types of active USB link: ID grounded, vs not. In the current code that distinction doesn't much matter; in the future this bugfix should help support better USB controller communications. Provide a comment sorting out some of the cryptic bits of the manual: different sections use different names for key signals, and the register definitions don't help much without the explanations and diagrams. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-15USB: move twl4030_usb's probe function to .devinit.textUwe Kleine-König1-1/+1
A pointer to twl4030_usb_probe is passed to the core via platform_driver_register and so the function must not disappear when the .init sections are discarded. Otherwise (if also having HOTPLUG=y) unbinding and binding a device to the driver via sysfs will result in an oops as does a device being registered late. An alternative to this patch is using platform_driver_probe instead of platform_driver_register plus removing the pointer to the probe function from the struct platform_driver. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Cc: Jouni Hogander <jouni.hogander@nokia.com> Cc: Kalle Jokiniemi <kalle.jokiniemi@digia.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: Tony Lindgren <tony@atomide.com> Cc: Kevin Hilman <khilman@deeprootsystems.com> Cc: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-23USB: otg: Fix bug on remove path without transceiverRobert Jarzmik1-1/+2
In the case where a gadget driver is removed while no transceiver was found at probe time, a bug in otg_put_transceiver() will trigger. Provide symetric calls for otg_get_transceiver() and otg_put_transceiver(), wherever a transceiver was found or not. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-13Replace all DMA_nBIT_MASK macro with DMA_BIT_MASK(n)Yang Hongyang1-2/+2
This is the second go through of the old DMA_nBIT_MASK macro,and there're not so many of them left,so I put them into one patch.I hope this is the last round. After this the definition of the old DMA_nBIT_MASK macro could be removed. Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com> Cc: Russell King <rmk@arm.linux.org.uk> Cc: Tony Lindgren <tony@atomide.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Cc: Greg KH <greg@kroah.com> Cc: Takashi Iwai <tiwai@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-03-24USB: TWL: disable VUSB regulators when cable unpluggedJouni Hogander2-10/+65
This patch disables USB regulators VUSB1V5, VUSB1V8, and VUSB3V1 when the USB cable is unplugged to reduce power consumption. Added a depencency from twl4030 usb driver to TWL_REGULATOR. Signed-off-by: Jouni Hogander <jouni.hogander@nokia.com> Signed-off-by: Kalle Jokiniemi <kalle.jokiniemi@digia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24USB: otg: adding nop usb transceiverAjay Kumar Gupta3-0/+189
NOP transceiver is used by all the usb transceiver which are mostly autonomous and doesn't require any programming or which are built into the usb ip itself.NOP transceiver only allocates the memory for struct xceiv and calls otg_set_transceiver() so function call to otg_get_transceiver() will return a valid transceiver. NOP transceiver device should be registered by calling usb_nop_xceiv_register() from platform files. Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com> Cc: Felipe Balbi <felipe.balbi@nokia.com> Cc: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24USB: gpio_vbus: add delayed vbus_session callsRobert Jarzmik1-11/+31
Call usb_gadget_vbus_connect() and ...disconnect() from a workqueue rather than from an irq handler, allowing msleep() calls in vbus_session. Update kerneldoc to match. [ dbrownell@users.sourceforge.net: more kerneldoc updates ] Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-27USB: omap1 ohci buildfix (otg related)David Brownell1-2/+2
> > drivers/built-in.o: In function `ohci_omap_init': > > hid-quirks.c:(.text+0x6c608): undefined reference to `otg_get_transceiver' > > drivers/built-in.o: In function `omap_udc_probe': > > hid-quirks.c:(.init.text+0x34c0): undefined reference to `otg_get_transceiver' > > hid-quirks.c:(.init.text+0x3d40): undefined reference to `otg_put_transceiver' Reported-by: Russell King <linux@arm.linux.org.uk> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-07USB: otg: twl4030 transceiver driverDavid Brownell3-0/+732
Add driver for the high speed USB-OTG transceiver in TI's TWL4030 family of chips. Given this and various other pending patches, OMAP3 hardware like that from beagleboard.org, gumstix.com (Overo), and openpandora.org should now have basic USB host and peripheral connectivity with mainline kernels. Ditto for less widely-available boards. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Tony Lindgren <tony@atomide.com> Cc: Kevin Hilman <khilman@deeprootsystems.com> Cc: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-07USB: otg: sharable otg transceiver opsTony Lindgren2-5/+71
Move otg_get/set/put_transceiver() from omap specific code to common otg.c so other upcoming drivers can share them. [ dbrownell@users.sourceforge.net: move to drivers/usb/otg, dox ] Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Felipe Balbi <me@felipebalbi.com> Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-07USB: otg: gpio_vbus transceiver stubPhilipp Zabel3-0/+353
gpio_vbus provides simple GPIO VBUS sensing for peripheral controllers with an internal transceiver. Optionally, a second GPIO can be used to control D+ pullup. It also interfaces with the regulator framework to limit charging currents when powered via USB. gpio_vbus requests the regulator supplying "vbus_draw" and can enable/disable it or limit its current depending on USB state. [dbrownell@users.sourceforge.net: use drivers/otg, cleanups ] Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-07USB: move isp1301_omap to drivers/usb/otgDavid Brownell3-0/+1722
This moves the isp1301-omap driver from the drivers/i2c/chips directory (which will be shrinking) into a new drivers/usb/otg directory (which will grow, with more drivers and utilities). Note that OTG infrastructure needs to be initialized before either host or peripheral side USB support, and may be needed before for pure host or pure peripheral configurations. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>