From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 65C55C433DB for ; Fri, 8 Jan 2021 15:17:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1498223998 for ; Fri, 8 Jan 2021 15:17:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727566AbhAHPRj (ORCPT ); Fri, 8 Jan 2021 10:17:39 -0500 Received: from mail-40131.protonmail.ch ([185.70.40.131]:27218 "EHLO mail-40131.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726312AbhAHPRi (ORCPT ); Fri, 8 Jan 2021 10:17:38 -0500 Date: Fri, 08 Jan 2021 15:16:48 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1610119016; bh=nTvFORzb1bf2GhxFAnJcMjuDAmjBfj16QbcnGKmQQN8=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=I3etT1bVJJGG6EmNOlOKiyuMd9VujUvYRzGxE60kGx0AXi0dA8XeUIIGWXYLxRAfJ DvU62wDrGEyiH8DuYssDVuJ4t5139c5U3Gbz1gfMg+Jy+qYrh7t4cNju86CvimuKbO 59pR8dRcakP+eFG72Q3elh57SfTrSYFBbiBdvoQ8= To: Mark Brown From: Timon Baetz Cc: Krzysztof Kozlowski , Marek Szyprowski , Liam Girdwood , Rob Herring , MyungJoo Ham , Chanwoo Choi , Lee Jones , Sebastian Reichel , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-pm@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht Reply-To: Timon Baetz Subject: Re: [PATCH v6 2/8] regulator: dt-bindings: Document max8997-pmic nodes Message-ID: <20210108161635.1b9303c8.timon.baetz@protonmail.com> In-Reply-To: <20210106145931.GE4752@sirena.org.uk> References: <20201230205139.1812366-1-timon.baetz@protonmail.com> <20201230205139.1812366-2-timon.baetz@protonmail.com> <20210104135156.GB5645@sirena.org.uk> <20210104181825.GB27043@kozik-lap> <20210104182734.GH5645@sirena.org.uk> <20210104183821.GA29033@kozik-lap> <20210104212449.GJ5645@sirena.org.uk> <20210105165529.GB20401@kozik-lap> <20210106145931.GE4752@sirena.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 6 Jan 2021 14:59:31 +0000, Mark Brown wrote: > On Tue, Jan 05, 2021 at 05:55:29PM +0100, Krzysztof Kozlowski wrote: > > On Mon, Jan 04, 2021 at 09:24:49PM +0000, Mark Brown wrote: =20 >=20 > > > I'm not sure I follow, sorry? Either the core driver can parse the > > > bindings enough to know what children it has or (probably better) it = can > > > instantiate the children unconditionally and then the function driver= s > > > can figure out if they need to do anything. =20 >=20 > > Currently the MFD parent/core driver will instantiate children > > unconditionally. It would have to be adapted. With proposed bindings - > > nothing to change. MFD core already does the thing. =20 >=20 > We're not talking massive amounts of code here, but we are talking ABI > for a DT update. >=20 > > The point is that function drivers should not be even bound, should not > > start to probe. Otherwise if they probe and fail, they will pollute the > > dmesg/probe log with failure. With the failure coming from looking for > > missing of_node or any other condition from parent/core driver. =20 >=20 > There will only be an error message if one is printed, if we can do a > definitive -ENODEV there should be no need to print an error. >=20 > > > > Another point, is that this reflects the real hardware. The same as= we > > > > model entire SoC as multiple children of soc node (with their own > > > > properties), here we represent smaller chip which also has > > > > sub-components. =20 >=20 > > > Components we're calling things like "extcon"... =20 >=20 > > I am rather thinking about charger, but yes, extcon as well. Either you > > have USB socket (and want to use associated logic) or not. =20 >=20 > Right, I'm just saying we don't need to add new device nodes reflecting > implementation details into the DT to do that. I'm not sure I can contribute that much to this discussion (this is my first proper kernel patch, also I don't really understand the argument). FWIW I looked at other MFD devices while implementing this like max77836,= =20 max77693, max77650, max77843 (just to name a few).=20 Assigning of_node to sub-devices using sub-nodes with compatible strings=20 seemed to be a common pattern for MFD devices. Muic needs a node to be used with extcon_get_edev_by_phandle(). Charger needs a node to reference a regulator. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_NONE, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 001C0C433DB for ; Fri, 8 Jan 2021 15:19:15 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9E10C238EC for ; Fri, 8 Jan 2021 15:19:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9E10C238EC Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=protonmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:Reply-To:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-ID: Subject:From:To:Date:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=koiLQTU5D+80kSqPUxHy1tCjHllXxG4CUuCCC8BGixE=; b=oHso/yTQ/TYv0tUXLmp9bDYkw9 g4XBkPYBMB1tuxSf6//MlNb53WUNzgMgp2LeIsuRSNxSvPAZAEpJ0cAN4tHcmE8T4DROqi1+hmNKt prhH3I3RJMl9C97NK1Hfoy6GjxaWVihupP9eHIYIVUZrhTHLxvBVPpo+3V98qkFlwKQ4/Dels8k1M mlmMxWpZdM0UeqJ8+mvgz16OJ+YZrIC0+Pv78AqZrx482go5KIX45rjVvmfOB0JoCTA3CiNEBLCkz 6GGnD0igxgmss4w/uY9FeADUx4rHlITA57E4eTKYZ5n/3t21+5+HFJyeJo19UX42k12d3PWVN4lYc +lEbFK4Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxtW1-0001rI-4i; Fri, 08 Jan 2021 15:17:25 +0000 Received: from mail-40133.protonmail.ch ([185.70.40.133]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxtVc-0001q4-3d for linux-arm-kernel@lists.infradead.org; Fri, 08 Jan 2021 15:17:01 +0000 Date: Fri, 08 Jan 2021 15:16:48 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1610119016; bh=nTvFORzb1bf2GhxFAnJcMjuDAmjBfj16QbcnGKmQQN8=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=I3etT1bVJJGG6EmNOlOKiyuMd9VujUvYRzGxE60kGx0AXi0dA8XeUIIGWXYLxRAfJ DvU62wDrGEyiH8DuYssDVuJ4t5139c5U3Gbz1gfMg+Jy+qYrh7t4cNju86CvimuKbO 59pR8dRcakP+eFG72Q3elh57SfTrSYFBbiBdvoQ8= To: Mark Brown From: Timon Baetz Subject: Re: [PATCH v6 2/8] regulator: dt-bindings: Document max8997-pmic nodes Message-ID: <20210108161635.1b9303c8.timon.baetz@protonmail.com> In-Reply-To: <20210106145931.GE4752@sirena.org.uk> References: <20201230205139.1812366-1-timon.baetz@protonmail.com> <20201230205139.1812366-2-timon.baetz@protonmail.com> <20210104135156.GB5645@sirena.org.uk> <20210104181825.GB27043@kozik-lap> <20210104182734.GH5645@sirena.org.uk> <20210104183821.GA29033@kozik-lap> <20210104212449.GJ5645@sirena.org.uk> <20210105165529.GB20401@kozik-lap> <20210106145931.GE4752@sirena.org.uk> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210108_101700_411993_592A3299 X-CRM114-Status: GOOD ( 21.71 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Timon Baetz Cc: devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Liam Girdwood , Rob Herring , Sebastian Reichel , Chanwoo Choi , MyungJoo Ham , Krzysztof Kozlowski , Lee Jones , linux-arm-kernel@lists.infradead.org, Marek Szyprowski Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, 6 Jan 2021 14:59:31 +0000, Mark Brown wrote: > On Tue, Jan 05, 2021 at 05:55:29PM +0100, Krzysztof Kozlowski wrote: > > On Mon, Jan 04, 2021 at 09:24:49PM +0000, Mark Brown wrote: > > > > I'm not sure I follow, sorry? Either the core driver can parse the > > > bindings enough to know what children it has or (probably better) it can > > > instantiate the children unconditionally and then the function drivers > > > can figure out if they need to do anything. > > > Currently the MFD parent/core driver will instantiate children > > unconditionally. It would have to be adapted. With proposed bindings - > > nothing to change. MFD core already does the thing. > > We're not talking massive amounts of code here, but we are talking ABI > for a DT update. > > > The point is that function drivers should not be even bound, should not > > start to probe. Otherwise if they probe and fail, they will pollute the > > dmesg/probe log with failure. With the failure coming from looking for > > missing of_node or any other condition from parent/core driver. > > There will only be an error message if one is printed, if we can do a > definitive -ENODEV there should be no need to print an error. > > > > > Another point, is that this reflects the real hardware. The same as we > > > > model entire SoC as multiple children of soc node (with their own > > > > properties), here we represent smaller chip which also has > > > > sub-components. > > > > Components we're calling things like "extcon"... > > > I am rather thinking about charger, but yes, extcon as well. Either you > > have USB socket (and want to use associated logic) or not. > > Right, I'm just saying we don't need to add new device nodes reflecting > implementation details into the DT to do that. I'm not sure I can contribute that much to this discussion (this is my first proper kernel patch, also I don't really understand the argument). FWIW I looked at other MFD devices while implementing this like max77836, max77693, max77650, max77843 (just to name a few). Assigning of_node to sub-devices using sub-nodes with compatible strings seemed to be a common pattern for MFD devices. Muic needs a node to be used with extcon_get_edev_by_phandle(). Charger needs a node to reference a regulator. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel