public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Prashant Malani <pmalani@chromium.org>
Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
	wonchung@google.com, bleung@chromium.org,
	"Alan Stern" <stern@rowland.harvard.edu>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Chunfeng Yun" <chunfeng.yun@mediatek.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Mauro Carvalho Chehab" <mchehab+huawei@kernel.org>,
	"Noralf Trønnes" <noralf@tronnes.org>,
	"Rajat Jain" <rajatja@google.com>,
	"Rikard Falkeborn" <rikard.falkeborn@gmail.com>,
	"Thomas Zimmermann" <tzimmermann@suse.de>
Subject: Re: [PATCH 0/4] usb: Use notifier for linking Type C ports.
Date: Tue, 30 Nov 2021 13:03:43 +0200	[thread overview]
Message-ID: <YaYFDwsw2hKdJrGj@kuha.fi.intel.com> (raw)
In-Reply-To: <YaCrnMAEXnG+VO6d@kuha.fi.intel.com>

Hi Prashant,

On Fri, Nov 26, 2021 at 11:40:49AM +0200, Heikki Krogerus wrote:
> On Wed, Nov 24, 2021 at 03:10:06PM -0800, Prashant Malani wrote:
> > This series resolves the cyclic dependency error which was introduced by
> > commit 63cd78617350 ("usb: Link the ports to the connectors they are
> > attached to") which lead to it being reverted. The approach here is to
> > use a notifier to link a new Type C port to pre-existing USB ports
> > instead of calling an iterator of usb ports from the Type C connector
> > class. This allows commit 63cd78617350 ("usb: Link the ports to the
> > connectors they are attached to") to then be submitted without any
> > depmod cyclic dependency error.
> > 
> > The final patch removes the usb port iterator since it is no longer
> > needed.
> 
> This is not enough. Build the Type-C Class as a module and the USB bus
> statically, and the links will not get created.
> 
> I'm not sure you actually achieve much with this series, and I'm not
> sure this approach will ever fully solve the problem. As long as we
> have to declare API, we will have the circular dependency issue on our
> hands. But there are ways to avoid that.
> 
> There is for example the component framework (drivers/base/component.c)
> that I've been thinking about using here. In this case it would work
> so that you declare the USB Type-C part as your aggregate driver, and
> everything that is connected to it (so USB ports, DisplayPorts, TBT,
> etc.) would then just declare themselves as general components. Could
> you take a look at that?

I'm preparing a patch where I store all _PLDs in the ACPI tables, and
create list of devices that share it. I can convert port-mapper.c to
it and the component framework while at it.


Br,

-- 
heikki

  reply	other threads:[~2021-11-30 11:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-24 23:10 [PATCH 0/4] usb: Use notifier for linking Type C ports Prashant Malani
2021-11-24 23:10 ` [PATCH 1/4] usb: typec: Add port registration notifier Prashant Malani
2021-11-25  3:20   ` Prashant Malani
2021-11-24 23:10 ` [PATCH 2/4] usb: Use notifier to link Type C ports Prashant Malani
2021-11-25  2:15   ` kernel test robot
2021-11-24 23:10 ` [PATCH 3/4] usb: Link the ports to the connectors they are attached to Prashant Malani
2021-11-24 23:10 ` [PATCH 4/4] Revert "usb: Iterator for ports" Prashant Malani
2021-11-26  9:40 ` [PATCH 0/4] usb: Use notifier for linking Type C ports Heikki Krogerus
2021-11-30 11:03   ` Heikki Krogerus [this message]
2021-11-30 19:27     ` Prashant Malani
2021-12-01  9:55       ` Heikki Krogerus

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=YaYFDwsw2hKdJrGj@kuha.fi.intel.com \
    --to=heikki.krogerus@linux.intel.com \
    --cc=bhelgaas@google.com \
    --cc=bleung@chromium.org \
    --cc=chunfeng.yun@mediatek.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mchehab+huawei@kernel.org \
    --cc=noralf@tronnes.org \
    --cc=pmalani@chromium.org \
    --cc=rajatja@google.com \
    --cc=rikard.falkeborn@gmail.com \
    --cc=stern@rowland.harvard.edu \
    --cc=tzimmermann@suse.de \
    --cc=wonchung@google.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