All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Roger Quadros <rogerq-l0cyMroinI0@public.gmane.org>
Cc: stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org,
	sre-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	peter.chen-3arQi8VN3Tc@public.gmane.org,
	tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org,
	linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] usb: host: Allow EHCI_OMAP to be built-in when USB_GADGET is 'm'
Date: Fri, 01 Jul 2016 10:57:43 +0300	[thread overview]
Message-ID: <878txloknc.fsf@linux.intel.com> (raw)
In-Reply-To: <577525BF.3060509-l0cyMroinI0@public.gmane.org>

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


Hi,

Roger Quadros <rogerq-l0cyMroinI0@public.gmane.org> writes:
>>> NOP_USB_XCEIV is used not only by gadget drivers but by
>>> host drivers as well e.g. EHCI_OMAP.
>>>
>>> commit 5a8d651a2bde ("usb: gadget: move gadget API functions to udc-core")
>>> made it so that NOP_USB_XCEIV can't be built-in if USB_GADGET is 'm'.
>>> But this prevents EHCI_OMAP to be built-in if USB_GADGET is 'm'.
>>>
>>> Fix this undesired behaviour by moving usb_gadget_vbus_connect/disconnect()
>>> to usb/gadget.h so that NOP_USB_XCEIV has no build dependency
>>> on USB_GADGET.
>>>
>>> Retain the original Kconfig behaviour i.e. NOP_USB_XCEIV is selected
>>> by drivers that need it.
>> 
>> no, this is the wrong way to fix this. NOP _has_ a dependency on the
>> Gadget API if it calls Gadget API functions. Dependencies are proper.
>> 
>> Maybe the reason for the problem is that we ended up adding far too much
>> code to phy-generic.c itself. Maybe it shouldn't know about clks and
>> interrupts. The original idea of that driver was to simply satisfy a
>> requirement to have a valid transceiver by some platforms. Maybe we
>> should fix that instead. Moving functions around to workaround a problem
>> is not the way to go, sorry.
>> 
> OK but something that was working all these years is broken by your
> patch.
> Do you mind fixing it please? Or at least let me know how you want to
> get it fixed.

diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index 2e710a4cca52..89fd095ca33d 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -180,7 +180,7 @@ config USB_EHCI_MXC
 config USB_EHCI_HCD_OMAP
        tristate "EHCI support for OMAP3 and later chips"
        depends on ARCH_OMAP
-       depends on NOP_USB_XCEIV
+       depends on USB_PHY
        default y
        ---help---
          Enables support for the on-chip EHCI controller on


-- 
balbi

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Felipe Balbi <balbi@kernel.org>
To: Roger Quadros <rogerq@ti.com>
Cc: stern@rowland.harvard.edu, sre@kernel.org, peter.chen@nxp.com,
	tony@atomide.com, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org
Subject: Re: [PATCH] usb: host: Allow EHCI_OMAP to be built-in when USB_GADGET is 'm'
Date: Fri, 01 Jul 2016 10:57:43 +0300	[thread overview]
Message-ID: <878txloknc.fsf@linux.intel.com> (raw)
In-Reply-To: <577525BF.3060509@ti.com>

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


Hi,

Roger Quadros <rogerq@ti.com> writes:
>>> NOP_USB_XCEIV is used not only by gadget drivers but by
>>> host drivers as well e.g. EHCI_OMAP.
>>>
>>> commit 5a8d651a2bde ("usb: gadget: move gadget API functions to udc-core")
>>> made it so that NOP_USB_XCEIV can't be built-in if USB_GADGET is 'm'.
>>> But this prevents EHCI_OMAP to be built-in if USB_GADGET is 'm'.
>>>
>>> Fix this undesired behaviour by moving usb_gadget_vbus_connect/disconnect()
>>> to usb/gadget.h so that NOP_USB_XCEIV has no build dependency
>>> on USB_GADGET.
>>>
>>> Retain the original Kconfig behaviour i.e. NOP_USB_XCEIV is selected
>>> by drivers that need it.
>> 
>> no, this is the wrong way to fix this. NOP _has_ a dependency on the
>> Gadget API if it calls Gadget API functions. Dependencies are proper.
>> 
>> Maybe the reason for the problem is that we ended up adding far too much
>> code to phy-generic.c itself. Maybe it shouldn't know about clks and
>> interrupts. The original idea of that driver was to simply satisfy a
>> requirement to have a valid transceiver by some platforms. Maybe we
>> should fix that instead. Moving functions around to workaround a problem
>> is not the way to go, sorry.
>> 
> OK but something that was working all these years is broken by your
> patch.
> Do you mind fixing it please? Or at least let me know how you want to
> get it fixed.

diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index 2e710a4cca52..89fd095ca33d 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -180,7 +180,7 @@ config USB_EHCI_MXC
 config USB_EHCI_HCD_OMAP
        tristate "EHCI support for OMAP3 and later chips"
        depends on ARCH_OMAP
-       depends on NOP_USB_XCEIV
+       depends on USB_PHY
        default y
        ---help---
          Enables support for the on-chip EHCI controller on


-- 
balbi

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

  parent reply	other threads:[~2016-07-01  7:57 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-30  8:40 [PATCH] usb: host: Allow EHCI_OMAP to be built-in when USB_GADGET is 'm' Roger Quadros
2016-06-30  8:40 ` Roger Quadros
2016-06-30 10:14 ` Felipe Balbi
2016-06-30 10:14   ` Felipe Balbi
2016-06-30 13:59   ` Roger Quadros
2016-06-30 13:59     ` Roger Quadros
     [not found]     ` <577525BF.3060509-l0cyMroinI0@public.gmane.org>
2016-07-01  7:57       ` Felipe Balbi [this message]
2016-07-01  7:57         ` Felipe Balbi
2016-07-01  8:10         ` Roger Quadros
2016-07-01  8:10           ` Roger Quadros
2016-07-01  8:15           ` Felipe Balbi
2016-07-01  8:28             ` Roger Quadros
2016-07-01  8:28               ` Roger Quadros
2016-07-01  9:41               ` Felipe Balbi
2016-07-01 10:15                 ` Roger Quadros
2016-07-01 10:15                   ` Roger Quadros

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=878txloknc.fsf@linux.intel.com \
    --to=balbi-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=peter.chen-3arQi8VN3Tc@public.gmane.org \
    --cc=rogerq-l0cyMroinI0@public.gmane.org \
    --cc=sre-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org \
    --cc=tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.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.