- 23 2月, 2016 1 次提交
-
-
由 Ivan T. Ivanov 提交于
When working in Dual Role Device mode, USB state machine is not kicked, when host or gadget drivers are loaded. Fix this be explicitly triggering state detection on client driver load. Issue is that if the board is booted without micro usb cable and usb device attached, kernel fails to populate the usb host and device. The reason for this is that the state machine worker logic only checks for USB_DR_MODE_PERIPHERAL and USB_DR_MODE_HOST modes to run worker thread. However if the phy is configured in OTG mode it would fail to run the state machine, resulting in failure to detect for very first time. This patch fixes the issue by removing the explicit checks. Issue is noticed on Qualcomm Dragon board DB410C. [srinivas.kandagatla@linaro.org: Added more details to log] Signed-off-by: NIvan T. Ivanov <ivan.ivanov@linaro.org> Signed-off-by: NSrinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: NFelipe Balbi <balbi@kernel.org>
-
- 04 2月, 2016 1 次提交
-
-
由 Srinivas Kandagatla 提交于
This driver registers for extcon events as part of its probe, but never unregisters them in case of error in the probe path. There were multiple issues noticed due to this missing error handling. One of them is random crashes if the regulators are not ready yet by the time probe is invoked. Ivan's previous attempt [1] to fix this issue, did not really address all the failure cases like regualtor/get_irq failures. [1] https://lkml.org/lkml/2015/9/7/62 Without this patch the kernel would carsh with log: ... Unable to handle kernel paging request at virtual address 17d78410 pgd = ffffffc001a5c000 [17d78410] *pgd=00000000b6806003, *pud=00000000b6806003, *pmd=0000000000000000 Internal error: Oops: 96000005 [#1] PREEMPT SMP Modules linked in: CPU: 0 PID: 6 Comm: kworker/u8:0 Not tainted 4.4.0+ #48 Hardware name: Qualcomm Technologies, Inc. APQ 8016 SBC (DT) Workqueue: deferwq deferred_probe_work_func task: ffffffc03686e900 ti: ffffffc0368b0000 task.ti: ffffffc0368b0000 PC is at raw_notifier_chain_register+0x1c/0x44 LR is at extcon_register_notifier+0x88/0xc8 pc : [<ffffffc0000da43c>] lr : [<ffffffc000606298>] pstate: 80000085 sp : ffffffc0368b3a70 x29: ffffffc0368b3a70 x28: ffffffc03680c310 x27: ffffffc035518000 x26: ffffffc035518000 x25: ffffffc03bfa20e0 x24: ffffffc035580a18 x23: 0000000000000000 x22: ffffffc035518458 x21: ffffffc0355e9a60 x20: ffffffc035518000 x19: 0000000000000000 x18: 0000000000000028 x17: 0000000000000003 x16: ffffffc0018153c8 x15: 0000000000000001 x14: ffffffc03686f0f8 x13: ffffffc03686f0f8 x12: 0000000000000003 x11: 0000000000000001 x10: 0000000000000001 x9 : ffffffc03686f0f8 x8 : 0000e3872014c1a1 x7 : 0000000000000028 x6 : 0000000000000000 x5 : 0000000000000001 x4 : 0000000000000000 x3 : 00000000354fb170 x2 : 0000000017d78400 x1 : ffffffc0355e9a60 x0 : ffffffc0354fb268 Fixes: 591fc116 ("usb: phy: msm: Use extcon framework for VBUS and ID detection") CC: Stable <stable@vger.kernel.org> Signed-off-by: NSrinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: NFelipe Balbi <balbi@kernel.org>
-
- 08 12月, 2015 1 次提交
-
-
由 LABBE Corentin 提交于
of_match_device could return NULL, and so cause a NULL pointer dereference later. Even if the probability of this case is very low, fixing it made static analyzers happy. Solving this with of_device_get_match_data made also code simplier. Reported-by: coverity (CID 1324133) Signed-off-by: NLABBE Corentin <clabbe.montjoie@gmail.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 27 9月, 2015 1 次提交
-
-
由 Heikki Krogerus 提交于
By using the unified device property interface, the function can be made available for all platforms and not just the ones using DT. Signed-off-by: NHeikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 31 7月, 2015 1 次提交
-
-
由 Ivan T. Ivanov 提交于
apq8016-sbc board is using Dual SPDT USB Switch (TC7USB40MU), witch is controlled by GPIO to de/multiplex D+/D- USB lines to USB2513B Hub and uB connector. Add support for this. Signed-off-by: NIvan T. Ivanov <ivan.ivanov@linaro.org> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 29 7月, 2015 1 次提交
-
-
由 Chanwoo Choi 提交于
This patch removes the deprecated notifier API of extcon framwork and then use the new extcon API with the unique id to indicate the each external connector (USB, USB-HOST). Alter deprecated API as following: - extcon_register_interest() -> extcon_register_notifier() - extcon_get_cable_state(*edev, char *) -> extcon_get_cable_state_(*edev, id) Cc: Felipe Balbi <balbi@ti.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 29 4月, 2015 2 次提交
-
-
由 Ivan T. Ivanov 提交于
VBUS is not routed to USB PHY on recent Qualcomm platforms. USB controller must see VBUS in order to pull-up DP when setting RS bit. Henc configure USB PHY and LINK registers sense VBUS and enable manual pullup on D+ line. Cc: Vamsi Krishna <vskrishn@codeaurora.org> Cc: Mayank Rana <mrana@codeaurora.org> Signed-off-by: NIvan T. Ivanov <ivan.ivanov@linaro.org> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Ivan T. Ivanov 提交于
On recent Qualcomm platforms VBUS and ID lines are not routed to USB PHY LINK controller. Use extcon framework to receive connect and disconnect ID and VBUS notification. Signed-off-by: NIvan T. Ivanov <ivan.ivanov@linaro.org> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 19 3月, 2015 1 次提交
-
-
由 Stephen Boyd 提交于
This code is no longer used now that mach-msm has been removed. Delete it. Cc: Felipe Balbi <balbi@ti.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: linux-usb@vger.kernel.org Cc: David Brown <davidb@codeaurora.org> Cc: Bryan Huntsman <bryanh@codeaurora.org> Cc: Daniel Walker <dwalker@fifo99.com> Signed-off-by: NStephen Boyd <sboyd@codeaurora.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 14 3月, 2015 1 次提交
-
-
由 Stephen Boyd 提交于
This code is no longer used now that mach-msm has been removed. Delete it. Cc: Felipe Balbi <balbi@ti.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: linux-usb@vger.kernel.org Cc: David Brown <davidb@codeaurora.org> Cc: Bryan Huntsman <bryanh@codeaurora.org> Cc: Daniel Walker <dwalker@fifo99.com> Signed-off-by: NStephen Boyd <sboyd@codeaurora.org> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 10 3月, 2015 1 次提交
-
-
由 Bjorn Andersson 提交于
The function regulator_set_optimum_mode() is changing name to regulator_set_load(), so update the code accordingly. Signed-off-by: NBjorn Andersson <bjorn.andersson@sonymobile.com> Acked-by: NFelipe Balbi <balbi@ti.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 04 12月, 2014 1 次提交
-
-
由 Rafael J. Wysocki 提交于
After commit b2b49ccb (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: NRafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: NAlan Stern <stern@rowland.harvard.edu> Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 04 11月, 2014 3 次提交
-
-
由 Antoine Tenart 提交于
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: NAntoine Tenart <antoine.tenart@free-electrons.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Antoine Tenart 提交于
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: NKishon Vijay Abraham I <kishon@ti.com> Acked-by: NPeter Chen <peter.chen@freescale.com> Signed-off-by: NAntoine Tenart <antoine.tenart@free-electrons.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Peter Chen 提交于
The memory subsystem has already had similar message for it. Signed-off-by: NPeter Chen <peter.chen@freescale.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 29 9月, 2014 1 次提交
-
-
由 Kiran Padwal 提交于
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: NKiran Padwal <kiran.padwal@smartplayin.com> Reviewed-by: NIvan T. Ivanov <iivanov@mm-sol.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 28 8月, 2014 1 次提交
-
-
由 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. phy-reset clk is only used as argument to the mach level callbacks, so this patch adds condition before clk_get calls so that the driver wouldn't fail on SOCs which do not have this support. Signed-off-by: NSrinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 21 8月, 2014 1 次提交
-
-
由 Felipe Balbi 提交于
that declaration is only used inside this driver, marking it static. Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 19 8月, 2014 1 次提交
-
-
由 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: NWei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 01 7月, 2014 3 次提交
-
-
由 Srinivas 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: NSrinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 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: NSrinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Jingoo Han 提交于
Make of_device_id array const, because all OF functions handle it as const. Signed-off-by: NJingoo Han <jg1.han@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 23 5月, 2014 1 次提交
-
-
由 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: 10f0577a ('usb: phy: msm: change devm_ioremap() to devm_ioremap_resource()') Reported-by: N"Ivan T. Ivanov" <iivanov@mm-sol.com> Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 14 5月, 2014 1 次提交
-
-
由 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: 6b99c68e ('usb: phy: msm: Migrate to Managed Device Resource allocation') Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 13 5月, 2014 2 次提交
-
-
由 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: NIvan T. Ivanov <iivanov@mm-sol.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Felipe 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: NFelipe Balbi <balbi@ti.com>
-
- 01 5月, 2014 14 次提交
-
-
由 Ivan 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: NIvan T. Ivanov <iivanov@mm-sol.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Ivan 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: NIvan T. Ivanov <iivanov@mm-sol.com> Cc: Mayank Rana <mrana@codeaurora.org> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Ivan T. Ivanov 提交于
Put the transceiver in non-driving mode. Otherwise host may not detect soft-disconnection. Signed-off-by: NIvan T. Ivanov <iivanov@mm-sol.com> Cc: Pavankumar Kondeti <pkondeti@codeaurora.org> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Tim 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: NTim Bird <tim.bird@sonymobile.com> Signed-off-by: NIvan T. Ivanov <iivanov@mm-sol.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Tim 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: NTim Bird <tim.bird@sonymobile.com> Signed-off-by: NIvan T. Ivanov <iivanov@mm-sol.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Ivan 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: NIvan T. Ivanov <iivanov@mm-sol.com> Signed-off-by: NTim Bird <tim.bird@sonymobile.com> Cc: Mayank Rana <mrana@codeaurora.org> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Ivan 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: NIvan T. Ivanov <iivanov@mm-sol.com> Cc: Manu Gautam <mgautam@codeaurora.org> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Ivan T. Ivanov 提交于
Using reset framework eliminate need of platform specific callbacks and enable reset lines to be specified in DT files. Signed-off-by: NIvan T. Ivanov <iivanov@mm-sol.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Ivan T. Ivanov 提交于
Allows controller to be specified via device tree. Signed-off-by: NIvan T. Ivanov <iivanov@mm-sol.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Ivan T. Ivanov 提交于
Function return negative code on error. Signed-off-by: NIvan T. Ivanov <iivanov@mm-sol.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Ivan 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: NIvan T. Ivanov <iivanov@mm-sol.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Ivan T. Ivanov 提交于
There are no references to 'pclk_src_name' in plaform code, so it is unused. Signed-off-by: NIvan T. Ivanov <iivanov@mm-sol.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Ivan 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: NIvan T. Ivanov <iivanov@mm-sol.com> Acked-by: NDavid Brown <davidb@codeaurora.org> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Ivan T. Ivanov 提交于
This fixes following: WARNING: quoted string split across lines WARNING: Prefer seq_puts to seq_printf Signed-off-by: NIvan T. Ivanov <iivanov@mm-sol.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-