Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp14021840pxu; Mon, 4 Jan 2021 10:41:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJymPXANG9+UGJ7bvygno/jyipC11VV0aEjygpZh6wlppHxgqDSrTwbWOgGwfTUtpPvNvP2e X-Received: by 2002:a17:906:d9c7:: with SMTP id qk7mr67283096ejb.384.1609785676256; Mon, 04 Jan 2021 10:41:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609785676; cv=none; d=google.com; s=arc-20160816; b=Q0w4bIz5qnyKaVTDrs9f2DoSGjlcolVnCBqMCOnzMmYLMf/0tLFuywbCwLO4Pk5Wlw wGw/MFkldFipYzppPExrYdkDFTeSBRF/U/cV/T6Xla756k5R35BuHb/v+vrWjZ58X2TN m4qDBcxUK6smppwyard6oNad1q1cZNQNppnMXyeKSpPSN1hBqSLEJvXd201ytDPDMAni dgiI8qYz4IZGIuQvBhsqFYIy6Cu/mjSgzSLDDwkc9BNrBEf8A7feHkR7N3wIRwDqd3T1 jhGqmmB27xKhIeLz4BoanxFkuuEwTTueSxWLOWKSpqP5AW8bv/7wzkfH671K0wmjGkcY 1abQ== 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=C4a7e9iYEX7onVSgyKRCPpx3nNaq3txIA6JWld1n9j0=; b=TnppSFtiVmVO6R+qp+vBhM8Hfzf556iSVMl7XFfvZH1Rvjv6xou3WQ7P586Az/L2SK ZkME5jPkw+xkrtJhMCW1/YB9zY3BeUVHi4lMgLiBH+/A33OH6cKjYSguKa4FJNU8dlta lS+ue9jGXFWo+ImicngB6xm5BAKGR/U+5lrV4FR4/ZCW3Zy8sIk9em+U6yPWOGTyDpTr karucCPUJxu18qDUCRy5O6kkCIC6JU29PRNREzV0Frfv2i82K/9OKbHpGpXA1qLp6F5L SHnwBTeC73euhZCB0gQ3yiERlkEBJNrl3SbqVpva1aOsyATa8PSpyHC3aFFkUuu+TNJb mbLA== 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; 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 q22si31120253edr.578.2021.01.04.10.40.53; Mon, 04 Jan 2021 10:41:16 -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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726602AbhADSjG (ORCPT + 99 others); Mon, 4 Jan 2021 13:39:06 -0500 Received: from mail-wm1-f50.google.com ([209.85.128.50]:51683 "EHLO mail-wm1-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726168AbhADSjG (ORCPT ); Mon, 4 Jan 2021 13:39:06 -0500 Received: by mail-wm1-f50.google.com with SMTP id v14so183768wml.1; Mon, 04 Jan 2021 10:38:49 -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=C4a7e9iYEX7onVSgyKRCPpx3nNaq3txIA6JWld1n9j0=; b=eyyMcAPwsTmWf8+t+qq/e7sKhnU3+foQwTOdhyMYW7mjVlUAXAOF2TLqDMdQwGIsgK iH0GDO60Lcq/DThWOEUbt2PP8kbQSakaGE45ebYzA+T76TPOUuBCk7BLODyhdZAoBIS2 ncEPXNMT0TRR1kXxKu/0EP51ttvzHYzcmjzTIdSFWbH0Um2NbTiMLg8Sg7fgbuCfsp0l MkrgIse8hAN6edMsM6mqq6Km38GhawePn5VW4rvWGf3vE32tEgNUergunJQ6JkwSEELU m3e2MtUYp5OFi4fYaV79KfM7QRcWJAI7KM5XeQEX+3zALMq0fEwMOtWYRxriTsuBG35p ClRg== X-Gm-Message-State: AOAM530MUM7e/GVF8R3r3mgvvbYi00jfFT+5CHR13SrPS74hQoxTuPNB MPSS+tnAapsUvSf2+4xkWk0= X-Received: by 2002:a1c:2b46:: with SMTP id r67mr201271wmr.162.1609785503622; Mon, 04 Jan 2021 10:38:23 -0800 (PST) Received: from kozik-lap (adsl-84-226-167-205.adslplus.ch. [84.226.167.205]) by smtp.googlemail.com with ESMTPSA id b83sm274815wmd.48.2021.01.04.10.38.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Jan 2021 10:38:22 -0800 (PST) Date: Mon, 4 Jan 2021 19:38:21 +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: <20210104183821.GA29033@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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210104182734.GH5645@sirena.org.uk> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 04, 2021 at 06:27:34PM +0000, Mark Brown wrote: > On Mon, Jan 04, 2021 at 07:18:25PM +0100, Krzysztof Kozlowski wrote: > > On Mon, Jan 04, 2021 at 01:51:56PM +0000, Mark Brown wrote: > > > > > +- charger: Node for configuring the charger driver. > > > > + Required properties: > > > > + - compatible: "maxim,max8997-battery" > > > > > + Optional properties: > > > > + - extcon: extcon specifier for charging events > > > > + - charger-supply: regulator node for charging current > > > > > +- muic: Node used only by extcon consumers. > > > > + Required properties: > > > > + - compatible: "maxim,max8997-muic" > > > > Why do these need to appear in the DT binding? We know these features > > > are there simply from knowing this is a max8997. > > > If you refer to children nodes, then we do not know these entirely > > because the features could be disabled (pins not connected). In such > > case these subnodes can be disabled and MFD framework will not > > instantiate children devices. > > 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. 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. Best regards, Krzysztof