aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/phy (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-03-10usb: phy: am335x-control: check return value of bus_find_deviceDavid Dueck1-0/+3
This fixes a potential null pointer dereference. Cc: <stable@vger.kernel.org> # v3.16+ Fixes: d4332013919a ("driver core: dev_get_drvdata: Don't check for NULL dev") Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: David Dueck <davidcdueck@googlemail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-02-19Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuildLinus Torvalds1-1/+1
Pull kconfig updates from Michal Marek: "Yann E Morin was supposed to take over kconfig maintainership, but this hasn't happened. So I'm sending a few kconfig patches that I collected: - Fix for missing va_end in kconfig - merge_config.sh displays used if given too few arguments - s/boolean/bool/ in Kconfig files for consistency, with the plan to only support bool in the future" * 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: kconfig: use va_end to match corresponding va_start merge_config.sh: Display usage if given too few arguments kconfig: use bool instead of boolean for type definition attributes
2015-02-04Merge tag 'usb-for-v3.20' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-nextGreg Kroah-Hartman4-82/+199
Felipe writes: usb: patches for v3.20 merge window Here's the big pull request for Gadgets and PHYs. It's a total of 217 non-merge commits with pretty much everything being touched. The most important bits are a ton of new documentation for almost all usb gadget functions, a new isp1760 UDC driver, several improvements to the old net2280 UDC driver, and some minor tracepoint improvements to dwc3. Other than that, a big list of minor cleanups, smaller bugfixes and new features all over the place. Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-30usb: phy: phy-generic: Fix USB PHY gpio resetFabio Estevam1-4/+5
Since commit e9f2cefb0cdc2ae ("usb: phy: generic: migrate to gpio_desc") a kernel hang is observed on imx51-babbage board: [ 1.392824] ci_hdrc ci_hdrc.1: doesn't support gadget [ 1.397975] ci_hdrc ci_hdrc.1: EHCI Host Controller [ 1.403205] ci_hdrc ci_hdrc.1: new USB bus registered, assigned bus number 1 [ 1.422335] ci_hdrc ci_hdrc.1: USB 2.0 started, EHCI 1.00 [ 1.432962] hub 1-0:1.0: USB hub found [ 1.437119] hub 1-0:1.0: 1 port detected This hang happens because the reset GPIO stays at logic level 0. The USB PHY reset gpio is defined in the dts file as: reset-gpios = <&gpio2 5 GPIO_ACTIVE_LOW>; , which means it is active low, so what the gpio reset pin needs to do in this case is the following: - Go to logic level 0 to reset the USB PHY - Stay at 0 for a bit - Go back to logic level 1 When switching to gpiod API we need to following according to Documentation/gpio/consumer.txt: "The first thing a driver must do with a GPIO is setting its direction. If no direction-setting flags have been given to gpiod_get*(), this is done by invoking one of the gpiod_direction_*() functions: int gpiod_direction_input(struct gpio_desc *desc) int gpiod_direction_output(struct gpio_desc *desc, int value)" Since no direction-setting flags have been given to devm_gpiod_get_optional() in our case, we need to use gpiod_direction_output to comply with the gpiod API. With this change the USB PHY reset performs a proper reset, the kernel boots fine and USB host is functional. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-30usb: phy: generic: fix the vbus interrupt requestRobert Jarzmik1-1/+2
Declare the interrupt as "one shot" so that it is masked until the end of the threaded handler. This prevents the irq core from spitting out an error : "Threaded irq requested with handler=NULL and !ONESHOT for irq 63" This was introduced by commit "usb: phy: generic: add vbus support". Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-30usb: phy: generic: fix the gpios to be optionalRobert Jarzmik1-5/+7
All the gpios, ie. reset-gpios and vbus-detect-gpio, should be optional and not prevent the driver from working. Fix the regression in the behavior introduced by commit "usb: phy: generic: migrate to gpio_desc". Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Tested-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-27usb: phy: mxs: add delay before set phyctrl.clkgatePeter Chen1-3/+9
There is a request from IC engineer that if we doesn't set phypwd as 0xffffffff, we need to delay about five 32Khz cycles before set phy's pwd register, otherwise, the wakeup signal may can't wake up controller. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-27usb: phy: mxs: do not set PWD.RXPWD1PT1 for low speed connectionPeter Chen1-1/+46
At very rare cases, the SoF will not send out after resume with low speed connection. The workaround is do not power down PWD.RXPWD1PT1 bit during the suspend. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-27usb: phy: mxs: refine mxs_phy_disconnect_lineLi Jun1-1/+14
For non-otg mode, we keep the usage of disconnect line between phy analog and digital unchanging; for otg mode, at peripheral role, we keep the usage unchanging too, at host role, the digital part needs to know dp/dm change to respond device's data pulse when it is at low power mode. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Li Jun <b47624@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-27usb: phy: mxs: don't need IP fix for imx6sxPeter Chen1-2/+1
The RLT code has already done it, so no software operation is needed. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-19usb: phy: make GPIOs optional for the generic phyPaul Zimmerman1-2/+2
The use of GPIOs should be optional for the generic phy, otherwise the Altera SOCFPGA platform at least is broken. Fixes breakage caused by a combination of e9f2cefb0cd "usb: phy: generic: migrate to gpio_desc" and 135b3c4304d "usb: dwc2: platform: add generic PHY framework support". Reviewed-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-19usb: phy: never defer probe in non-OF caseHeikki Krogerus1-1/+1
In practice failure to find phy when requested in non-OF case means it will never become available, so __usb_find_phy() must return -ENODEV and not -EPROBE_DEFER. This fixes a regression caused by commit 9c9d82492b73 (usb: phy: Fix deferred probing), where the USB controller driver is left infinitely into deferred probe when there are no phys. Fixes: 9c9d82492b73 (usb: phy: Fix deferred probing) Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-19Merge tag 'v3.19-rc5' into nextFelipe Balbi2-8/+13
Linux 3.19-rc5 Conflicts: drivers/usb/dwc2/gadget.c drivers/usb/gadget/udc/bdc/bdc_ep.c
2015-01-14Merge tag 'fixes-for-v3.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linusGreg Kroah-Hartman1-3/+2
Felipe writes: usb: fixes for v3.19-rc6 The final set of fixes for v3.19. Two of the fixes are related to dwc3 scatter/gather implementation when we have more requests queued than available TRBs, while the other is a build fix for mv-usb PHY. Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-13usb: phy: mv-usb: fix usb_phy build errorsArnd Bergmann1-3/+2
The driver was recently adapted to a core API change, but the change was incomplete, missing out the suspend helper and leaving an extraneous local variable around: usb/phy/phy-mv-usb.c: In function 'mv_otg_update_state': usb/phy/phy-mv-usb.c:341:18: warning: unused variable 'phy' [-Wunused-variable] usb/phy/phy-mv-usb.c: In function 'mv_otg_suspend': usb/phy/phy-mv-usb.c:861:16: error: 'struct usb_phy' has no member named 'state' Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: e47d92545c297 ("usb: move the OTG state from the USB PHY to the OTG structure") Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-12Merge tag 'fixes-for-v3.19-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linusGreg Kroah-Hartman1-3/+9
Felipe writes: usb: fixes for v3.19-rc5 Just three fixes this time. An oops fix in ep_write() from gadgetfs, another oops for the Atmel UDC when unloading a gadget driver and the fix for PHY deferred probing. Signed-off-by: Felipe Balbi <balbi@ti.com> Conflicts: drivers/usb/phy/phy.c
2015-01-12usb: phy: generic: add vbus supportRobert Jarzmik2-1/+96
Add support for vbus detection and power supply. This code is more or less stolen from phy-gpio-vbus-usb.c, and aims at providing a detection mechanism for VBus (ie. usb cable plug) based on a GPIO line, and a power supply activation which draws current from the VBus. [ balbi@ti.com : fix build break ] Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-12usb: phy: generic: migrate to gpio_descRobert Jarzmik2-44/+21
Change internal gpio handling from integer gpios into gpio descriptors. This change only addresses the internal API and device-tree/ACPI, while the legacy platform data remains integer space based. This change is only build compile tested, and very prone to error. I leave this comment for now in the commit message so that this patch gets some testing as I'm pretty sure it's buggy. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-12usb: phy: phy-fsl-usb: Remove some unused functionsRickard Strandqvist1-35/+0
Removes some functions that are not used anywhere: fsl_otg_tick_timer() view_ulpi() This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-12usb: phy: phy-mxs-usb: do not depend on speed for disconnect notifierPeter Chen1-1/+3
For some user cases, like plug out and replug in usb device during the system suspend, the speed negotiation will be error due to host doesn't know the device's disconnection, and it still hopes the high speed device, but the device backs to "powered" state which its high speed termination is not enabled, the usb core calls the PHY's disconnect notifier with "full speed", it will NOT take effect at all. If the usb core calls disconnect notifer, the port change must happen, so it is safe to disable high speed disconenct detector, since connect notifier will be called soon if the device is still connected on the port, and we will enable high speed disconnect detector at that time. Acked-by: Li Jun <b47624@freescale.com> Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-12usb: phy: phy-mxs-usb: add power down and disable wakeup for .shutdownPeter Chen1-0/+11
When we shut down the PHY, we need to power down all PHY's functions as well as disable wakeup, it is the opposite operation we do at .init. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-09usb: phy: Fix deferred probingMaxime Ripard1-3/+3
Commit 1290a958d48e ("usb: phy: propagate __of_usb_find_phy()'s error on failure") actually broke the deferred probing mechanism, since it now returns EPROBE_DEFER only when the try_module_get call fails, but not when the phy lookup does. All the other similar functions seem to return ENODEV when try_module_get fails, and the error code of either __usb_find_phy or __of_usb_find_phy otherwise. In order to have a consistent behaviour, and a meaningful EPROBE_DEFER, always return EPROBE_DEFER when __(of_)usb_find_phy fails to look up the requested phy, that will be propagated by the caller, and ENODEV if try_module_get fails. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Tested-by: Olof Johansson <olof@lixom.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-07kconfig: use bool instead of boolean for type definition attributesChristoph Jaeger1-1/+1
Support for keyword 'boolean' will be dropped later on. No functional change. Reference: http://lkml.kernel.org/r/cover.1418003065.git.cj@linux.com Signed-off-by: Christoph Jaeger <cj@linux.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
2014-12-23usb: phy: Restore deferred probing pathThierry Reding1-4/+10
Commit 1290a958d48e ("usb: phy: propagate __of_usb_find_phy()'s error on failure") broke platforms that rely on deferred probing to order probing of PHY and host controller drivers. The reason is that the commit simply propagates errors from __of_usb_find_phy(), which returns -ENODEV if no PHY has been registered yet for a given device tree node. The only case in which -EPROBE_DEFER would now be returned is if try_module_get() did fail, which does not make sense. The correct thing to do is to return -EPROBE_DEFER if a PHY hasn't been registered yet. The only condition under which it makes sense to return -ENODEV is if the device tree node representing the PHY has been disabled (via the status property) because in that case the PHY will never be registered. This patch addresses the problem by making __of_usb_find_phy() return an appropriate error code while keeping in line with the above-mentioned commit to propagate error codes rather than overwriting them. At the same time the check for a valid PHY is decoupled from the check for the try_module_get() call and a separate error code is returned if the latter fails. Fixes: 1290a95 (usb: phy: propagate __of_usb_find_phy()'s error on failure) Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-12-18Merge tag 'pm+acpi-3.19-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pmLinus Torvalds1-2/+2
Pull more ACPI and power management updates from Rafael Wysocki: "These are regression fixes (leds-gpio, ACPI backlight driver, operating performance points library, ACPI device enumeration messages, cpupower tool), other bug fixes (ACPI EC driver, ACPI device PM), some cleanups in the operating performance points (OPP) framework, continuation of CONFIG_PM_RUNTIME elimination, a couple of minor intel_pstate driver changes, a new MAINTAINERS entry for it and an ACPI fan driver change needed for better support of thermal management in user space. Specifics: - Fix a regression in leds-gpio introduced by a recent commit that inadvertently changed the name of one of the properties used by the driver (Fabio Estevam). - Fix a regression in the ACPI backlight driver introduced by a recent fix that missed one special case that had to be taken into account (Aaron Lu). - Drop the level of some new kernel messages from the ACPI core introduced by a recent commit to KERN_DEBUG which they should have used from the start and drop some other unuseful KERN_ERR messages printed by ACPI (Rafael J Wysocki). - Revert an incorrect commit modifying the cpupower tool (Prarit Bhargava). - Fix two regressions introduced by recent commits in the OPP library and clean up some existing minor issues in that code (Viresh Kumar). - Continue to replace CONFIG_PM_RUNTIME with CONFIG_PM throughout the tree (or drop it where that can be done) in order to make it possible to eliminate CONFIG_PM_RUNTIME (Rafael J Wysocki, Ulf Hansson, Ludovic Desroches). There will be one more "CONFIG_PM_RUNTIME removal" batch after this one, because some new uses of it have been introduced during the current merge window, but that should be sufficient to finally get rid of it. - Make the ACPI EC driver more robust against race conditions related to GPE handler installation failures (Lv Zheng). - Prevent the ACPI device PM core code from attempting to disable GPEs that it has not enabled which confuses ACPICA and makes it report errors unnecessarily (Rafael J Wysocki). - Add a "force" command line switch to the intel_pstate driver to make it possible to override the blacklisting of some systems in that driver if needed (Ethan Zhao). - Improve intel_pstate code documentation and add a MAINTAINERS entry for it (Kristen Carlson Accardi). - Make the ACPI fan driver create cooling device interfaces witn names that reflect the IDs of the ACPI device objects they are associated with, except for "generic" ACPI fans (PNP ID "PNP0C0B"). That's necessary for user space thermal management tools to be able to connect the fans with the parts of the system they are supposed to be cooling properly. From Srinivas Pandruvada" * tag 'pm+acpi-3.19-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (32 commits) MAINTAINERS: add entry for intel_pstate ACPI / video: update the skip case for acpi_video_device_in_dod() power / PM: Eliminate CONFIG_PM_RUNTIME NFC / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM SCSI / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM ACPI / EC: Fix unexpected ec_remove_handlers() invocations Revert "tools: cpupower: fix return checks for sysfs_get_idlestate_count()" tracing / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM x86 / PM: Replace CONFIG_PM_RUNTIME in io_apic.c PM: Remove the SET_PM_RUNTIME_PM_OPS() macro mmc: atmel-mci: use SET_RUNTIME_PM_OPS() macro PM / Kconfig: Replace PM_RUNTIME with PM in dependencies ARM / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM sound / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM phy / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM video / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM tty / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM spi: Replace CONFIG_PM_RUNTIME with CONFIG_PM ACPI / PM: Do not disable wakeup GPEs that have not been enabled ACPI / utils: Drop error messages from acpi_evaluate_reference() ...
2014-12-14Merge tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-coreLinus Torvalds13-13/+0
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-12-14Merge tag 'usb-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usbLinus Torvalds16-214/+228
Pull USB updates from Greg KH: "Here's the big set of USB and PHY patches for 3.19-rc1. The normal churn in the USB gadget area is in here, as well as xhci and other individual USB driver updates. The PHY tree is also in here, as there were dependancies on the USB tree. All of these have been in linux-next" * tag 'usb-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (351 commits) arm: omap3: twl: remove usb phy init data usbip: fix error handling in stub_probe() usb: gadget: udc: missing curly braces USB: mos7720: delete some unneeded code wusb: replace memset by memzero_explicit usbip: remove unneeded structure usb: xhci: fix comment for PORT_DEV_REMOVE xhci: don't use the same variable for stopped and halted rings current TD xhci: clear extra bits from slot context when setting max exit latency xhci: cleanup finish_td function USB: adutux: NULL dereferences on disconnect usb: chipidea: fix platform_no_drv_owner.cocci warnings usb: chipidea: Fixed a few typos in comments Documentation: bindings: add doc for the USB2 ChipIdea USB driver usb: chipidea: add a usb2 driver for ci13xxx usb: chipidea: fix phy handling usb: chipidea: remove duplicate dev_set_drvdata for host_start usb: chipidea: parameter 'mode' isn't needed for hw_device_reset usb: chipidea: add controller reset API usb: chipidea: remove flag CI_HDRC_REQUIRE_TRANSCEIVER ...
2014-12-13PM / Kconfig: Replace PM_RUNTIME with PM in dependenciesRafael J. Wysocki1-2/+2
After commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is selected) PM_RUNTIME is always set if PM is set, so Kconfig options depending on CONFIG_PM_RUNTIME may now be changed to depend on CONFIG_PM. Replace PM_RUNTIME with PM in Kconfig dependencies throughout the tree. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Felipe Balbi <balbi@ti.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Tejun Heo <tj@kernel.org>
2014-12-04USB / PM: Drop CONFIG_PM_RUNTIME from the USB coreRafael J. Wysocki1-1/+1
After commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is selected) PM_RUNTIME is always set if PM is set, so quite a few depend on CONFIG_PM (or even dropped in some cases). Replace CONFIG_PM_RUNTIME with CONFIG_PM in the USB core code and documentation. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-25usb: phy: Handle per-PHY event for connnect and disconnect eventsKiran Raparthy4-0/+21
When usb is connected and enumerated in device mode or when usb is disconnected, call usb_phy_set_event() from phy drivers to handle per-PHY event. [ toddpoynor@google.com : Original patch in Android ] Cc: Felipe Balbi <balbi@ti.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: linux-kernel@vger.kernel.org Cc: linux-usb@vger.kernel.org Cc: Android Kernel Team <kernel-team@android.com> Cc: John Stultz <john.stultz@linaro.org> Cc: Sumit Semwal <sumit.semwal@linaro.org> Cc: Arve Hjønnevåg <arve@android.com> Cc: Benoit Goby <benoit@android.com> Cc: Todd Poynor <toddpoynor@google.com> Signed-off-by: Kiran Raparthy <kiran.kumar@linaro.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-11-21usb: phy: introduce usb_phy_set_event interfaceKiran Raparthy1-0/+12
PHY drivers require a generic interface to handle per-PHY events. usb_phy_set_event interface sets event to phy event. PHY drivers call this interface for each phy event. Cc: Felipe Balbi <balbi@ti.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: linux-kernel@vger.kernel.org Cc: linux-usb@vger.kernel.org Cc: Android Kernel Team <kernel-team@android.com> Cc: John Stultz <john.stultz@linaro.org> Cc: Sumit Semwal <sumit.semwal@linaro.org> Cc: Arve Hj�nnev�g <arve@android.com> Cc: Benoit Goby <benoit@android.com> [Original patch in Android from Todd] Cc: Todd Poynor <toddpoynor@google.com> Signed-off-by: Kiran Raparthy <kiran.kumar@linaro.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-11-20usb: phy: propagate __of_usb_find_phy()'s error on failureArjun Sreedharan1-1/+3
When __of_usb_find_phy() fails, it returns -ENODEV - its error code has to be returned by devm_usb_get_phy_by_phandle(). Only when the former function succeeds and try_module_get() fails should -EPROBE_DEFER be returned. [ balbi@ti.com : remove trailing whitespace ] Signed-off-by: Arjun Sreedharan <arjun024@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-11-12usb: phy: fsl: Fix build errorsFelipe Balbi2-8/+8
commit e47d925 (usb: move the OTG state from the USB PHY to the OTG structure) moved the OTG state from struct usb_phy to struct usb_otg. Unfortunately, even though I fixed quite a few build regressions with that patch already, this one was still missing. Note that this driver still has other randconfig build problems which I'll leave for driver author to fix, as that's less trivial. Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-11-05usb: phy: remove file names from heading commentsSergei Shtylyov2-4/+0
File names in the heading comments fell out of favor long ago, and these weren't even changed when the drivers were moved from drivers/usb/otg/, so remove them at last... Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-11-03usb: rename phy to usb_phy in OTGAntoine Tenart9-54/+60
This patch prepares the introduction of the generic PHY support in the USB OTG common functions. The USB PHY member of the OTG structure is renamed to 'usb_phy' and modifications are done in all drivers accessing it. Renaming this pointer will allow to keep the compatibility for USB PHY drivers. Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-11-03usb: move the OTG state from the USB PHY to the OTG structureAntoine Tenart8-116/+116
Before using the PHY framework instead of the USB PHY one, we need to move the OTG state into another place, since it won't be available when USB PHY isn't used. This patch moves the OTG state into the OTG structure, and makes all the needed modifications in the drivers using the OTG state. [ balbi@ti.com : fix build regressions with phy-tahvo.c, musb_dsps.c, phy-isp1301-omap, and chipidea's debug.c ] Acked-by: Kishon Vijay Abraham I <kishon@ti.com> Acked-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-11-03usb: phy: rcar-usb: remove duplicate check on resourceVarka Bhadram1-5/+3
Sanity check on resource happening with devm_ioremap_resource(). Signed-off-by: Varka Bhadram <varkab@cdac.in> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-11-03usb: phy: phy-mv-usb: delete unnecessary 'out of memory' messagesPeter Chen1-3/+1
The memory subsystem has already had similar message for it. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-11-03usb: phy: phy-msm-usb: delete unnecessary 'out of memory' messagesPeter Chen1-9/+3
The memory subsystem has already had similar message for it. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-11-03usb: phy: phy-mxs-usb: delete unnecessary 'out of memory' messagesPeter Chen1-3/+1
The memory subsystem has already had similar message for it. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-11-03usb: phy: phy-rcar-gen2-usb: delete unnecessary 'out of memory' messagesPeter Chen1-3/+1
The memory subsystem has already had similar message for it. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-11-03usb: phy: phy-am335x-control: delete unnecessary 'out of memory' messagesPeter Chen1-3/+1
The memory subsystem has already had similar message for it. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-11-03usb: phy: phy-tegra-usb: delete unnecessary 'out of memory' messagesPeter Chen1-7/+2
The memory subsystem has already had similar message for it. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-11-03usb: phy: phy-rcar-usb: delete unnecessary 'out of memory' messagesPeter Chen1-3/+1
The memory subsystem has already had similar message for it. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-10-20usb: phy: drop owner assignment from platform_driversWolfram Sang13-13/+0
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-28USB: Remove .owner field for driverKiran Padwal1-1/+0
There is no need to init .owner field. Based on the patch from Peter Griffin <peter.griffin@linaro.org> "mmc: remove .owner field for drivers using module_platform_driver" This patch removes the superflous .owner field for drivers which use the module_platform_driver API, as this is overriden in platform_driver_register anyway." Signed-off-by: Kiran Padwal <kiran.padwal@smartplayin.com> Reviewed-by: Ivan T. Ivanov <iivanov@mm-sol.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23usb: hub: rename khubd to hub_wq in documentation and commentsPetr Mladek2-2/+2
USB hub has started to use a workqueue instead of kthread. Let's update the documentation and comments here and there. This patch mostly just replaces "khubd" with "hub_wq". There are only few exceptions where the whole sentence was updated. These more complicated changes can be found in the following files: Documentation/usb/hotplug.txt drivers/net/usb/usbnet.c drivers/usb/core/hcd.c drivers/usb/host/ohci-hcd.c drivers/usb/host/xhci.c Signed-off-by: Petr Mladek <pmladek@suse.cz> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-16Merge tag 'v3.17-rc5' into nextFelipe Balbi2-3/+9
Linux 3.17-rc5 Signed-off-by: Felipe Balbi <balbi@ti.com> Conflicts: Documentation/devicetree/bindings/usb/mxs-phy.txt drivers/usb/phy/phy-mxs-usb.c
2014-09-08Merge tag 'v3.17-rc4' into nextFelipe Balbi3-5/+6
Merge Linux 3.17-rc4 here so we have all the latest fixes on next too. This also cleans up a few conflicts when applying patches. Signed-off-by: Felipe Balbi <balbi@ti.com> Conflicts: drivers/usb/gadget/Makefile drivers/usb/gadget/function/Makefile drivers/usb/gadget/legacy/Makefile drivers/usb/phy/phy-samsung-usb.h
2014-09-03usb: phy: tegra: Avoid use of sizeof(void)Thierry Reding1-2/+2
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>