Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1218415
| From | Felipe Balbi <balbi@ti.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v4 1/9] usb: dwc3: add dual-role support |
| Date | 2015-09-03 18:10 +0200 |
| Message-ID | <q4Ffl-8tV-45@gated-at.bofh.it> (permalink) |
| References | <q4hcZ-7Er-3@gated-at.bofh.it> <q4hd0-7Er-19@gated-at.bofh.it> <q4hmF-7PP-1@gated-at.bofh.it> <q4BOq-3tf-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
Hi,
On Thu, Sep 03, 2015 at 03:21:48PM +0300, Roger Quadros wrote:
> >> + dwc->fsm->id = id;
> >> + dwc->fsm->b_sess_vld = vbus;
> >> + usb_otg_sync_inputs(dwc->fsm);
> >> +}
> >> +
> >> +static int dwc3_drd_start_host(struct otg_fsm *fsm, int on)
> >> +{
> >> + struct device *dev = usb_otg_fsm_to_dev(fsm);
> >> + struct dwc3 *dwc = dev_get_drvdata(dev);
> >
> > how about adding a usb_otg_get_drvdata(fsm) ?
>
> You meant for otg core? That can be done.
yeah. BTW, I think otg core needs quite a few changes to become actually
useful. Currently it's just too much pointer ping-pong going back and
forth between phy, otg core, udc and hcd.
Also, I caught a ton of issues with it and suspend/resume. You might
want to fix them before adding more users to it.
It's also rather racy and that needs fixing too. On top of all that, I
think there's too much being added to UDC just to get Dual-Role, let's
see if we can improve that too.
> >> @@ -843,6 +998,16 @@ static int dwc3_probe(struct platform_device *pdev)
> >> hird_threshold = 12;
> >>
> >> if (node) {
> >> + if (of_property_read_bool(node, "extcon"))
> >> + dwc->edev = extcon_get_edev_by_phandle(dev, 0);
> >> + else if (of_property_read_bool(dev->parent->of_node, "extcon"))
> >> + dwc->edev = extcon_get_edev_by_phandle(dev->parent, 0);
> >
> > why do you need to check the parent ? Why isn't that done on the glue
> > layer ?
>
> On DRA7-evm, the extcon device is defined in the glue layer node. But
> we need the device both at the glue layer and at the core layer.
why do you need extcon here ? Glue updates core via UTMI about the
states, right ? So you should get proper VBUS and ID status via OTG IRQ.
Is that not working ?
> We do get the extcon device in dwc3-omap.c
>
> Any suggestion how to pass the extcon device from glue layer to core.c?
> Or should I add the extcon property to dwc3 USB node as well in the DT?
GPIO toggles
dwc3-omap extcon event
update status via UTMI STATUS register
OTG IRQ on core
Horray!
:-)
> >> +
> >> + if (IS_ERR(dwc->edev)) {
> >> + dev_vdbg(dev, "couldn't get extcon device\n");
> >
> > dev_err() ??
>
> Is it ok to print it even in EPROBE_DEFER case?
hmm, probably pointless, indeed.
--
balbi
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v4 0/9] usb: dwc3: add dual-role support Roger Quadros <rogerq@ti.com> - 2015-09-02 16:30 +0200
[PATCH v4 1/9] usb: dwc3: add dual-role support Roger Quadros <rogerq@ti.com> - 2015-09-02 16:30 +0200
Re: [PATCH v4 1/9] usb: dwc3: add dual-role support Felipe Balbi <balbi@ti.com> - 2015-09-02 16:40 +0200
Re: [PATCH v4 1/9] usb: dwc3: add dual-role support Roger Quadros <rogerq@ti.com> - 2015-09-03 14:30 +0200
Re: [PATCH v4 1/9] usb: dwc3: add dual-role support Felipe Balbi <balbi@ti.com> - 2015-09-03 18:10 +0200
Re: [PATCH v4 1/9] usb: dwc3: add dual-role support Roger Quadros <rogerq@ti.com> - 2015-09-04 11:10 +0200
[PATCH v4 6/9] usb: dwc3: save/restore OTG registers during suspend/resume Roger Quadros <rogerq@ti.com> - 2015-09-02 16:30 +0200
Re: [PATCH v4 6/9] usb: dwc3: save/restore OTG registers during suspend/resume Felipe Balbi <balbi@ti.com> - 2015-09-02 16:50 +0200
Re: [PATCH v4 6/9] usb: dwc3: save/restore OTG registers during suspend/resume Roger Quadros <rogerq@ti.com> - 2015-09-03 16:00 +0200
[PATCH v4 3/9] usb: dwc3: dwc3-omap: Make the wrapper interrupt shared Roger Quadros <rogerq@ti.com> - 2015-09-02 16:30 +0200
Re: [PATCH v4 3/9] usb: dwc3: dwc3-omap: Make the wrapper interrupt shared Felipe Balbi <balbi@ti.com> - 2015-09-02 16:40 +0200
[PATCH v4 5/9] usb: dwc3: core: make dual-role work with OTG irq Roger Quadros <rogerq@ti.com> - 2015-09-02 16:30 +0200
Re: [PATCH v4 5/9] usb: dwc3: core: make dual-role work with OTG irq Felipe Balbi <balbi@ti.com> - 2015-09-02 16:50 +0200
Re: [PATCH v4 5/9] usb: dwc3: core: make dual-role work with OTG irq Roger Quadros <rogerq@ti.com> - 2015-09-03 16:00 +0200
Re: [PATCH v4 5/9] usb: dwc3: core: make dual-role work with OTG irq Felipe Balbi <balbi@ti.com> - 2015-09-03 18:00 +0200
Re: [PATCH v4 5/9] usb: dwc3: core: make dual-role work with OTG irq Roger Quadros <rogerq@ti.com> - 2015-09-04 11:20 +0200
[PATCH v4 9/9] usb: dwc3: core: don't break during suspend/resume while we're dual-role Roger Quadros <rogerq@ti.com> - 2015-09-02 16:30 +0200
Re: [PATCH v4 9/9] usb: dwc3: core: don't break during suspend/resume while we're dual-role Felipe Balbi <balbi@ti.com> - 2015-09-02 16:50 +0200
Re: [PATCH v4 9/9] usb: dwc3: core: don't break during suspend/resume while we're dual-role Roger Quadros <rogerq@ti.com> - 2015-09-03 16:10 +0200
Re: [PATCH v4 9/9] usb: dwc3: core: don't break during suspend/resume while we're dual-role Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2015-09-02 19:30 +0200
Re: [PATCH v4 9/9] usb: dwc3: core: don't break during suspend/resume while we're dual-role Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2015-09-03 16:10 +0200
Re: [PATCH v4 9/9] usb: dwc3: core: don't break during suspend/resume while we're dual-role Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2015-09-03 16:20 +0200
Re: [PATCH v4 9/9] usb: dwc3: core: don't break during suspend/resume while we're dual-role Roger Quadros <rogerq@ti.com> - 2015-09-03 16:20 +0200
Re: [PATCH v4 9/9] usb: dwc3: core: don't break during suspend/resume while we're dual-role Roger Quadros <rogerq@ti.com> - 2015-09-03 16:10 +0200
[PATCH v4 2/9] usb: dwc3: core.h: add some register definitions Roger Quadros <rogerq@ti.com> - 2015-09-02 16:30 +0200
[PATCH v4 4/9] usb: dwc3: core: Adapt to named interrupts Roger Quadros <rogerq@ti.com> - 2015-09-02 16:30 +0200
Re: [PATCH v4 4/9] usb: dwc3: core: Adapt to named interrupts Felipe Balbi <balbi@ti.com> - 2015-09-02 16:40 +0200
Re: [PATCH v4 4/9] usb: dwc3: core: Adapt to named interrupts Roger Quadros <rogerq@ti.com> - 2015-09-03 14:50 +0200
Re: [PATCH v4 4/9] usb: dwc3: core: Adapt to named interrupts Felipe Balbi <balbi@ti.com> - 2015-09-03 18:00 +0200
Re: [PATCH v4 4/9] usb: dwc3: core: Adapt to named interrupts Roger Quadros <rogerq@ti.com> - 2015-09-04 11:20 +0200
csiph-web