The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@ti.com>
To: Lee Jones <lee.jones@linaro.org>
Cc: <linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <kernel@stlinux.com>,
	<balbi@ti.com>, <gregkh@linuxfoundation.org>,
	<linux-usb@vger.kernel.org>, <peter.griffin+familyguy@linaro.org>
Subject: Re: [RFC PATCH] usb: dwc3: core: allow vendor drivers to check probe status
Date: Thu, 17 Jul 2014 12:20:45 -0500	[thread overview]
Message-ID: <20140717172045.GM10459@saruman.home> (raw)
In-Reply-To: <1405617213-27360-1-git-send-email-lee.jones@linaro.org>

[-- Attachment #1: Type: text/plain, Size: 1805 bytes --]

Hi,

On Thu, Jul 17, 2014 at 06:13:33PM +0100, Lee Jones wrote:
> This patch provides mechanism for subordinate devices to check
> whether the DWC3 core probed successfully or otherwise.  Useful
> if PHYs are required to configure controllers, but aren't yet
> available.  The DWC3 core driver will defer probe if PHYs are
> unavailable, however subordinate DWC3 drivers currently do not
> have any visibility or means to check status - until now.

what's a subordinate DWC3 driver ?

> Another way to do this would be to *_phy_get*(), but if every
> driver did this it would create a high level of code
> duplication.
> 
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>  drivers/usb/dwc3/core.c | 12 ++++++++++++
>  drivers/usb/dwc3/core.h |  1 +
>  2 files changed, 13 insertions(+)
> 
> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
> index eb69eb9..171ca52 100644
> --- a/drivers/usb/dwc3/core.c
> +++ b/drivers/usb/dwc3/core.c
> @@ -47,6 +47,14 @@
>  
>  /* -------------------------------------------------------------------------- */
>  
> +static bool is_enabled = false;
> +
> +int dwc3_is_enabled(void)
> +{
> +	return is_enabled;
> +}
> +EXPORT_SYMBOL(dwc3_is_enabled);

no, no, no, no. Let me try that again, hello no! You _do_ realise there
are systems with more than one dwc3 instance, right ? And this is the
most fragile possible way of doing this.

You never explained what's a dwc3 subordinate driver, you don't show any
example of how this would be used and why/where does the PHY need to
poke into DWC3. Why isn't probe defer enough for you ? Which platform
are you working on ? what is the problem that you're trying to solve ?

From this patch, all I can is NAK this patch with no mercy, sorry.

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2014-07-17 17:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-17 17:13 [RFC PATCH] usb: dwc3: core: allow vendor drivers to check probe status Lee Jones
2014-07-17 17:20 ` Felipe Balbi [this message]
2014-07-18  7:11   ` Lee Jones
2014-07-18 14:40     ` Felipe Balbi
2014-07-22 13:55       ` Peter Griffin
2014-07-22 15:04         ` Felipe Balbi

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=20140717172045.GM10459@saruman.home \
    --to=balbi@ti.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel@stlinux.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=peter.griffin+familyguy@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox