Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2421698pxu; Fri, 18 Dec 2020 12:53:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJwvya5LZl9rDA2avXG1qb6+cgMLL5BcQfE11+aJ1nCCVfoAYYLrQytkyojPQceq8KESzGYn X-Received: by 2002:aa7:c919:: with SMTP id b25mr6139347edt.108.1608324793473; Fri, 18 Dec 2020 12:53:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608324793; cv=none; d=google.com; s=arc-20160816; b=u4YhIDQBjtA8b+7P0rCtSOmtKYu4b6DO6ievncaWmeULAfLOjWSc8WX97kTwBnLXs0 QazNhobW/e/VmOy8ipyT9E6RGq6Totlvntp/IpufJ4R7os9NfmcPAEpc+WPEn1pSoDRN cT2Wb/8OHWdnksOpp0HJLVjLoKdouyrm7y8ZnExMvglnKgKpgkJHAUB+rrNhwaTXEEUt x5XoFLc5p6CWvW9JSMdnjJ4qv5GDqz3Cz2GjF+4wm0Ikx3/IMpQRM8AmWvUQ6LiEjTtQ LwFRCP6HMct3M9lgykUBNshdJgo+9u1rx3G1k0zGjcAXdpy9iHXP/N8Xr14sJK6h1Vod jyyQ== 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:dkim-signature; bh=+6dOcXCZmIRThv69enwRAoT3Ssvc0OhfvILN9vdlg4o=; b=TxwFUQVHobZH9lK57Jc/f480ZU57AOhGKM6aTdSR6toNBMZyU+P+S/9ZkrZDlKWAKp /2ijQgRAkrkY8Bu4IUb4SrN/RP+d2DkJGxtF0VGhvLY3TEaEqLNocFd+1miU+WRl42/y GEcXxalHPOge0LzRZnPV4dKyajq0XYjUIj1LZ7fhzWJZireg06RUsfdTsaJafHDUrQBN lFQqQi5zX5yrjH2v302C8VIIz4Wo4lcu/G+v96me5y9Bu6JzL+uUa/QErRV9pwA+Qtma ydlGPGb4w0Qxi4EgHxligP5hVZzhO7IkDiqKyUbOw4L8KHNNsfT8yS4lyA4/nKPhglYZ zVeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=jHvWhOqW; 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 g4si6913899edu.577.2020.12.18.12.52.51; Fri, 18 Dec 2020 12:53:13 -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; dkim=pass header.i=@ziepe.ca header.s=google header.b=jHvWhOqW; 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 S2387430AbgLRUOw (ORCPT + 99 others); Fri, 18 Dec 2020 15:14:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727626AbgLRUOv (ORCPT ); Fri, 18 Dec 2020 15:14:51 -0500 Received: from mail-qv1-xf2e.google.com (mail-qv1-xf2e.google.com [IPv6:2607:f8b0:4864:20::f2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88420C06138C for ; Fri, 18 Dec 2020 12:14:11 -0800 (PST) Received: by mail-qv1-xf2e.google.com with SMTP id bd6so1496882qvb.9 for ; Fri, 18 Dec 2020 12:14:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=+6dOcXCZmIRThv69enwRAoT3Ssvc0OhfvILN9vdlg4o=; b=jHvWhOqW9gjdg6bCt0oq8HPNAPiqjsnvVkc2ZUdCGpEZNIdSLT+GDPCECJElwUYAxA Y1pIExXfv/DBr7VTF+bFuxD1/qc48sp4jjZGVoGH32YbTQAwsodVlyqEal+TFhSvUReR bQH7LL5BN51mLTZ7XWLywXYOanGqutzAK76tB+8PuUq+RbgeAnOhwHP+K4O7eHiCyJ6Z PbkZyuovTuop9ttweKxiab8tuHcdQfnii8DrxMLWuGsSk2o7ieWZHMk1nqidqmHDP5kd mRvodxQKAx0bRwGOtG28y4RrryymGsGvvkNhr00Frg6N6/bpTYHvKS3sn6joFWSellTo IV4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=+6dOcXCZmIRThv69enwRAoT3Ssvc0OhfvILN9vdlg4o=; b=tK35RzgM++eE/J9OECWFtB/j+761Rvz42Xsu7ERHV7q6vEh6xDfYMdFDxcqar0qNF2 fen6vvWEB2RW6+d5qmpU16p+zotExA67gn4JdWOR/IudrJsZunk3HooyDvMTnSwuIyFN 9BytNONQAOsX2Egi5I6YKH6S/kBpnlJiXABTlEDujvTWJENCx3vxwvNi8PwCv/kTJD14 eQX0Pnq6nLKmGR//ojfYdhEbZKBIu2c3ADSJxQOsudPwJ2CMrbxCwaSGt8bGTW1pd9am aTof8fPtIrjhTwh2kAFZHsF+DvrfqxUIlR0eEGolDaFdSIGsGilwySN5wnNHEcAdSIvX iW0g== X-Gm-Message-State: AOAM530l8Dxn62SvSpiDWO8z5eP1BkZ1iAXV2ZdfmNfhm8PAAaRY+pqy ksQy7VKyTEPENxjoA1OZLPqOgw== X-Received: by 2002:a05:6214:15c1:: with SMTP id p1mr6432035qvz.8.1608322450319; Fri, 18 Dec 2020 12:14:10 -0800 (PST) Received: from ziepe.ca (hlfxns017vw-142-162-115-133.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.162.115.133]) by smtp.gmail.com with ESMTPSA id p15sm6479556qke.11.2020.12.18.12.14.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Dec 2020 12:14:09 -0800 (PST) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1kqM8e-00CtcB-SK; Fri, 18 Dec 2020 16:14:08 -0400 Date: Fri, 18 Dec 2020 16:14:08 -0400 From: Jason Gunthorpe To: Lee Jones Cc: Mark Brown , Greg KH , Alexandre Belloni , 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 Subject: Re: [resend/standalone PATCH v4] Add auxiliary bus support Message-ID: <20201218201408.GP5487@ziepe.ca> 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> <20201218190911.GT207743@dell> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201218190911.GT207743@dell> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 18, 2020 at 07:09:11PM +0000, Lee Jones wrote: > ACPI, DT and MFD are not busses. And yet ACPI and PNP have a bus: extern struct bus_type acpi_bus_type; extern struct bus_type pnp_bus_type; Why? Because in the driver core if you subclass struct device and want to bind drivers, as both PNP and ACPI do, you must place those devices on a bus with a bus_type matching the device type. Thus subclassing the device means subclassing the bus as well. The purpose of the bus_type is to match drivers to devices and provide methods to the driver core. The bus_type also defines the unique name space of the device names. It is confusing because the word bus immediately makes people think of physical objects like I2C, PCI, etc, but that is not what bus_type does in the object model of the driver core, IMHO. So, if you subclass struct device for MFD's usage, then you must also create a bus_type to handle driver binding. The MFD bus_type. Just like auxillary does. Making a mfd subclass is the logical thing for a subsystem to do, co-opting another subsystem's bus_type is just really weird/abusive. auxillary bus shows how all these parts work, and it is simple enough to see the pieces clearly. Jason