1. 23 2月, 2016 1 次提交
    • I
      usb: phy: msm: Trigger USB state detection work in DRD mode · 8de4b3a3
      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>
      8de4b3a3
  2. 04 2月, 2016 1 次提交
    • S
      usb: phy: msm: fix error handling in probe. · a38a08df
      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>
      a38a08df
  3. 08 12月, 2015 1 次提交
  4. 27 9月, 2015 1 次提交
  5. 31 7月, 2015 1 次提交
  6. 29 7月, 2015 1 次提交
    • C
      usb: phy: msm-usb: Replace deprecated API of extcon · 83b7b67c
      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>
      83b7b67c
  7. 29 4月, 2015 2 次提交
  8. 19 3月, 2015 1 次提交
  9. 14 3月, 2015 1 次提交
  10. 10 3月, 2015 1 次提交
  11. 04 12月, 2014 1 次提交
  12. 04 11月, 2014 3 次提交
  13. 29 9月, 2014 1 次提交
  14. 28 8月, 2014 1 次提交
  15. 21 8月, 2014 1 次提交
  16. 19 8月, 2014 1 次提交
  17. 01 7月, 2014 3 次提交
    • S
      usb: phy: msm: Do not do runtime pm if the phy is not idle · 508ccea1
      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>
      508ccea1
    • S
      usb: phy: msm: Make phy_reset clk and reset line optional. · e44f1f4c
      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>
      e44f1f4c
    • J
      usb: phy: msm: Make of_device_id array const · 492240b0
      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>
      492240b0
  18. 23 5月, 2014 1 次提交
  19. 14 5月, 2014 1 次提交
  20. 13 5月, 2014 2 次提交
  21. 01 5月, 2014 14 次提交