lkml.org 
[lkml]   [2015]   [Sep]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH v4 1/9] usb: dwc3: add dual-role support
    From
    Date
    Peter,

    On 06/09/15 05:02, Peter Chen wrote:
    > On Wed, Sep 02, 2015 at 05:24:16PM +0300, Roger Quadros wrote:
    >> Register with the USB OTG core. Since we don't support
    >> OTG yet we just work as a dual-role device even
    >> if device tree says "otg".
    >>
    >> +
    >> +static int dwc3_drd_init(struct dwc3 *dwc)
    >> +{
    >> + int ret, id, vbus;
    >> + struct usb_otg_caps *otgcaps = &dwc->otg_config.otg_caps;
    >> +
    >> + otgcaps->otg_rev = 0;
    >> + otgcaps->hnp_support = false;
    >> + otgcaps->srp_support = false;
    >> + otgcaps->adp_support = false;
    >> + dwc->otg_config.fsm_ops = &dwc3_drd_ops;
    >> +
    >> + if (!dwc->edev) {
    >> + dev_err(dwc->dev, "No extcon device found for OTG mode\n");
    >> + return -ENODEV;
    >> + }
    >> +
    >
    > Do All dwc3 platforms id/vbus need to get through extcon? Do the
    > SoCs have id/vbus pin?
    >
    >

    Extcon access is in fact not needed from dwc3 driver and I will be getting
    rid of this patch. We will support dual-role only via the OTG irq as in patch 5.

    The way it works is that the OMAP glue layer dwc3-omap.c requests extcon device
    and sets some mailbox register and this causes the VBUS/ID events to come over
    OTG irq/status. So this patch is redundant.

    The extcon device is not needed for all TI platforms. e.g. we need it for
    DRA7 but not for AM437x.

    cheers,
    -roger


    \
     
     \ /
      Last update: 2015-09-07 12:01    [W:4.317 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site