summaryrefslogtreecommitdiff
path: root/drivers/usb/phy/phy-am335x.c
AgeCommit message (Collapse)Author
2019-02-20usb: phy: am335x: fix race condition in _probeBin Liu
commit a53469a68eb886e84dd8b69a1458a623d3591793 upstream. power off the phy should be done before populate the phy. Otherwise, am335x_init() could be called by the phy owner to power on the phy first, then am335x_phy_probe() turns off the phy again without the caller knowing it. Fixes: 2fc711d76352 ("usb: phy: am335x: Enable USB remote wakeup using PHY wakeup") Cc: stable@vger.kernel.org # v3.18+ Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20usb: phy: drop owner assignment from platform_driversWolfram Sang
A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-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-04-21usb: phy: rename <linux/usb/usb_phy_gen_xceiv.h> to ↵Felipe Balbi
<linux/usb/usb_phy_generic.h> now that all functions match the driver name, the only missing piece is to rename the header file itself. Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-04-21usb: phy: rename usb_nop_xceiv to usb_phy_genericFelipe Balbi
no functional changes, just renaming the function in order to make it slightly clearer what it should be used for, also matching the driver name. Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-12-20usb: phy: am335x: fix randconfig errorsFelipe Balbi
by using SET_SYSTEM_SLEEP_PM_OPS, we will make sure that we don't use undefined functions. Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-12-19usb: phy: am335x: Enable USB remote wakeup using PHY wakeupGeorge Cherian
USB remote wakeup using PHY wakeup is supported only in standby mode. Enabling the PHY_WKUP will break DS0 mode of system suspend. If the same is enabled while entering DS0, AM33xx never stays in DS0, it returns immediately from DS0. By default make the PHY wakeup disabled, using sysfs entry enable the same manually to get the remote wakeup working from standby. echo enabled > /sys/bus/platform/device/<usb phy id>/power/wakeup This will enable the PHY wakeup while going to standby. PHY wakeup feature is required to wakeup the system from standby state. Since AM33xx has a bug in which PHY wakeup should not be enabled while entering DS0, disable the same by default. A user wishing to use USB wakeup from standby mode need to enable the same using the sysfs entries. Also remove am335x_phy_runtime_(suspend/resume) this driver doesnot really enable/disable the clocks to the PHY. Add am335x_phy_(suspend/resume) and use the same for enabling the PHY_WKUP. Signed-off-by: George Cherian <george.cherian@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-11-25usb: phy: generic: fix how we find out about our resourcesFelipe Balbi
instead of having each user of generic phy find out about its own resources and pass it to the core layer, have th core layer itself figure that out. It's as simple as moving a piece of code around. This fixes a big regression caused during the merge window where am335x-based platforms wouldn't be able to probe their PHY driver. Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-11-25usb: phy: remove dead codeMichal Nazarewicz
Commit [4d175f34: usb: phy: nop: Defer clock prepare until PHY init] removed a goto reaching behind a “return ret” at the end of the function thus removing the only possible way that statement could be reached, and so rendering it a dead code. This commit cleans it up by removing said dead code. Signed-off-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-10-04usb: phy: generic: Don't use regulator framework for RESET lineRoger Quadros
Modelling the RESET line as a regulator supply wasn't a good idea as it kind of abuses the regulator framework and also makes adaptation code more complex. Instead, manage the RESET gpio line directly in the driver. Update the device tree binding information. This also makes us easy to migrate to a dedicated GPIO RESET controller whenever it becomes available. Signed-off-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-10-01usb: phy: am335x: Remove redundant of_match_ptrSachin Kamat
The data structure of_match_ptr() protects is always compiled in. Hence of_match_ptr() is not needed. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-10-01usb: phy: am335x: add wakeup supportSebastian Andrzej Siewior
This is based on George Cherian's patch which added power & wakeup support to am335x and does no longer apply since I took some if the code apart in favor of the multi instance support. This compiles and I boots and later it detects a device after I plug it in :) Could somebody please test it so it does what it should? Cc: George Cherian <george.cherian@ti.com> Reviewed-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-10-01usb: phy: nop: Defer clock prepare until PHY initMark Brown
Since we only enable the PHY clock on init and the PHY init and shutdown does not occur in atomitc context there is no need to prepare the clock before it is enabled. Move the clk_prepare() operations to go along with the enables, allowing the clock to be fully idle when not in use. Signed-off-by: Mark Brown <broonie@linaro.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-08-09usb: phy: Add AM335x PHY driverSebastian Andrzej Siewior
This driver is a redo of my earlier attempt. It uses parts of the generic PHY driver and uses the new control driver for the register the phy needs to power on/off the phy. It also enables easy access for the wakeup register which is not yet implemented. The difference between the omap attempt is: - no static holding variable - one global visible function which exports a struct with callbacks to access the "control" registers. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>