aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/phy
AgeCommit message (Collapse)Author
2014-09-03usb: phy: tegra: Avoid use of sizeof(void)Thierry Reding
The PHY configuration is stored in an opaque "config" field, but when allocating the structure, its proper size needs to be known. In the case of UTMI, the proper structure is tegra_utmip_config of which a local variable already exists, so we can use that to obtain the size from. Fixes the following warning from the sparse checker: drivers/usb/phy/phy-tegra-usb.c:882:17: warning: expression using sizeof(void) Fixes: 81d5dfe6d8b3 (usb: phy: tegra: Read UTMIP parameters from device tree) Cc: stable@vger.kernel.org Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-09-03usb: phy: mxs: add imx6sx supportPeter Chen
Add imx6sx support Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-08-19usb: phy: msm: Fix return value check in msm_otg_probe()Wei Yongjun
In case of error, the function devm_ioremap_nocache() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-08-19usb: phy: samsung: Fix wrong bit mask for PHYPARAM1_PCS_TXDEEMPHJingoo Han
According to the datasheet, PHYPARAM1_PCS_TXDEEMPH is set as 6 bits [5:0]. Thus, the bit mask should be set as 0x3f, instead of 0x1f. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-08-19usb: phy: drop kfree of devm_kzalloc's dataHimangi Saraogi
Using kfree to free data allocated with devm_kzalloc causes double frees. The Coccinelle semantic patch that fixes this problem is as follows: // <smpl> @@ expression x; @@ x = devm_kzalloc(...) ... ?-kfree(x); // </smpl> Reviewed-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-08-19usb: phy: return -ENODEV on failure of try_module_getArjun Sreedharan
When __usb_find_phy_dev() does not return error and try_module_get() fails, return -ENODEV. Signed-off-by: Arjun Sreedharan <arjun024@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-08-06Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial Pull trivial tree changes from Jiri Kosina: "Summer edition of trivial tree updates" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (23 commits) doc: fix two typos in watchdog-api.txt irq-gic: remove file name from heading comment MAINTAINERS: Add miscdevice.h to file list for char/misc drivers. scsi: mvsas: mv_sas.c: Fix for possible null pointer dereference doc: replace "practise" with "practice" in Documentation befs: remove check for CONFIG_BEFS_RW scsi: doc: fix 'SCSI_NCR_SETUP_MASTER_PARITY' drivers/usb/phy/phy.c: remove a leading space mfd: fix comment cpuidle: fix comment doc: hpfall.c: fix missing null-terminate after strncpy call usb: doc: hotplug.txt code typos kbuild: fix comment in Makefile.modinst SH: add proper prompt to SH_MAGIC_PANEL_R2_VERSION ARM: msm: Remove MSM_SCM crypto: Remove MPILIB_EXTRA doc: CN: remove dead link, kerneltrap.org no longer works media: update reference, kerneltrap.org no longer works hexagon: update reference, kerneltrap.org no longer works doc: LSM: update reference, kerneltrap.org no longer works ...
2014-07-21Merge tag 'usb-for-v3.17' of ↵Greg Kroah-Hartman
git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next Felipe writes: usb: patches for v3.17 merge window Surprisingly enough, while a big set of patches, the majority is composed of cleanups (using devm_*, fixing sparse errors, moving code around, adding const, etc). The highlights are addition of new support for PLX USB338x devices, and support for USB 2.0-only configurations of the DWC3 IP core. Signed-of-by: Felipe Balbi <balbi@ti.com>
2014-07-10usb: phy: am335x: Use SIMPLE_DEV_PM_OPS macroJingoo Han
Use SIMPLE_DEV_PM_OPS macro and remove DEV_PM_OPS macro, in order to make the code simpler. Acked-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-07-10usb: phy: tegra: Do not include asm/mach-types.hThierry Reding
It is no longer needed and keeping it will break 64-bit ARM builds. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-07-09USB: PHY: tegra: Call tegra_usb_phy_close only on device removalTuomas Tynkkynen
tegra_usb_phy_close() is supposed to undo the effects of tegra_usb_phy_init(). It is also currently added as the USB PHY shutdown callback, which is wrong, since tegra_usb_phy_init() is only called during probing wheras the shutdown callback can get called multiple times. This then leads to warnings about unbalanced regulator_disable if the EHCI driver is unbound and bound again at runtime. Signed-off-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com> Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09usb: phy: tegra: Do not include asm/mach-types.hThierry Reding
It is no longer needed and keeping it will break 64-bit ARM builds. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-30usb: phy: msm: Do not do runtime pm if the phy is not idleSrinivas Kandagatla
Use case is when the phy is configured in host mode and a usb device is attached to board before bootup. On bootup, with the existing code and runtime pm enabled, the driver would decrement the pm usage count without checking the current state of the phy. This pm usage count decrement would trigger the runtime pm which than would abort the usb enumeration which was in progress. In my case a usb stick gets detected and then immediatly the driver goes to low power mode which is not correct. log: [ 1.631412] msm_hsusb_host 12520000.usb: EHCI Host Controller [ 1.636556] msm_hsusb_host 12520000.usb: new USB bus registered, assigned bus number 1 [ 1.642563] msm_hsusb_host 12520000.usb: irq 220, io mem 0x12520000 [ 1.658197] msm_hsusb_host 12520000.usb: USB 2.0 started, EHCI 1.00 [ 1.659473] hub 1-0:1.0: USB hub found [ 1.663415] hub 1-0:1.0: 1 port detected ... [ 1.973352] usb 1-1: new high-speed USB device number 2 using msm_hsusb_host [ 2.107707] usb-storage 1-1:1.0: USB Mass Storage device detected [ 2.108993] scsi0 : usb-storage 1-1:1.0 [ 2.678341] msm_otg 12520000.phy: USB in low power mode [ 3.168977] usb 1-1: USB disconnect, device number 2 This issue was detected on IFC6410 board. This patch fixes the intial runtime pm trigger by checking the phy state and decrementing the pm use count only when the phy state is IDLE. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-06-30usb: phy: msm: Make phy_reset clk and reset line optional.Srinivas Kandagatla
This patch makes the phy reset clk and reset line optional as this clk is not available on boards like IFC6410 with APQ8064. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-06-30usb: phy: phy-gpio-vbus-usb: use devm_ functionsHimangi Saraogi
The various devm_ functions allocate memory that is released when a driver detaches. This patch uses devm_kzalloc, devm_request_irq, devm_gpio_request, devm_regulator_get etc. for data that is allocated in the probe function of a platform device and is only freed in the remove function. The corresponding free functions are removed and the labels are done away with. Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-06-30usb: phy: tegra: Make of_device_id array constJingoo Han
Make of_device_id array const, because all OF functions handle it as const. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-06-30usb: phy: msm: Make of_device_id array constJingoo Han
Make of_device_id array const, because all OF functions handle it as const. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-06-19drivers/usb/phy/phy.c: remove a leading spaceAntonio Ospite
Signed-off-by: Antonio Ospite <ao2@ao2.it> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-06-03Merge tag 'usb-3.16-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb into next Pull USB driver updates from Greg KH: "Here is the big USB driver pull request for 3.16-rc1. Nothing huge here, but lots of little things in the USB core, and in lots of drivers. Hopefully the USB power management will be work better now that it has been reworked to do per-port power control dynamically. There's also a raft of gadget driver updates and fixes, CONFIG_USB_DEBUG is finally gone now that everything has been converted over to the dynamic debug inteface, the last hold-out drivers were cleaned up and the config option removed. There were also other minor things all through the drivers/usb/ tree, the shortlog shows this pretty well. All have been in linux-next, including the very last patch, which came from linux-next to fix a build issue on some platforms" * tag 'usb-3.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (314 commits) usb: hub_handle_remote_wakeup() only exists for CONFIG_PM=y USB: orinoco_usb: remove CONFIG_USB_DEBUG support USB: media: lirc: igorplugusb: remove CONFIG_USB_DEBUG support USB: media: streamzap: remove CONFIG_USB_DEBUG USB: media: redrat3: remove CONFIG_USB_DEBUG usage USB: media: redrat3: remove unneeded tracing macro usb: qcserial: add additional Sierra Wireless QMI devices usb: host: max3421-hcd: Use module_spi_driver usb: host: max3421-hcd: Allow platform-data to specify Vbus polarity usb: host: max3421-hcd: fix "spi_rd8" uses dynamic stack allocation warning usb: host: max3421-hcd: Fix missing unlock in max3421_urb_enqueue() usb: qcserial: add Netgear AirCard 341U Documentation: dt-bindings: update xhci-platform DT binding for R-Car H2 and M2 usb: host: xhci-plat: add xhci_plat_start() usb: host: max3421-hcd: Fix potential NULL urb dereference Revert "usb: gadget: net2280: Add support for PLX USB338X" USB: usbip: remove CONFIG_USB_DEBUG reference USB: remove CONFIG_USB_DEBUG from defconfig files usb: resume child device when port is powered on usb: hub_handle_remote_wakeup() depends on CONFIG_PM_RUNTIME=y ...
2014-06-02Merge tag 'boards-for-3.16' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc into next Pull ARM SoC board support updates from Olof Johansson: "The bulk of this branch is updates for Renesas Shmobile. They are still doing some enablement for classic boards first, and then come up with DT bindings when they've had a chance to learn more about the hardware. Not necessarily a bad way to go about it, and they're looking at moving some of the temporary board code resulting from it to drivers/staging instead to avoid the churn here. As a result of the shmobile clock cleanups, we end up merging quite a bit of SH code here as well. We ended up merging it here instead of in the cleanup branch due to the other board changes depending on it" * tag 'boards-for-3.16' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (130 commits) ARM: davinci: remove checks for CONFIG_USB_MUSB_PERIPHERAL ARM: add drivers for Colibri T30 to multi_v7_defconfig ARM: shmobile: Remove Genmai reference DTS ARM: shmobile: Let Genmai multiplatform boot with Genmai DTB ARM: shmobile: Sync Genmai DTS with Genmai reference DTS ARM: shmobile: genmai-reference: Remove legacy clock support ARM: shmobile: Remove non-multiplatform Genmai reference support ARM: configs: enable XHCI mvebu support in multi_v7_defconfig ARM: OMAP: replace checks for CONFIG_USB_GADGET_OMAP ARM: OMAP: AM3517EVM: remove check for CONFIG_PANEL_SHARP_LQ043T1DG01 ARM: OMAP: SX1: remove check for CONFIG_SX1_OLD_FLASH ARM: OMAP: remove some dead code ARM: OMAP: omap3stalker: remove two Kconfig macros ARM: tegra: tegra_defconfig updates ARM: shmobile: r7s72100: use workaround for non DT-clocks ARM: shmobile: Add forward declaration of struct clk to silence warning ARM: shmobile: r7s72100: remove SPI DT clocks from legacy clock support ARM: shmobile: r7s72100: add spi clocks to dtsi ARM: shmobile: r7s72100: remove I2C DT clocks from legacy clock support ARM: shmobile: r7s72100: add i2c clocks to dtsi ...
2014-05-27phy: Enable USB PHY support for arm64Liviu Dudau
Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com> Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-27usb: common: rename phy-fsm-usb.c to usb-otg-fsm.cPeter Chen
Since usb otg fsm implementation is not related to usb phy. We move it from usb/phy/ to usb/common/, and rename it to reflect its real meaning. Cc: Felipe Balbi <balbi@ti.com> Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-27usb: phy: add run-time dependencies to R-Car driverJean Delvare
The Renesas R-Car USB PHY driver only supports the R8A7778 and R8A7779, it isn't useful on other systems unless build testing. Signed-off-by: Jean Delvare <jdelvare@suse.de> Cc: Felipe Balbi <balbi@ti.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-23usb: phy: msm: fix bug in probe()Dan Carpenter
My previous patch introduced a bug which prevented this driver from loading. devm_ioremap_resource() has a call to devm_request_mem_region() which will fail because the address space is shared between this PHY driver and CI device controller driver. Fixes: 10f0577aa5cb ('usb: phy: msm: change devm_ioremap() to devm_ioremap_resource()') Reported-by:"Ivan T. Ivanov" <iivanov@mm-sol.com> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-23Merge tag 'usb-for-v3.16' of ↵Greg Kroah-Hartman
git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next Felipe writes: usb: patches for v3.16 merge window Not a lot here during this merge window. Mostly we just have the usual miscellaneous patches (removal of unnecessary prints, proper dependencies being added to Kconfig, build warning fixes, new device ID, etc. Other than those, the only important new features are the new support for OS Strings which should help Linux Gadget Drivers behave better under MS Windows. Also Babble Recovery implementation for MUSB on AM335x. Lastly, we also have ARCH_QCOM PHY support though phy-msm. Signed-of-by: Felipe Balbi <balbi@ti.com> Conflicts: drivers/usb/phy/phy-mv-u3d-usb.c
2014-05-20Merge 3.15-rc5 into usb-nextGreg Kroah-Hartman
We need these USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-16ARM: OMAP: replace checks for CONFIG_USB_GADGET_OMAPPaul Bolle
Commit 193ab2a60700 ("usb: gadget: allow multiple gadgets to be built") apparently required that checks for CONFIG_USB_GADGET_OMAP would be replaced with checks for CONFIG_USB_OMAP. Do so now for the remaining checks for CONFIG_USB_GADGET_OMAP, even though these checks have basically been broken since v3.1. And, since we're touching this code, use the IS_ENABLED() macro, so things will now (hopefully) also work if USB_OMAP is modular. Fixes: 193ab2a60700 ("usb: gadget: allow multiple gadgets to be built") Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Tony Lindgren <tony@atomide.com>
2014-05-15usb: phy: Add SMSC USB334x PHY IDLiviu Dudau
adding new device id for SMSC USB334x devices. Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com> Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-05-14usb: phy: msm: change devm_ioremap() to devm_ioremap_resource()Dan Carpenter
There are several issues here: 1) platform_get_resource() can return NULL and that wasn't handled. 2) We should request the memory before we remap it, and devm_ioremap_resource() does that. 3) devm_ioremap() returns a NULL but we were checking for IS_ERR(). Fixes: 6b99c68ec1f9 ('usb: phy: msm: Migrate to Managed Device Resource allocation') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-05-14usb: phy: msm: reset controller is mandatory nowArnd Bergmann
Commit a27345434134 "usb: phy: msm: Use reset framework for LINK and PHY resets" introduced a mandatory call to reset_control_get into the msm usb phy driver, which means we have to add a Kconfig dependency on the API to avoid this build error: phy/phy-msm-usb.c: In function 'msm_otg_read_dt': phy/phy-msm-usb.c:1461:2: error: implicit declaration of function 'devm_reset_control_get' [-Werror=implicit-function-declaration] motg->link_rst = devm_reset_control_get(&pdev->dev, "link"); ^ Since the usb-ehci-msm driver currently selects the OTG driver, we could still get a broken dependency here. To solve that, this patch also removes the 'select', which turns out to be unnecessary. Reviewed-by: Ivan T. Ivanov <iivanov@mm-sol.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-05-12usb: phy: msm: enable build on other architecturesFelipe Balbi
By adding COMPILE_TEST to the list of dependencies we can build test this driver on all other architectures which is very valuable for maintainers applying patches and to find silly mistakes during development. Reviewed-by: Ivan T. Ivanov <iivanov@mm-sol.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-05-12usb: phy: msm: switch over to writel()Felipe Balbi
Remove that single instance of writel_relaxed() call which is only available on ARM architecture. This will let us build test this driver on all different architectures. Reviewed-by: Ivan T. Ivanov <iivanov@mm-sol.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-05-12usb: phy: msm: cast to enum msm_usb_phy_typeFelipe Balbi
this solves the following build warning found when running compile tests. drivers/usb/phy/phy-msm-usb.c: In function ‘msm_otg_read_dt’: drivers/usb/phy/phy-msm-usb.c:1459:20: warning: cast from pointer \ to integer of different size [-Wpointer-to-int-cast] pdata->phy_type = (int) id->data; ^ Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-04-30usb: phy: msm: Use usb_add_phy_dev() to register deviceIvan T. Ivanov
There could be more than one USB2.0 PHY's on the platform. This will allow all of them to be registered successfully. Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-04-30usb: phy: msm: Vote for corner of VDD CX instead of voltage of VDD CXIvan T. Ivanov
New platform uses RBCPR hardware feature, with that voting for absolute voltage of VDD CX is not required. Hence vote for corner of VDD CX which uses nominal corner voltage on VDD CX. Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com> Cc: Mayank Rana <mrana@codeaurora.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-04-30usb: phy: msm: Handle disconnect eventsIvan T. Ivanov
Put the transceiver in non-driving mode. Otherwise host may not detect soft-disconnection. Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com> Cc: Pavankumar Kondeti <pkondeti@codeaurora.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-04-30usb: phy: msm: Select secondary PHY via TCSRTim Bird
Select the secondary PHY using the TCSR register, if phy-num=1 in the DTS (or phy_number is set in the platform data). The SOC has 2 PHYs which can be used with the OTG port, and this code allows configuring the correct one. Note: This resolves the problem I was seeing where I couldn't get the USB driver working at all on a dragonboard, from cold boot. This patch depends on patch 5/14 from Ivan's msm USB patch set. It does not use DT for the register address, as there's no evidence that this address changes between SoC versions. Signed-off-by: Tim Bird <tim.bird@sonymobile.com> Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-04-30usb: phy: msm: Fix PTS definitions for MSM USB controllerTim Bird
Fix the value used for Parallel Transceiver Select (PTS) for the MSM USB controller. This is a standard chipidea PORTSC definition, where a PHY_TYPE of 10b (<<30) is ULPI and 11b (<<30) is SERIAL. Fix the definitions and use them correctly in the driver code. Signed-off-by: Tim Bird <tim.bird@sonymobile.com> Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-04-30usb: phy: msm: Correct USB PHY Reset sequence for newer platformIvan T. Ivanov
On few legacy platforms, USB PHY is having dedicated reset clk. It is used to reset USB PHY after putting USB PHY into low power mode and for calibration of USB PHY. Putting USB PHY into low power mode is causing ulpi read/write timeout as expected. USB PHY reset clk is not available on newer platform. For 28nm PHY, reset USB PHY after resetting USB LINK. Also reset USB PHY using USB_PHY_PON bit with USB_OTG_HS_PHY_CTRL register after programming USB PHY Override registers as suggested with hardware programming guidelines. Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com> Signed-off-by: Tim Bird <tim.bird@sonymobile.com> Cc: Mayank Rana <mrana@codeaurora.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-04-30usb: phy: msm: Add support for secondary PHY controlIvan T. Ivanov
Allow support to use 2nd HSPHY with USB2 Core. Some platforms may have configuration to allow USB controller work with any of the two HSPHYs present. By default driver configures USB core to use primary HSPHY. Add support to allow user select 2nd HSPHY using DT parameter. Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com> Cc: Manu Gautam <mgautam@codeaurora.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-04-30usb: phy: msm: Use reset framework for LINK and PHY resetsIvan T. Ivanov
Using reset framework eliminate need of platform specific callbacks and enable reset lines to be specified in DT files. Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-04-30usb: phy: msm: Add device tree support and binding informationIvan T. Ivanov
Allows controller to be specified via device tree. Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-04-30usb: phy: msm: Properly check result from platform_get_irq()Ivan T. Ivanov
Function return negative code on error. Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-04-30usb: phy: msm: Remove HSUSB prefix from regulator namesIvan T. Ivanov
Prefix did not bring any useful information. Currently none of the MSM platforms define these regulators, so it is safe to rename them. Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-04-30usb: phy: msm: Remove unused pclk_src_nameIvan T. Ivanov
There are no references to 'pclk_src_name' in plaform code, so it is unused. Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-04-30usb: phy: msm: Replace custom enum usb_mode_type with enum usb_dr_modeIvan T. Ivanov
Use enum usb_dr_mode and drop default usb_dr_mode from platform data. USB DT bindings states: dr_mode: "...In case this attribute isn't passed via DT, USB DRD controllers should default to OTG...", so remove redundand field. Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com> Acked-by: David Brown <davidb@codeaurora.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-04-30usb: phy: msm: Fix checkpatch.pl warningsIvan T. Ivanov
This fixes following: WARNING: quoted string split across lines WARNING: Prefer seq_puts to seq_printf Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-04-30usb: phy: msm: Remove unnecessarily check for valid regulators.Ivan T. Ivanov
Whether regulators are available or not is checked at driver probe. If they are not available driver will refuse to load, so no need to check them again. Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-04-30usb: phy: msm: Migrate to Managed Device Resource allocationIvan T. Ivanov
Move memory, regulators, clocks and irq allocation to devm_* variants. Properly check for valid clk handles. Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-04-30usb: phy: msm: Enable deferred driver probingIvan T. Ivanov
Using platform_driver_probe() prevent driver from requesting probe deferral. Fix this. While at that, also switch to module_platform_driver() and remove __init annotation from probe(). Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com> Signed-off-by: Felipe Balbi <balbi@ti.com>