All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julius Werner <jwerner@chromium.org>
To: Jingoo Han <jg1.han@samsung.com>
Cc: Julius Werner <jwerner@chromium.org>,
	LKML <linux-kernel@vger.kernel.org>, Felipe Balbi <balbi@ti.com>,
	linux-usb@vger.kernel.org, devicetree-discuss@lists.ozlabs.org,
	linux-samsung-soc@vger.kernel.org,
	Vivek Gautam <gautam.vivek@samsung.com>,
	Praveen Paneri <p.paneri@samsung.com>,
	Kukjin Kim <kgene.kim@samsung.com>,
	Tushar Behera <tushar.behera@linaro.org>,
	Doug Anderson <dianders@chromium.org>,
	Olof Johansson <olofj@chromium.org>,
	Vincent Palatin <vpalatin@chromium.org>,
	Thomas Abraham <thomas.abraham@linaro.org>
Subject: Re: [PATCH] usb: phy: samsung-usb2: Toggle HSIC GPIO from device tree
Date: Thu, 11 Jul 2013 14:46:14 -0700	[thread overview]
Message-ID: <CAODwPW-=bo2BqcHopY32N76p6DDGNDmCrKFo1R4gEEZhsG-DYg@mail.gmail.com> (raw)
In-Reply-To: <000901ce7dc8$90a819b0$b1f84d10$@samsung.com>

Hi Jingoo,

Yeah, I followed that discussion back then, but it seems to have
stalled a little (at least the HSIC patches haven't been picked up in
any kernel.org repo yet to my knowledge).

The problem is that I think these approaches cannot work reliably. I
agree that it would be nice to control the HSIC device from its own
driver, and have spent quite some time playing around with the
usb/misc/usb3503.c driver to try to make this work... but there's a
timing dependency here that you just can't model correctly with
independent drivers.

If the HSIC device is already active during boot (e.g. because it was
used by firmware), there's always a chance that the USB stack will
come up before the driver that resets it does. The device will be
enumerated as normal, and when the other driver later pulls the reset
signal the USB stack will not notice because there is no real
disconnect detection on HSIC. Only when you eventually try to send
another transfer to the device will you start to get timeouts, and the
newly reset device will not be able to reenumerate because the host
never asks it to.

I really don't see how you could solve this without putting some kind
of synchronization mechanism in the USB drivers. So this leaves
ehci-s5p and phy-samsung-usb2 as the only possible places, and I chose
the latter since all the host-side HSIC initialization is also there
already. I think if you think of it as "reset whatever is on the other
side of this PHY", it's okay to put it as an optional feature into the
PHY driver.

  reply	other threads:[~2013-07-11 21:46 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-10  0:34 [PATCH] usb: phy: samsung-usb2: Toggle HSIC GPIO from device tree Julius Werner
2013-07-10  0:34 ` Julius Werner
2013-07-10  5:25 ` Felipe Balbi
2013-07-10  5:25   ` Felipe Balbi
2013-07-10 17:42   ` Julius Werner
2013-07-10 17:42     ` Julius Werner
2013-07-11  0:01     ` Fabio Estevam
2013-07-12  6:57     ` Felipe Balbi
2013-07-12  6:57       ` Felipe Balbi
2013-08-13  8:41       ` Tushar Behera
2013-08-27 18:44         ` Felipe Balbi
2013-08-27 18:44           ` Felipe Balbi
2013-08-28  3:55           ` Tushar Behera
2013-08-28  3:55             ` Tushar Behera
2013-08-28 18:24             ` Julius Werner
2013-08-28 18:24               ` Julius Werner
2013-07-10 23:52 ` Jingoo Han
2013-07-11 21:46   ` Julius Werner [this message]
2013-07-12  0:48     ` Jingoo Han
2013-07-12 10:34       ` Tomasz Figa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAODwPW-=bo2BqcHopY32N76p6DDGNDmCrKFo1R4gEEZhsG-DYg@mail.gmail.com' \
    --to=jwerner@chromium.org \
    --cc=balbi@ti.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=dianders@chromium.org \
    --cc=gautam.vivek@samsung.com \
    --cc=jg1.han@samsung.com \
    --cc=kgene.kim@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=olofj@chromium.org \
    --cc=p.paneri@samsung.com \
    --cc=thomas.abraham@linaro.org \
    --cc=tushar.behera@linaro.org \
    --cc=vpalatin@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.