Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp203943pxb; Fri, 15 Jan 2021 00:39:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJwkXK9cgtbW0BRArcDThU4u9haRco5a3/sOpMRr1VoY/r5P3ioD1QqjJaHF4SMVU1Wg58R4 X-Received: by 2002:a05:6402:78f:: with SMTP id d15mr862465edy.362.1610699964828; Fri, 15 Jan 2021 00:39:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610699964; cv=none; d=google.com; s=arc-20160816; b=BTJsuI6ej9Qh3TzqmCkx/yHgDnkcqtwhkSEHuAEDTe4uat50gOjCb8z5efJ34I98fC blUQBaH4g3Ivi0HsO2BIFQYR6xURZrRLUTzmGlbwe367VKt31tEmlHrienE1krtmSnfr fSJosd/h7KKOu1C/ON0Pjp1XktEJjxM5WzrIFOZEq6IBtS8BXeR4fMpAhIoCDnXef5tD df/OMI5bnQe3k6Dl/kFvnt6MBbMrk8H9ZcGZAUXmEuKK8KHUdJMy3m8pjRPwo8UR/1MC p0WgpWqvPne0voppC4q2GpvLi1XGWp6Ipxji5epmX2gTZqBMgqCzufooQ4TDn6TnGPCr 5bzQ== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Dg3fcenP6YIm0aYs5w4I6Adx/SFGTjlnu+FOvTsHu6s=; b=PxgciDCODvsO8lVWGkPXBiD0rcl0nAGqbx7QRNKzJhrBpRB0rH0skinIz45+F8A3QL KxuoqWfFczA4fYFqn8iMQqxEgwDOXEOfK6mTJHkLsk9w4wN/60o256O/xdzMnwUlMSc/ bvWoEXg/aUiM+qPoxpBpPQUNIO9TbbGHOPlIVheqnfa04xzzHfkoUZJ0AGNoNKZUHYQk EbMEFDZW2MJnVTOxyblP77+i0F2xGu2u/mXRlUnhM6MHdWOKAeqWxZkCQ1PCpOdpcRmb NuZ1VYQGETgIIhTbwjqVE6OCSELjxxTRDrsQfMoxMHzl7LQlqKhWoKcmmBYxpJ4mRuov qA4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gxUveA9Y; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jt18si2135457ejb.633.2021.01.15.00.39.00; Fri, 15 Jan 2021 00:39:24 -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=@linaro.org header.s=google header.b=gxUveA9Y; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731564AbhAOHd1 (ORCPT + 99 others); Fri, 15 Jan 2021 02:33:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729451AbhAOHd0 (ORCPT ); Fri, 15 Jan 2021 02:33:26 -0500 Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D503CC0613C1 for ; Thu, 14 Jan 2021 23:32:45 -0800 (PST) Received: by mail-wm1-x32b.google.com with SMTP id h17so6266646wmq.1 for ; Thu, 14 Jan 2021 23:32:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=Dg3fcenP6YIm0aYs5w4I6Adx/SFGTjlnu+FOvTsHu6s=; b=gxUveA9YGhNb2E0mZMUvTHI+xbr056FxLZgftfCZZGeNOF+yJ9kajtQExO+pdJR3qx BLnTtJDuM10lTPfSe/TNs/D6zWrnF+RDifagNGXkh9NzzEPnWLATnD41wIUUXTU3msTk Mq5Tkcpzrr9Y/X/lAsccBF2PsbSF/xuTcOOOXSl82oWcuDtlv73iVqwrlUF4P462WsPR w/UjHkhGsQJK0QC1WuIzsvDRmaanz15SvGJXwYOm7R/MSO4PtmnYA8Ix054Ghw5VnjW7 74nqHDrKqAVyPcPhYjEAHt9B+qR2m+wBK6xmMz4DkHGOntE0rS6A6mbthBP1uMf2rFdk cOUw== 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:content-transfer-encoding :in-reply-to; bh=Dg3fcenP6YIm0aYs5w4I6Adx/SFGTjlnu+FOvTsHu6s=; b=s3BDBu94qPOrdGaNBFQI65ZzXmIRg+WUKJYfOQyDHyFqx5OqGF+yLeNafLHbgRVVwD T7PpjCQEQCQDHl4JJfM3Hb2yqE/ji+JBExVlMl+Zrc5V+4e0bPYU5t0N32feuKzYg6xf Oj5ODX4yksZUhpnZwSVndaEI13zDDHzaKVzr8d0cwIg1DtHPD56DUV2kCiPpv/vUUmx0 +j3ZDaOHvgAdRcu0gXbQW3u6djThTkBAz8FPnKLG8EkAFsT224msuIdjij5mt9XZveUQ /iPvTPMM14HY/6zwJFvxSQcU2gFV9CYuvKnDHCCdZkb6AFdRKwYn5ziNDRkufax0GVYk /pnA== X-Gm-Message-State: AOAM530cVUUh1MX8c/P75ZC0hU64Y1KRHtXnB1ICKddG1VbdhDk/EcZ8 xPzokZ/uLAhm2ktLmlbsS8SoHQ== X-Received: by 2002:a1c:df85:: with SMTP id w127mr7535799wmg.166.1610695964629; Thu, 14 Jan 2021 23:32:44 -0800 (PST) Received: from dell ([91.110.221.158]) by smtp.gmail.com with ESMTPSA id w13sm13281029wrt.52.2021.01.14.23.32.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Jan 2021 23:32:43 -0800 (PST) Date: Fri, 15 Jan 2021 07:32:41 +0000 From: Lee Jones To: Gene Chen Cc: Matthias Brugger , sre@kernel.org, Rob Herring , linux-pm@vger.kernel.org, devicetree , linux-arm Mailing List , "moderated list:ARM/Mediatek SoC support" , Linux Kernel Mailing List , Gene Chen , Wilma.Wu@mediatek.com, shufan_lee@richtek.com, ChiYuan Huang , benjamin.chao@mediatek.com Subject: Re: [PATCH v7 04/11] mfd: mt6360: Combine mt6360 pmic/ldo resources into mt6360 regulator resources Message-ID: <20210115073241.GC3975472@dell> References: <1605177598-23501-1-git-send-email-gene.chen.richtek@gmail.com> <1605177598-23501-5-git-send-email-gene.chen.richtek@gmail.com> <74b127eb-9a3c-20c9-5692-b00b982f4da3@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 15 Jan 2021, Gene Chen wrote: > Matthias Brugger 於 2021年1月12日 週二 下午8:32寫道: > > > > > > > > On 12/11/2020 11:39, Gene Chen wrote: > > > From: Gene Chen > > > > > > Combine mt6360 pmic/ldo resources into mt6360 regulator resources > > > to simplify the similar resources object. > > > > > > Signed-off-by: Gene Chen > > > Acked-for-MFD-by: Lee Jones > > > --- > > > drivers/mfd/mt6360-core.c | 11 +++-------- > > > 1 file changed, 3 insertions(+), 8 deletions(-) > > > > > > diff --git a/drivers/mfd/mt6360-core.c b/drivers/mfd/mt6360-core.c > > > index 692e47b..5119e51 100644 > > > --- a/drivers/mfd/mt6360-core.c > > > +++ b/drivers/mfd/mt6360-core.c > > > @@ -265,7 +265,7 @@ static const struct resource mt6360_led_resources[] = { > > > DEFINE_RES_IRQ_NAMED(MT6360_FLED1_STRB_TO_EVT, "fled1_strb_to_evt"), > > > }; > > > > > > -static const struct resource mt6360_pmic_resources[] = { > > > +static const struct resource mt6360_regulator_resources[] = { > > > DEFINE_RES_IRQ_NAMED(MT6360_BUCK1_PGB_EVT, "buck1_pgb_evt"), > > > DEFINE_RES_IRQ_NAMED(MT6360_BUCK1_OC_EVT, "buck1_oc_evt"), > > > DEFINE_RES_IRQ_NAMED(MT6360_BUCK1_OV_EVT, "buck1_ov_evt"), > > > @@ -278,9 +278,6 @@ static const struct resource mt6360_pmic_resources[] = { > > > DEFINE_RES_IRQ_NAMED(MT6360_LDO7_OC_EVT, "ldo7_oc_evt"), > > > DEFINE_RES_IRQ_NAMED(MT6360_LDO6_PGB_EVT, "ldo6_pgb_evt"), > > > DEFINE_RES_IRQ_NAMED(MT6360_LDO7_PGB_EVT, "ldo7_pgb_evt"), > > > -}; > > > - > > > -static const struct resource mt6360_ldo_resources[] = { > > > DEFINE_RES_IRQ_NAMED(MT6360_LDO1_OC_EVT, "ldo1_oc_evt"), > > > DEFINE_RES_IRQ_NAMED(MT6360_LDO2_OC_EVT, "ldo2_oc_evt"), > > > DEFINE_RES_IRQ_NAMED(MT6360_LDO3_OC_EVT, "ldo3_oc_evt"), > > > @@ -298,10 +295,8 @@ static const struct mfd_cell mt6360_devs[] = { > > > NULL, 0, 0, "mediatek,mt6360-chg"), > > > OF_MFD_CELL("mt6360-led", mt6360_led_resources, > > > NULL, 0, 0, "mediatek,mt6360-led"), > > > - OF_MFD_CELL("mt6360-pmic", mt6360_pmic_resources, > > > - NULL, 0, 0, "mediatek,mt6360-pmic"), > > > - OF_MFD_CELL("mt6360-ldo", mt6360_ldo_resources, > > > - NULL, 0, 0, "mediatek,mt6360-ldo"), > > > + OF_MFD_CELL("mt6360-regulator", mt6360_regulator_resources, > > > + NULL, 0, 0, "mediatek,mt6360-regulator"), > > > > As discussed with the MFD maintainer [1], the regulator (and probably all cells) > > shouldn't have a DT binding. > > > > So please send a new version which fixes that. > > > > Regards, > > Matthias > > > > [1] https://lore.kernel.org/linux-mediatek/20210111164118.GE4728@sirena.org.uk/ I don't think Mark is correct here. We usually do implement compatible strings for sub-devices and they do tend to have their own device nodes. It's a very long time ago since I coded this up myself, but from memory, you can't have 2 devices share a compatible string. > Should I use parent's device to find sub-devices of_node if without > compatible name? > I trace the function mfd_add_device, > > if (IS_ENABLED(CONFIG_OF) && parent->of_node && cell->of_compatible) { > ..... > ret = mfd_match_of_node_to_dev(pdev, np, cell); > ..... > } > > which is binding mfd sub-device with compatible. Does it be removed in > the feature? > > > > OF_MFD_CELL("mt6360-tcpc", NULL, > > > NULL, 0, 0, "mediatek,mt6360-tcpc"), > > > }; > > > -- Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog