mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kishon Vijay Abraham I <kishon@ti.com>
To: Raviteja Garimella <raviteja.garimella@broadcom.com>
Cc: Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>, Ray Jui <rjui@broadcom.com>,
	Scott Branden <sbranden@broadcom.com>,
	Jon Mason <jonmason@broadcom.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will.deacon@arm.com>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	BCM Kernel Feedback <bcm-kernel-feedback-list@broadcom.com>,
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v4 2/3] Broadcom USB DRD Phy driver for Northstar2
Date: Wed, 5 Apr 2017 19:04:48 +0530	[thread overview]
Message-ID: <5f6d688b-7bbc-7b3c-2be8-fcea7853aae3@ti.com> (raw)
In-Reply-To: <CAEHZuqMpHMDMVL6XMxrSPC3zeXZ=-Wx=xTSON_CruXnVC5PsdA@mail.gmail.com>

Hi Ravi,

On Wednesday 05 April 2017 06:30 PM, Raviteja Garimella wrote:
> Hi Kishon,
> 
> On Wed, Apr 5, 2017 at 4:30 PM, Kishon Vijay Abraham I <kishon@ti.com> wrote:
>> Hi,
>>
>> On Tuesday 28 March 2017 05:57 PM, Raviteja Garimella wrote:
>>> This is driver for USB DRD Phy used in Broadcom's Northstar2
>>> SoC. The phy can be configured to be in Device mode or Host
>>> mode based on the type of cable connected to the port. The
>>> driver registers to  extcon framework to get appropriate
>>> connect events for Host/Device cables connect/disconnect
>>> states based on VBUS and ID interrupts.
>>
>> $patch should be phy: phy-bcm-ns2-usbdrd: USB DRD Phy driver for Broadcoms
>> Northstar2.
>>
> 
> Will do.
> 
>> Sorry for not letting you know this earlier. But I feel the design of the
>> driver should be changed. Extcon shouldn't be used here. The extcon
>> notifications should be sent to the consumer driver and the consumer driver
>> should be responsible for invoking the phy ops.
>>
> 
> The consumer drivers here would be a UDC driver (USB device
> controller), EHCI and OHCI host controller drivers.
> I was already suggested in UDC driver review to deal with extcon in Phy driver.
> 
> This phy connects to 2 host controllers, and one device controller.
> That's the design in Broadcom Northstar2
> platform. The values of the VBUS and ID pins of this port are
> determined based on the type of the cable (device cable
> or host cable). And. phy has to be configured accordingly.
> 
>> The phy ops being invoked during extcon events doesn't look right.
> 
> Could you please elaborate on the concern, so that we can think of
> mitigating those issues in this driver?
> Since we are dealing with phy init/shutdown in this driver itself, are
> you okay with moving the extcon handling code
> out of phy ops ?

yeah, For e.g., ns2_drd_phy_init is part of phy_ops and is being invoked from
extcon events too. Can a phy which is initialized by a phy consumer (say your
UDC invokes phy_init) can be shutdown by an extcon event?

Maybe a clear explanation of when phy_ops here will be invoked and when it will
set using extcon events might help.

Thanks
Kishon

  reply	other threads:[~2017-04-05 13:37 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-28 12:27 [PATCH v4 0/3] Support for USB DRD Phy driver for NS2 Raviteja Garimella
2017-03-28 12:27 ` [PATCH v4 1/3] Add DT bindings documentation for NS2 USB DRD phy Raviteja Garimella
2017-03-28 12:27 ` [PATCH v4 2/3] Broadcom USB DRD Phy driver for Northstar2 Raviteja Garimella
2017-04-05 11:00   ` Kishon Vijay Abraham I
2017-04-05 13:00     ` Raviteja Garimella
2017-04-05 13:34       ` Kishon Vijay Abraham I [this message]
2017-04-05 14:10         ` Raviteja Garimella
2017-04-10  5:25           ` Kishon Vijay Abraham I
2017-04-10  7:27             ` Raviteja Garimella
2017-04-10  8:27               ` Kishon Vijay Abraham I
2017-04-10  8:30                 ` Raviteja Garimella
2017-04-10  8:37           ` Kishon Vijay Abraham I
2017-04-12  6:54             ` Raviteja Garimella
2017-03-28 12:27 ` [PATCH v4 3/3] DT nodes for Broadcom Northstar2 USB DRD Phy Raviteja Garimella

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=5f6d688b-7bbc-7b3c-2be8-fcea7853aae3@ti.com \
    --to=kishon@ti.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=catalin.marinas@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jonmason@broadcom.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=raviteja.garimella@broadcom.com \
    --cc=rjui@broadcom.com \
    --cc=robh+dt@kernel.org \
    --cc=sbranden@broadcom.com \
    --cc=will.deacon@arm.com \
    /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

all inboxes | Powered by JetHome®