[PATCH v12 00/12] Add USB OTG HNP and SRP support on Chipidea usb driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Li Jun <b47624@xxxxxxxxxxxxx>

This patchset adds USB OTG HNP and SRP support on chipidea usb driver,
existing OTG port role swtich function by ID pin status kept unchanged,
based on that, if select CONFIG_USB_OTG_FSM, OTG HNP and SRP will be
supported.

Reference to:
"On-The-Go and Embedded Host Supplement to the USB Revision 2.0 Specification July 27, 2012
Revision 2.0 version 1.1a"

Change since v11:
- Add one more patch to export symbol otg_statemachine to resolve symbol
  undefined error when ci hdrc driver build as module.

Change since v10:
- Use queue work to start fsm instead of directly call to fsm work in
  ci_hdrc_otg_fsm_start() for patch 07/11.

Changes since v9:
- Move xxx_fsm_start to be after request irq since xxx_fsm_work need call to
  disable_irq_nosync(ci->irq).
- Add fsm handling in xxx_fsm_work for regsiter gadget driver with vbus on, instead
  of rely on B_SE0_SRP timer(which is not directly linked to this case and need wait
  1s).
- Add comments on a_idle to a_wait_vrise due to ID change, which is out of OTG spec
  but make sense for user experience.
- Remove blank line introduced in v9.
 
Changes since v8:
- fsm start is the only entry point to start fsm and cover all role start/stop,
  which only call to ci_otg_fsm_work(). Move otg fsm start before request_irq
  for fsm mode, ci_role_start only for non fsm mode.
- use queue work to handle further state changes in ci_otg_fsm_work().
- Let otg fsm handle all after ci->driver is set in ci_udc_start.
- Enable BSV irq when power up with ID is 1.

Changes since v7:
- move role start special handling in ci_hdrc_otg_fsm_start()
  this can make start host/gadget clean.
- move ci_hdrc_otg_fsm_init() into ci_hdrc_otg_init()
- Remain ci_role_start() in ci_hdrc_probe because host role start
  need be done before request_irq.
- Revert the otg->host set change since fsm init will be fixed before
  role start.
- Remove fsm->protocol init in ci_hdrc_otg_fsm_init().

Li Jun (12):
  usb: phy: otg-fsm: export symbol of otg_statemachine
  usb: chipidea: usb OTG fsm initialization.
  usb: chipidea: host: vbus control change for OTG HNP.
  usb: chipidea: host: init otg port number.
  usb: chipidea: udc: driver update for OTG HNP.
  usb: chipidea: add OTG fsm operation functions implemenation.
  usb: chipidea: OTG fsm timers initialization.
  usb: chipidea: OTG HNP and SRP fsm implementation.
  usb: chipidea: add sys inputs for OTG fsm input.
  usb: chipidea: debug: add debug file for OTG variables
  Documentation: ABI: usb: sysfs Description for chipidea USB OTG HNP
    and SRP
  Documentation: usb: add chipidea.txt for how to demo usb OTG HNP and
    SRP

 .../ABI/testing/sysfs-platform-chipidea-usb-otg    |   56 ++
 Documentation/usb/chipidea.txt                     |   71 ++
 drivers/usb/chipidea/Makefile                      |    1 +
 drivers/usb/chipidea/bits.h                        |   10 +
 drivers/usb/chipidea/ci.h                          |   19 +
 drivers/usb/chipidea/core.c                        |   24 +-
 drivers/usb/chipidea/debug.c                       |   84 ++
 drivers/usb/chipidea/host.c                        |   21 +-
 drivers/usb/chipidea/otg.c                         |   15 +-
 drivers/usb/chipidea/otg_fsm.c                     |  865 ++++++++++++++++++++
 drivers/usb/chipidea/otg_fsm.h                     |  129 +++
 drivers/usb/chipidea/udc.c                         |   19 +-
 drivers/usb/phy/phy-fsm-usb.c                      |    1 +
 13 files changed, 1301 insertions(+), 14 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-platform-chipidea-usb-otg
 create mode 100644 Documentation/usb/chipidea.txt
 create mode 100644 drivers/usb/chipidea/otg_fsm.c
 create mode 100644 drivers/usb/chipidea/otg_fsm.h

-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux