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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0CC18C00528 for ; Thu, 3 Aug 2023 09:02:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=TRZ/066mpTgRuPbt/uLiU1XoCDDSKW93Y8HkTFpC32s=; b=iX/5oz4Xh6pUp6 af17H9Q02nbc6V7z3Kdf8UChhokcmOQ4PA/+kxuR5MkJwXeYteQi/pml0HQFZM9fFzd97u1HsWtCW wACU/SDdbGNUC7bHJs+PM+zDSpi4Co1+kb7oOv6yqhra4IEcCRg2zzSRpQRQSTglzwX/qUHmTjc6d p4Y/oofsP1Zbp7Ybe9feIJqbxZYf4PCPagGNIw5tEj3XAxIm9C2bH4OAXFomLqsAmqNRKmWLTQeBH Z7YPdSlZuf0MME+288n/7GqHPNSCl24XAfOtcFx9UlmwYVMMD95q1X/cVmuqAnccrG95lL06HIH5g Zn/ojEZo+rURNdsw+ojA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qRUDE-0076CQ-23; Thu, 03 Aug 2023 09:01:40 +0000 Received: from madras.collabora.co.uk ([46.235.227.172]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qRUDB-0076Bc-2F; Thu, 03 Aug 2023 09:01:39 +0000 Received: from [192.168.1.100] (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id A204A6607194; Thu, 3 Aug 2023 10:01:35 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1691053296; bh=yJ1thvUjgcsARtQ4vh75a2lFkbz03xQuRAuMRkmA7Vc=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=IQzNd5N0RZlqCqP4tHgtA5J+6RLc2MYubdY/w/zcQi28Vbh6mu86cqQBVVPurstzt aYb5BExnkjMM2RzeiH83xZUuDRSpdGmJvqzen+p7YhuBekktqrAj/v8JOok7FNzv46 u9rlXk/6fCamD3QOA3k65N1Z+e/Nt/0eLqtXfRUPXdqpW8kxX/EeLYt08k0gzPcRso LcyYxCPvmPHegBWkSwfg84LCoQdwGLinvaZwB8f/I4Y91xyJ+hrSp4oGdidV+TCcza 7c3V80AcbkO/8LtQkmCcDZ0txJ4wUAK5FdMkF4PqM7pnRGRJzXQnJVo9iY1w4/GBNQ rfSilzmG2oE9w== Message-ID: Date: Thu, 3 Aug 2023 11:01:32 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH 3/9] mfd: mt6397: Split MediaTek MT6366 PMIC out of MT6358 Content-Language: en-US To: Chen-Yu Tsai , Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , Mark Brown Cc: Zhiyong Tao , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org References: <20230803074249.3065586-1-wenst@chromium.org> <20230803074249.3065586-4-wenst@chromium.org> From: AngeloGioacchino Del Regno In-Reply-To: <20230803074249.3065586-4-wenst@chromium.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230803_020137_906696_2F39A295 X-CRM114-Status: GOOD ( 21.61 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Il 03/08/23 09:42, Chen-Yu Tsai ha scritto: > The MT6366 PMIC is mostly, but not fully, compatible with MT6358. It has > a different set of regulators. Specifically, it lacks the camera related > VCAM* LDOs, but has additional VM18, VMDDR, and VSRAM_CORE LDOs. > > Add a separate compatible for the MT6366 PMIC. The regulator cell for > this new entry uses a new compatible string matching MT6366. > > Fixes: c47383f84909 ("mfd: Add support for the MediaTek MT6366 PMIC") > Signed-off-by: Chen-Yu Tsai I agree in that the LDOs are a bit different, but that's handled by the mt6358-regulator driver regardless of the actual devicetree compatible, as that's selected through a chip_id check. Finally, looking at the driver implementation itself, the addition of a specific mt6366 compatible here seems redundant, because the actual HW is - Handled by drivers, but - Described by bindings Any other opinions on this? Regards, Angelo > --- > drivers/mfd/mt6397-core.c | 31 +++++++++++++++++++++++++++++++ > 1 file changed, 31 insertions(+) > > diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c > index f6c1f80f94a4..3f8dfe60a59b 100644 > --- a/drivers/mfd/mt6397-core.c > +++ b/drivers/mfd/mt6397-core.c > @@ -206,6 +206,26 @@ static const struct mfd_cell mt6359_devs[] = { > }, > }; > > +static const struct mfd_cell mt6366_devs[] = { > + { > + .name = "mt6358-regulator", > + .of_compatible = "mediatek,mt6366-regulator" > + }, { > + .name = "mt6358-rtc", > + .num_resources = ARRAY_SIZE(mt6358_rtc_resources), > + .resources = mt6358_rtc_resources, > + .of_compatible = "mediatek,mt6358-rtc", > + }, { > + .name = "mt6358-sound", > + .of_compatible = "mediatek,mt6358-sound" > + }, { > + .name = "mt6358-keys", > + .num_resources = ARRAY_SIZE(mt6358_keys_resources), > + .resources = mt6358_keys_resources, > + .of_compatible = "mediatek,mt6358-keys" > + }, > +}; > + > static const struct mfd_cell mt6397_devs[] = { > { > .name = "mt6397-rtc", > @@ -280,6 +300,14 @@ static const struct chip_data mt6359_core = { > .irq_init = mt6358_irq_init, > }; > > +static const struct chip_data mt6366_core = { > + .cid_addr = MT6358_SWCID, > + .cid_shift = 8, > + .cells = mt6366_devs, > + .cell_size = ARRAY_SIZE(mt6366_devs), > + .irq_init = mt6358_irq_init, > +}; > + > static const struct chip_data mt6397_core = { > .cid_addr = MT6397_CID, > .cid_shift = 0, > @@ -358,6 +386,9 @@ static const struct of_device_id mt6397_of_match[] = { > }, { > .compatible = "mediatek,mt6359", > .data = &mt6359_core, > + }, { > + .compatible = "mediatek,mt6366", > + .data = &mt6366_core, > }, { > .compatible = "mediatek,mt6397", > .data = &mt6397_core, _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel