Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2437590pxu; Fri, 18 Dec 2020 13:18:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJwH04f3/iByX5JGx7imYksYQndL9+rwl2hJPDHr30gUXywSqdjCnv7+mu5kKFgfEMa9gzpm X-Received: by 2002:aa7:c84c:: with SMTP id g12mr6176675edt.193.1608326312407; Fri, 18 Dec 2020 13:18:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608326312; cv=none; d=google.com; s=arc-20160816; b=OjWdVx0xxbjPIZkejiVsjCt1CXWmc1bOfFu4NgR/GNOWPAr6n7RRAPMk+M4Pa//eIv JkI+cT8rcizWczUbVxmj0ET8G1qP425IEQ9oXwH+OP6HddLHilq/gXQBbahmnZWE3CY6 8WcOxMjqvFmQw085Z39TyKDaPZ2ZXdw6j3HjcWEAbJCjIj/jQB7b4lcD+xF+o2WL4zCk K0hL1pn+1PSpJ6aKRL6V0NgX32O1q3neuQd+x3MTfF9VqsN0VaE1wmFhmdmtulfdDxgH 8wbjB/erc74RQXikrmVClDq9+xKqe2ePLAYMw262A1MEf91IFRaVzcDeH+V3siIItKkh Ep1w== 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=0j+vwsuzKNXEa01PseOIjoWI3rKNwtiun7yw8HzLCwE=; b=ZcN/TCTScFJKmykT374WpSn3C6bzZbiEyspwzRWSm0GvGhtbRjixTgR9xo/uOuadoh N+MGnetWcHMdd+BH0SYkm9Eg5WftE0p0bzLskykdrs1O/7SEh6HJPYn++BN/sLHY4d/s 3R1yoqdj7Uj9rwjxWR84Ddosv6M2sqXmSwk3jTBk5q5HLUZKr1ZD/VxS5fmAgVwvQY8k b/aJoEQXtCqHneLAOVbV5riDII82QDmoy6XI2v2Ja10vr/GeJV4Mj5wCocClnDcVhSXP Dywk/A8R2g2cx9uuoXB9EutumFN/RVkhJWibNbdAv5EFvX1244l1POyki7xaeQMrf1bi aL7Q== 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 t1si3775249ejc.524.2020.12.18.13.18.09; Fri, 18 Dec 2020 13:18:32 -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 S1726497AbgLRVRo (ORCPT + 99 others); Fri, 18 Dec 2020 16:17:44 -0500 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:47981 "EHLO relay3-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725843AbgLRVRo (ORCPT ); Fri, 18 Dec 2020 16:17:44 -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 relay3-d.mail.gandi.net (Postfix) with ESMTPSA id EF20A60003; Fri, 18 Dec 2020 21:16:58 +0000 (UTC) Date: Fri, 18 Dec 2020 22:16:58 +0100 From: Alexandre Belloni To: Jason Gunthorpe Cc: Mark Brown , Greg KH , Dan Williams , Pierre-Louis Bossart , alsa-devel@alsa-project.org, Kiran Patil , linux-rdma , Shiraz Saleem , Martin Habets , Liam Girdwood , Ranjani Sridharan , Fred Oh , Dave Ertman , Jakub Kicinski , Netdev , Leon Romanovsky , David Miller , Linux Kernel Mailing List , Parav Pandit , lee.jones@linaro.org Subject: Re: [resend/standalone PATCH v4] Add auxiliary bus support Message-ID: <20201218211658.GH3143569@piout.net> References: <20201217211937.GA3177478@piout.net> <20201218131709.GA5333@sirena.org.uk> <20201218140854.GW552508@nvidia.com> <20201218155204.GC5333@sirena.org.uk> <20201218162817.GX552508@nvidia.com> <20201218180310.GD5333@sirena.org.uk> <20201218184150.GY552508@nvidia.com> <20201218203211.GE5333@sirena.org.uk> <20201218205856.GZ552508@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201218205856.GZ552508@nvidia.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 18/12/2020 16:58:56-0400, Jason Gunthorpe wrote: > On Fri, Dec 18, 2020 at 08:32:11PM +0000, Mark Brown wrote: > > > > So, I strongly suspect, MFD should create mfd devices on a MFD bus > > > type. > > > > Historically people did try to create custom bus types, as I have > > pointed out before there was then pushback that these were duplicating > > the platform bus so everything uses platform bus. > > Yes, I vaugely remember.. > > I don't know what to say, it seems Greg doesn't share this view of > platform devices as a universal device. > > Reading between the lines, I suppose things would have been happier > with some kind of inheritance scheme where platform device remained as > only instantiated directly in board files, while drivers could bind to > OF/DT/ACPI/FPGA/etc device instantiations with minimal duplication & > boilerplate. > > And maybe that is exactly what we have today with platform devices, > though the name is now unfortunate. > > > I can't tell the difference between what it's doing and what SOF is > > doing, the code I've seen is just looking at the system it's running > > on and registering a fixed set of client devices. It looks slightly > > different because it's registering a device at a time with some wrapper > > functions involved but that's what the code actually does. > > SOF's aux bus usage in general seems weird to me, but if you think > it fits the mfd scheme of primarily describing HW to partition vs > describing a SW API then maybe it should use mfd. > > The only problem with mfd as far as SOF is concerned was Greg was not > happy when he saw PCI stuff in the MFD subsystem. > But then again, what about non-enumerable devices on the PCI device? I feel this would exactly fit MFD. This is a collection of IPs that exist as standalone but in this case are grouped in a single device. Note that I then have another issue because the kernel doesn't support irq controllers on PCI and this is exactly what my SoC has. But for now, I can just duplicate the irqchip driver in the MFD driver. > This whole thing started when Intel first proposed to directly create > platform_device's in their ethernet driver and Greg had a quite strong > NAK to that. Let me point to drivers/net/ethernet/cadence/macb_pci.c which is a fairly recent example. It does exactly that and I'm not sure you could do it otherwise while still not having to duplicate most of macb_probe. -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com