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=-4.0 required=3.0 tests=BAYES_00,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 0E1A7C433E6 for ; Tue, 5 Jan 2021 16:56:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CF7B122CF6 for ; Tue, 5 Jan 2021 16:56:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729647AbhAEQ4P (ORCPT ); Tue, 5 Jan 2021 11:56:15 -0500 Received: from mail-wr1-f45.google.com ([209.85.221.45]:46150 "EHLO mail-wr1-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729334AbhAEQ4O (ORCPT ); Tue, 5 Jan 2021 11:56:14 -0500 Received: by mail-wr1-f45.google.com with SMTP id d13so36811715wrc.13; Tue, 05 Jan 2021 08:55:58 -0800 (PST) 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=3lly2danYiTb182H8D8avthszPR0+tG65HNd1JQEsbI=; b=HCkl2FtFY5FNxod7qZtBctkCHsuOzup68d7IP2GeF6z9dd+p5B2gmS978t4vzAGdIF wDRoD1bZ0N5aUyl4SvgbjRIRreTxXj3kWZ06RZtvIR9Ce5ZA9cID5Ol+YTjKFD8aS7Ah sPz2WPkqUDrLS+VItLsMWorYVw7h/dD543rk4hfdGLPvU9u7JsnfcU+UNi3o3ED7MRzo hCD6lBZhA6M5DadzoVEdTA5XsFtZuniO/ltffwfC4sj3FxgwfTA5nWHHtu2UN23fYIHP GJ9ccU2wsszmmcPQ8rQwSAUoAdYGRKsP8vBXGtpbAyAPl6GVbQ2YCY5TFLry43C+OJ+c xTMg== X-Gm-Message-State: AOAM530BA+GYe+vJYSXYO6sFmnVkKIn1en5V5dwjeKJqa45Zucax/snP +iS23rTZBxJ9GV/WYUhiGlc= X-Google-Smtp-Source: ABdhPJzX4fvNgU7hZQaXgWYzHyNSexu7jTttqQRxXT2CO39QS18z96tCMzayhO0xxYI//56QjYAo1A== X-Received: by 2002:adf:ec8c:: with SMTP id z12mr500791wrn.208.1609865732300; Tue, 05 Jan 2021 08:55:32 -0800 (PST) Received: from kozik-lap (adsl-84-226-167-205.adslplus.ch. [84.226.167.205]) by smtp.googlemail.com with ESMTPSA id o125sm118260wmo.30.2021.01.05.08.55.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Jan 2021 08:55:31 -0800 (PST) Date: Tue, 5 Jan 2021 17:55:29 +0100 From: Krzysztof Kozlowski To: Mark Brown Cc: Timon Baetz , 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 Subject: Re: [PATCH v6 2/8] regulator: dt-bindings: Document max8997-pmic nodes Message-ID: <20210105165529.GB20401@kozik-lap> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210104212449.GJ5645@sirena.org.uk> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 04, 2021 at 09:24:49PM +0000, Mark Brown wrote: > On Mon, Jan 04, 2021 at 07:38:21PM +0100, Krzysztof Kozlowski wrote: > > On Mon, Jan 04, 2021 at 06:27:34PM +0000, Mark Brown wrote: > > > > We can indicate the presence of features without adding new compatible > > > strings, that's just encoding the way Linux currently divides things up > > > into the bindings. For example having an extcon property seems like it > > > should be enough to figure out if we're using extcon. > > > It won't be enough because MFD will create device for extcon and bind > > the driver. The same for the charger. We have a board where max8997 is > > used only as PMIC (providing regulators) without battery and USB > > connectivity. > > 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. 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. > > 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. Best regards, Krzysztof 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=-4.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,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 429D5C433E6 for ; Tue, 5 Jan 2021 16:57:30 +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 E900D22CB9 for ; Tue, 5 Jan 2021 16:57:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E900D22CB9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=CBDQsl0yceJ6W4hBw9itm+AgMtQcnVTAWkI/MkxWP+0=; b=fwKE8daMhM2NxPf927PkI/ab6 0WmeMfJJxdVv99mY7lw1pUSR60MDP+YB5d4nLFLHZ1d7SNlwuhQI+CSl2bjpH+nI4Wleu8+SgrWi6 xTK2KPEIPuSjYvpPQfnVMIbrzy03jIBeIbqpDDZDAMZiUHX6pgroa+g56gsXtUb3Wfs9wF5Ix+p/P tX9H8PsuH30BqhMZe0B4trnf1/unUy0Op2d2zIsXtz/vur4wXWeq/eLPcImSIJAcuM5bMA/8kAuOE P9I/14eDLg59F8mjbc1B+jXbx38IzXkYPhp5VkWxsfkrYBbN2YBuK2PRpgZxD11WDqSDEIIav8dt1 k6HyhtsDw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kwpcP-0007Zf-2h; Tue, 05 Jan 2021 16:55:37 +0000 Received: from mail-wr1-f46.google.com ([209.85.221.46]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kwpcN-0007WX-2o for linux-arm-kernel@lists.infradead.org; Tue, 05 Jan 2021 16:55:35 +0000 Received: by mail-wr1-f46.google.com with SMTP id d26so36786633wrb.12 for ; Tue, 05 Jan 2021 08:55:33 -0800 (PST) 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=3lly2danYiTb182H8D8avthszPR0+tG65HNd1JQEsbI=; b=swSHE7JHZ/jxotYOB6HLDUnR/PfhM5ioVrIJpH/FIMgm/sg/cpcF+mAC7H5w2gLBQd z+ZzhxvNd9yN2G2613ERirwHt8CexzqbGkxu82m226RZpq0g+vNu39/BFUc21Y7iztzK hG+inw8cr0YHjq7K+jdnNiRBeuJYMp65KkkP3jzppcHUq2SVb7lIutDAewRpq4R1Wa3r 3H5nyfebsjkjq9RrE4wDyuQZo+GDCT7JQHSvZu3poeSRx7TH/OWVU+w3gp0e6RmYLJBm OeSVQhws5oppz5RZbIEtrzb26NbHOs16C9ZF6znR+DhSJ5clAAgh1ITNakEqo3ixYgWL yBUA== X-Gm-Message-State: AOAM530DgaR4Z1B+qdpFLDwVSj75i/eRg/peI3FJf/dkynwkV75cAMy1 FrKkM37900RGY3eGOa6sDKc= X-Google-Smtp-Source: ABdhPJzX4fvNgU7hZQaXgWYzHyNSexu7jTttqQRxXT2CO39QS18z96tCMzayhO0xxYI//56QjYAo1A== X-Received: by 2002:adf:ec8c:: with SMTP id z12mr500791wrn.208.1609865732300; Tue, 05 Jan 2021 08:55:32 -0800 (PST) Received: from kozik-lap (adsl-84-226-167-205.adslplus.ch. [84.226.167.205]) by smtp.googlemail.com with ESMTPSA id o125sm118260wmo.30.2021.01.05.08.55.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Jan 2021 08:55:31 -0800 (PST) Date: Tue, 5 Jan 2021 17:55:29 +0100 From: Krzysztof Kozlowski To: Mark Brown Subject: Re: [PATCH v6 2/8] regulator: dt-bindings: Document max8997-pmic nodes Message-ID: <20210105165529.GB20401@kozik-lap> 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> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210104212449.GJ5645@sirena.org.uk> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210105_115535_160058_CD9765FF X-CRM114-Status: GOOD ( 21.18 ) 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: , Cc: devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Liam Girdwood , Rob Herring , Timon Baetz , Chanwoo Choi , MyungJoo Ham , ~postmarketos/upstreaming@lists.sr.ht, Sebastian Reichel , 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 Mon, Jan 04, 2021 at 09:24:49PM +0000, Mark Brown wrote: > On Mon, Jan 04, 2021 at 07:38:21PM +0100, Krzysztof Kozlowski wrote: > > On Mon, Jan 04, 2021 at 06:27:34PM +0000, Mark Brown wrote: > > > > We can indicate the presence of features without adding new compatible > > > strings, that's just encoding the way Linux currently divides things up > > > into the bindings. For example having an extcon property seems like it > > > should be enough to figure out if we're using extcon. > > > It won't be enough because MFD will create device for extcon and bind > > the driver. The same for the charger. We have a board where max8997 is > > used only as PMIC (providing regulators) without battery and USB > > connectivity. > > 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. 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. > > 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. Best regards, Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel