Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3157113pxv; Mon, 12 Jul 2021 10:35:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/tke0xQO3TQW7OpAMR6pQ0wmiKuJ/l2vn8TdFX+mA1P0BbUid9BHUYYTJOp/E4geqp3fI X-Received: by 2002:a05:6402:1c19:: with SMTP id ck25mr4174524edb.128.1626111354017; Mon, 12 Jul 2021 10:35:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626111354; cv=none; d=google.com; s=arc-20160816; b=eaP5HfAEixOnE5qnFSN1NfLT0viP7q4IFJUGrST8OoLlbR73QaOvxyN/Xrlw/ZNc71 xtJG05NFnTgd/1Ul3hlz8LDtv/Gjr2RBiGgHP5AOgkfoUojbMdBuyiUfZ9vUOx46hrL4 RsRxQm+QQXJf+ihN9ebr7FW+38inecdJ+XiIJgr07zOafFbaNbMJIpXrHTYTz1e+wowE JKSsKkCjnj6Lr/cv06RTly2cpRNG7+LxXAO+kqb/xHkm2WuzXYMOHqnzRGs2yrtbAQIT 88qu8pS6syPHpnC5cgf1q7TYuAr1uFZ8tvWOu+OCHF1MhKsx6+woIGijSMtCA8ur245Q I3Aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=fZNUtmedt4RFV/3R7tXw9HzcDo0NIT94mwmKIhQyjzU=; b=m5QYsG4AEaeyMJe/8BVv4ttzRrzWIkty1YhbXsyca2sCkJ32EZmrDIT/oQXnnvqhfy nPafXZOeL1xBLk22iuRqkKod7yu6vA0mxAFzilLr2trl6p1wEUyv+RQBwvVwll0Bcx2H sv4vHEs/dC5HkK96K0Ib0xoCXYyZ7Ki8Lt4+6Dkv/nLcRPW7rbOzQZ/e3yBJNTPUoM8b qZ1PWVusEPm1wXBx65AKa20N5iROX6en+8QK36BC9cWYGRaQZ5B2/o2GnZfRB9a8cPkg uPftnoGpY3ofMkxxEhefPRPTaf6ywbNiUfRBDWBnUV7k3zK3UeIGbpRcL7alYfJ0FIDk Pssw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="gU5DP/H6"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j23si21402537eje.21.2021.07.12.10.35.29; Mon, 12 Jul 2021 10:35:54 -0700 (PDT) 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=@kernel.org header.s=k20201202 header.b="gU5DP/H6"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235729AbhGLRfc (ORCPT + 99 others); Mon, 12 Jul 2021 13:35:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:60768 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235721AbhGLRfb (ORCPT ); Mon, 12 Jul 2021 13:35:31 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 78517606A5; Mon, 12 Jul 2021 17:32:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626111163; bh=VtGEF+ZZROmXiAjI6Vgr8SHZ3R5D6D8GlzKCE5P9jNo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gU5DP/H6vV/hR98Y71TuN3Sf5Lc4/CFIim5CLt2kqn/gVAuVkJdTi80w56phLHXi/ vvoht6AyduTE13L4uvzrEdGc5O9JnnTltLyOC7wj9xsKDbBWNzqseHNN1fNbP+31Ax hoh92BovgXHy9AvlleHw9KXX5tkru6ekx8W4MRomclMoqLyRXPfUP7EP391yHjVWaw 43uOhGIHZqOGz9+4ORtbP1oJRPHKhMlzTrSHjTBqMZkR3xkE4EVbByWv2ADzhCtOOd hbUN6Vx+hj6l66SNffZxot+EOJU9L0JoTUKZKzNao2SaFNpvFuEjjo5gJQYIt5gUlN U+JcXeqWryCWg== Date: Mon, 12 Jul 2021 18:32:06 +0100 From: Mark Brown To: Laurent Pinchart Cc: Daniel Scally , linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org, hdegoede@redhat.com, mgross@linux.intel.com, luzmaximilian@gmail.com, lgirdwood@gmail.com, andy.shevchenko@gmail.com, kieran.bingham@ideasonboard.com Subject: Re: [RFC PATCH 0/2] Add software node support to regulator framework Message-ID: <20210712173206.GH4435@sirena.org.uk> References: <20210708224226.457224-1-djrscally@gmail.com> <20210709170426.GC4112@sirena.org.uk> <20210712141528.GE4435@sirena.org.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Uu2n37VG4rOBDVuR" Content-Disposition: inline In-Reply-To: X-Cookie: Hailing frequencies open, Captain. User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Uu2n37VG4rOBDVuR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jul 12, 2021 at 07:55:21PM +0300, Laurent Pinchart wrote: > On Mon, Jul 12, 2021 at 03:15:28PM +0100, Mark Brown wrote: > > Like I said elsewhere it seems a lot easier to just have the I2C driver > > set platform data based on parsing DMI information like we do elsewhere. > > I really don't see any benefit to introducing an additional layer of > > abstraction and binding here, it just seems to be making things more > > fragile. > The idea behind software nodes is that individual device drivers > shouldn't care about where platform-specific data come from. They can > use the same fwnode API, regardless of whether the device is described > through OF, ACPI, or software nodes created by a board file in the That's much more fwnode than swnode. fwnode is a cute hack for letting ACPI based systems that don't fit the ACPI model reuse DT bindings which can work well for some things which are just outside the scope of ACPI completely but is a really bad idea for things where there's specific firmware modelling for the thing being handled, in those cases it should be avoided and firmware specific handling used instead. Power handling (including regulators) is one of those areas - ACPI has really strong opinions on how it should be done and we don't want to be encouraging systems to go against that model. AFAICT swnode is mostly just a way of patching up firmware that could be getting away with fwnode but didn't for some reason, in this case we don't want to ever see ACPI systems trying to use the DT regulator bindings in their firmware descriptions. > kernel. It allows grouping all platform data that should be provided by > firmware in a single place, conditioned by a DMI match, instead of > distributing DMI matches to lots of drivers. Like I said in reply to Andy's mail if we're essentially filling in a C struct through a massive pile of indirection involving writing C code containing a bunch of static initialisations of less specific structs that doesn't seem great. We can probably arrange to pass the init_data =66rom different files rather than putting the quirks in the driver, that'd be fine if a bit more work, but swnodes only seem to be adding problems here. --Uu2n37VG4rOBDVuR Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmDsfJUACgkQJNaLcl1U h9Abjgf/Vk3i0rqEkOhCAV+ivVYXecph/yluBT06Xil1LFQhiK9prVwCfZJ93k0S D6dkPcnM1RZKmFQq3uRBfDY/5SNQlka3uoCrZqJuNhMnphjOviUgOp6HxTXVnalQ Fsx3Pp/khYOcwjmt7Me3i8xKcIrvphG2FddKYqGTrH3R5MuDDVRvFmtF9Ay74BMG 6+g2XUmTLF8G4MhVMHH3SS9U0bzkbhNaFzFrShf/aVtjgZVo5RL858KqsQZ2PSr7 H4h7d0nJxvjqMQUo0pkH5VB+tiX+tUvo52nnAIYpo3gi1abz6IpuhXIAfY0vNoCD WTNUTLOqkY4/N7AOKj8dvfFlOft15Q== =BBO2 -----END PGP SIGNATURE----- --Uu2n37VG4rOBDVuR--