Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2273930pxu; Fri, 18 Dec 2020 09:17:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJyJPVQlJJ90fZEp6kTOtkvUAlhpS0aVkroUzrb577MZ9TdywWwiSm2o+Gbxgowo6i3rRskF X-Received: by 2002:a50:f392:: with SMTP id g18mr5454716edm.306.1608311878992; Fri, 18 Dec 2020 09:17:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608311878; cv=none; d=google.com; s=arc-20160816; b=SIMqQcSWrTUochmsIQbuzL/T8YpCiJhaZ1Q1OYmDMeMOgHLYDZ8N5z6E4mxZ0zwkNj rgcbT+uE3sP4xSr6BOZ0ty/jAMNzRpstueg9c3uneFENnd1lRtyAccPw98EmxqGr4pdn 7F+2RDBYw+brzWaso0deprvlaGUDAJ2Rc9Cb2CWGW6JJL9GpU9XRQkXewjXmjS5qEMjB 0UlmUKPJ9u84VVqet/M3e8WRfVKpGVCgpirsryLn2LmUFZHlq7E11Z8uslGvKu3QUK7T RtxGQv6j8Od/Wv9CVD7VW9V0uiC5nlnmNemVl1lEaP25s8A45+gw1oLQT3BY0XK8sD10 ADGQ== 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=xraou+JMVNQc8du0YHUR54wHjYyugtHF+9URnZQqjS4=; b=UgrBnnxgCRAAecjyvGJGqAkalvd/OvgYgyUl0gmtEX9en+jsmEuvWe/ZoNDhZ3IeBN 1ecljlBsHD/5cbCcU//M0gYJWecw/t+UtJY8l2Q6KuZBzNlq4ieGMc404u8+XBCYz/ML 2H/w+tK8MZa0C+VGovuVQIS6GvVfzO2PPwoHlveooOEg/h56XEkc9ulQxpgEkDjXTbg7 nxn9uvHO++f2sBxkVn6Px+3PPtCPv928jnyKbcKiHoz141g/mss/5O/gllp3W4rjVFCB +KfukdDLTxLPdtYfDXehbzVqzqOBDgZOWbBHgAxLkeUMMDA2B9KqhnTNeLQ2faUBDt9i u64Q== 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 29si6821642edw.398.2020.12.18.09.17.34; Fri, 18 Dec 2020 09:17:58 -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 S1730513AbgLRRQT (ORCPT + 99 others); Fri, 18 Dec 2020 12:16:19 -0500 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:34059 "EHLO relay8-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727787AbgLRRQT (ORCPT ); Fri, 18 Dec 2020 12:16:19 -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 relay8-d.mail.gandi.net (Postfix) with ESMTPSA id 780871BF207; Fri, 18 Dec 2020 17:15:34 +0000 (UTC) Date: Fri, 18 Dec 2020 18:15:34 +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: <20201218171534.GF3143569@piout.net> References: <160695681289.505290.8978295443574440604.stgit@dwillia2-desk3.amr.corp.intel.com> <20201217211937.GA3177478@piout.net> <20201218131709.GA5333@sirena.org.uk> <20201218140854.GW552508@nvidia.com> <20201218155204.GC5333@sirena.org.uk> <20201218162817.GX552508@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201218162817.GX552508@nvidia.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 18/12/2020 12:28:17-0400, Jason Gunthorpe wrote: > On Fri, Dec 18, 2020 at 03:52:04PM +0000, Mark Brown wrote: > > On Fri, Dec 18, 2020 at 10:08:54AM -0400, Jason Gunthorpe wrote: > > > On Fri, Dec 18, 2020 at 01:17:09PM +0000, Mark Brown wrote: > > > > > > As previously discussed this will need the auxilliary bus extending to > > > > support at least interrupts and possibly also general resources. > > > > > I thought the recent LWN article summed it up nicely, auxillary bus is > > > for gluing to subsystems together using a driver specific software API > > > to connect to the HW, MFD is for splitting a physical HW into disjoint > > > regions of HW. > > > > This conflicts with the statements from Greg about not using the > > platform bus for things that aren't memory mapped or "direct firmware", > > a large proportion of MFD subfunctions are neither at least in so far as > > I can understand what direct firmware means. > > I assume MFD will keep existing and it will somehow stop using > platform device for the children it builds. > > That doesn't mean MFD must use aux device, so I don't see what you > mean by conflicts? > > If someone has a PCI device and they want to split it up, they should > choose between aux device and MFD (assuming MFD gets fixed, as Greg > has basically blanket NAK'd adding more of them to MFD as is) > I have an SoC with for example, a designware SPI controller (handled by drivers/spi/spi-dw-mmio.c), a designware I2C controller (handled by drivers/i2c/busses/i2c-designware-platdrv.c). So, those are MMIO and described using device tree. On this particular SoC, I can disable the CPU and connect it to another SoC using PCIe. In that case it will expose one BAR, with all the HW IPs. The question here is why would I use something different from platform devices to register the SPI and I2C controllers? It seems that by using auxiliary devices, I would have to reinvent parsing device property and children/clients description. This isn't great from a code reuse perspective. -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com