Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2536879pxu; Fri, 18 Dec 2020 16:24:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJxWaP5AKNWVTdhPI3Ck8espj561UctKSKYj1SjvcfS5Cx1IZWVgH4YVk431Ew/teW2fU+qw X-Received: by 2002:a17:906:a04e:: with SMTP id bg14mr6317222ejb.149.1608337476154; Fri, 18 Dec 2020 16:24:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608337476; cv=none; d=google.com; s=arc-20160816; b=roFv4UyANNB0/XA8SyLAyiAz7tz0/QMUys4rHyetp7ZMFNvUWhOxYRheuGUEGwQu2o W3OAK0lo4L/6tR8nQ/vn9ADVTWUgIlkkf+NRy+oR7JoVlFCEzw/IdMV4pI18hN/+VLpV BFs3L1QTb1dOi6qE3uPI3j7fQA1XmPYdrSe2vOiAoa2X0B0sJ1YwGIFstC4dXhHi2IYo okrxUlz/X6Q9NtSm5/pBl2MCn+Ku6VNXSlfjYNBZiUcKtShILFY6wq2Uzc0HfHKrVQqb fKKcKLVHYFZCJY+6q5s0Ei6SzVaTnMjfiNdxuX0KY84Y5gDDMYFuktLLImnRuztXP2xq 6cxQ== 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=C+vbf/B3uCvqmJubpVo6ye3WyCSDNzZD5y2QlJY9OVM=; b=LbKGiayQ2YU+p7ZG/yMynQF10/zDDwUI/1Xdl9Eep4jkWCYmlHjjmGO11rRAqctU1e EH4J23l/Iw3eeT7f6ttDrWuG+ywiffCL2PzVhE2UgWgt+kthOt95wY2o9bDJh4F3jYF3 eBZd9NJ9wCFQ4HGguRHu7iSMP9u2mINvR+1PMeY1bKxyBlOCni2kxh9vGTj6XBL+fjh/ P7z5KA7m6zJjCc7xi3ihRJrbz8sb8+0Bzqyn3/bbfVWK9FUaUdYuK3P+360IGh7zH8RM 0tg8W38/kZhqEGz2gv/teZIwQEQhMhzMDzHoKPM+EQ8efVy7s2gXGo72xsnsjyDffxL2 uoaA== 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 w4si4008820eju.637.2020.12.18.16.24.14; Fri, 18 Dec 2020 16:24:36 -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 S1726321AbgLSAWx (ORCPT + 99 others); Fri, 18 Dec 2020 19:22:53 -0500 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:51157 "EHLO relay4-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725925AbgLSAWx (ORCPT ); Fri, 18 Dec 2020 19:22:53 -0500 X-Greylist: delayed 97350 seconds by postgrey-1.27 at vger.kernel.org; Fri, 18 Dec 2020 19:22:52 EST 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 73881E0002; Sat, 19 Dec 2020 00:22:08 +0000 (UTC) Date: Sat, 19 Dec 2020 01:22:08 +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: <20201219002208.GI3143569@piout.net> References: <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> <20201218211658.GH3143569@piout.net> <20201218233608.GA552508@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201218233608.GA552508@nvidia.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 18/12/2020 19:36:08-0400, Jason Gunthorpe wrote: > On Fri, Dec 18, 2020 at 10:16:58PM +0100, Alexandre Belloni wrote: > > > 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. > > So, if mfd had a mfd_device and a mfd bus_type then drivers would need > to have both a mfd_driver and a platform_driver to bind. Look at > something like drivers/char/tpm/tpm_tis.c to see how a multi-probe > driver is structured > > See Mark's remarks about the old of_platform_device, to explain why we > don't have a 'dt_device' today > So, what would that mfd_driver have that the platform_driver doesn't already provide? > > 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. > > I think Thomas fixed that recently on x86 at least.. > > Having to put dummy irq chip drivers in MFD anything sounds scary :| > This isn't a dummy driver it is a real irqchip, what issue is there to register an irqchip from MFD ? > > 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. > > Creating a platform_device to avoid restructuring the driver's probe > and device logic to be generic is a *really* horrible reason to use a > platform device. > Definitively but it made it in and seemed reasonable at the time it seems. I stumbled upon that a while ago because I wanted to remove platform_data support from the macb driver and this is the last user. I never got the time to tackle that. -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com