Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1577254pxu; Thu, 17 Dec 2020 13:21:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJyByhw0N334f7yrJsvvaNqutHShDsO9zi0P/iZVUWtbYIO/2CY0+gfr5s5OQ6oYyb76rdLd X-Received: by 2002:a05:6402:17:: with SMTP id d23mr1304104edu.341.1608240099768; Thu, 17 Dec 2020 13:21:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608240099; cv=none; d=google.com; s=arc-20160816; b=TBUByRx2R+GXo+aNIWQUqyTaYIMlJl1ju2LwJvSoKRommS7kPY2OG+Q5PLc0fBaQq7 8cSyqvAf47AbFROFJyviubIPqFkGQtlxW1z/x4w1jDQxREIVIbkNjKlJfQKHSrQs1fOV LayNL/dHniBKgTZxkrnPiFkYQgjipmnk6orsaTRp2Dyr6RBx05MrmmbYAEDRDomqcXeq xYgiDO0lIjDLPRmuuH7ZSqbDwrj/VDxo44edZtNykvMFlMlsxXajDaRD3e/I+Rjj7kOk lPXkeadaPrHslieREMPqOo8p2ut543e8VZII9V+6ZRmpDF0VRSMIkYygxLIwS63XKhnu VR2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=EqHqMZHi/nWpy4+ySN71aJY9CvhxL5L746hWxatC5wA=; b=0ZOOQy7zUoBzd9zPTyPC/YiSH88TyJaQ+ve5N+2SEp9a5Hn+p3r6IWj3ENf2rtfEvk N1K0su7O6ITC9RUJRAzHn+h1Vc1V9R/UnlSwGgwmJvzR1lXYdfn3wNDpk2eF6qGP2Cd4 Qqzx8tvl703A806tml9MV61js0yLgr1NP4P5zLdq2NNIMWdeka88xGmHKXfbSWm5lteZ 2nb7WhsVx3qupC6BcS0NAQOyPOOmxKwElq6IWW2m+jDHui3YHEgAuY/HOhJiUwNsFCjI BtaPMKFLtgNahl7MbH6EWm+6+B5Xu3SBCY37SpVq8oAetPPE807WlCBxUVpFwyFikKXD QWNg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t6si5104927edt.513.2020.12.17.13.21.16; Thu, 17 Dec 2020 13:21:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729021AbgLQVUY (ORCPT + 99 others); Thu, 17 Dec 2020 16:20:24 -0500 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:58345 "EHLO relay4-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728086AbgLQVUX (ORCPT ); Thu, 17 Dec 2020 16:20:23 -0500 X-Originating-IP: 86.202.109.140 Received: from localhost (lfbn-lyo-1-13-140.w86-202.abo.wanadoo.fr [86.202.109.140]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 21204E0006; Thu, 17 Dec 2020 21:19:37 +0000 (UTC) Date: Thu, 17 Dec 2020 22:19:37 +0100 From: Alexandre Belloni To: Greg KH Cc: Dan Williams , Pierre-Louis Bossart , alsa-devel@alsa-project.org, Kiran Patil , linux-rdma , Shiraz Saleem , Martin Habets , Liam Girdwood , Ranjani Sridharan , Fred Oh , Mark Brown , Jason Gunthorpe , Dave Ertman , Jakub Kicinski , Netdev , Leon Romanovsky , David Miller , Linux Kernel Mailing List , Parav Pandit Subject: Re: [resend/standalone PATCH v4] Add auxiliary bus support Message-ID: <20201217211937.GA3177478@piout.net> References: <160695681289.505290.8978295443574440604.stgit@dwillia2-desk3.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On 05/12/2020 16:51:36+0100, Greg KH wrote: > > To me, the documentation was written, and reviewed, more from the > > perspective of "why not open code a custom bus instead". So I can see > > after the fact how that is a bit too much theory and justification and > > not enough practical application. Before the fact though this was a > > bold mechanism to propose and it was not clear that everyone was > > grokking the "why" and the tradeoffs. > > Understood, I guess I read this from the "of course you should do this, > now how do I use it?" point of view. Which still needs to be addressed > I feel. > > > I also think it was a bit early to identify consistent design patterns > > across the implementations and codify those. I expect this to evolve > > convenience macros just like other parts of the driver-core gained > > over time. Now that it is in though, another pass through the > > documentation to pull in more examples seems warranted. > > A real, working, example would be great to have, so that people can know > how to use this. Trying to dig through the sound or IB patches to view > how it is being used is not a trivial thing to do, which is why > reviewing this took so much work. Having a simple example test module, > that creates a number of devices on a bus, ideally tied into the ktest > framework, would be great. I'll attach below a .c file that I used for > some basic local testing to verify some of this working, but it does not > implement a aux bus driver, which needs to be also tested. > There is something I don't get from the documentation and it is what is this introducing that couldn't already be done using platform drivers and platform devices? We already have a bunch of drivers in tree that have to share a state and register other drivers from other subsystems for the same device. How is the auxiliary bus different? -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com