From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8D17560A261F for ; Tue, 20 Oct 2026 17:38:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=scElv4Pf; dkim=fail reason="signature verification failed" (2048-bit key, unprotected) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=desiato.20200630 header.b=h4rwIHys; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=QewrctKb DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=khjjDBK0J2xOtnMH1muymGK2fwTqPXy0k/z60K/0+xY=; b=scElv4Pf2XbaP6Rdp2op7JjDhc nrrTrh5Cwyf84Vw490CNQzkMYBUBjEol6wA7vjQh45gxMUuOELIitylaq2HUrkmtfVEMAlaOFWQ5G rN4jeUOfadv6UFiWpkKGxwqHFteu6zByDldKJTviprr8L54zrQmsmdxO3SH/lMAEJ6Ldu+jpUjcpk n29+tkMPTH6Vv47wWDPtNnSjYKXi8EuTFhmWc9S8VdYDQFf2HSQftYx7UW7sUyO6mojq3cIgQiVfV 8o7SBcZ2AXjYlkDoqqOMcidKoKeK8vd1q4zv7nSscxq0Yz9gYzHvRfhprWTMloYD5FSVFO6xKTy7g O/lgfw+Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1xJDmE-0000000AMJm-41Pz; Tue, 20 Oct 2026 17:37:30 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1xJDmD-0000000AMIX-3ywT for linux-arm-kernel@bombadil.infradead.org; Tue, 20 Oct 2026 17:37:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=khjjDBK0J2xOtnMH1muymGK2fwTqPXy0k/z60K/0+xY=; b=h4rwIHysGxRRpqhByGg3lWtRRw hfznIf6Og4DcuHizUZCQz8sPg4J3Pcsx91dUX6/4l6X8xoJeH7b3zQoUnte4nlY4W8RRCumQLkqE7 pn/89S/OZ/NWfbaOIH2JtGCUKJ3i36v/4SO2CiG0lnuJCxxrXLM4Ke6nBHvBThugw7WcT0LBKQ0ps sNarc2RbVGTcenQK+nljAinoF43wPqPbAZe5yOhsu3mGgBL+V2QW4bZkXYWZ2b3XCZ0fVg6XnKulK GG++oxky2e9d2y6nzuc11AJBINIET6w6ls+V8zH8Q+zIn72Zc4YIbRqE+UsqYD7b6dFFDQJjiRGxy GnLrayQA==; Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by desiato.infradead.org with esmtps (Exim 4.99.5 #2 (Red Hat Linux)) id 1xJDmB-000000051Zx-0Q3O for linux-arm-kernel@lists.infradead.org; Tue, 20 Oct 2026 17:37:28 +0000 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-4a1d293b293so20178335e9.2 for ; Tue, 20 Oct 2026 10:37:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1792517845; x=1793122645; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=khjjDBK0J2xOtnMH1muymGK2fwTqPXy0k/z60K/0+xY=; b=QewrctKb0RcQg7jtoC24UAzEyP/nKMIqqPW/sKMz+xJuQ1GkgYD2mHsqY3LaO90zZr gR+ygwj26QSai2KEALYLC4hRXuU5nu8I9Z1of58QcL0VQ1Ah0E/fRWuQEyLVmjEW3wvm 8mTYvVvOTX+uizOjEgLebzeiopK2pBkm8pnXf3hfbV0NcHZcmzmIbMuUkJtEieyD5Ch6 A6kfON2Nh9yxa7/88zfOLC94dFW0dlBd/V6tOcQcXteFmtMS9XUXMZSO1aukX2t24eNs bp/WHh8UgxhHRFCQCOLFLCDmAd5vRaJKH5APeegIqJPsBZy8TzL86Jxp9E7Q9UIcPiSM 7LAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792517845; x=1793122645; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=khjjDBK0J2xOtnMH1muymGK2fwTqPXy0k/z60K/0+xY=; b=b2MoKBTguTxP2jUA85ond2Y/D+ARmKQUAz9UkUbM0emXw8EiqjVUyAmx9PiGBKSBn6 8VNQ0RAOOFLl/39a7/nKwlWwFqkbtlRoKjI8T+P5vR8tUVdy3ZcivPNb3i3KsIXvV6N0 a1j4Hw+wWN/XJ+lic3DQKbgjthCUC9Sf0smOwAsWlgEnTmOHBZVqqlqu3y4itjN5elyG QJLx5zj92iBQiGizbfkh8v+b08bF4DBx1uhTZY4z6C0I7Qb9t+G+BgxU4ipdNz4PgeHS yQao1ZIZnSYcBQ3TKSBB8vhmDQ8tfD2neTA8HAM2j0qmtqNNCvRRKW3sG59rTzQie4fl PDrA== X-Forwarded-Encrypted: i=1; AKwUvBySLSJWXenzFOPad3j0kes6uJe55w8KQDCtP4FAsy6b5F1ixN1qONrS/HRlkF+u2DB9irl5y8mshAVoe4FNQ6IZ@lists.infradead.org X-Gm-Message-State: AFq9FYKPDyjVfvDS6AOW1sU0a48SSGoGOJeCu/EykENASU3/5GGW6Bni v3G8jnkjsGrc5LmX/oLqm/4tSLYgAYmmy3ynBYohTw+7z9OQ8Ry00tsV X-Gm-Gg: AYBFou36agxhr7dHOlym+qAn0m09f/NKQ6Rdb4OzJN/9Z9zdMIrxx8kWoUXnMw525Wq sD5qnU02KpqG5JQmcjYIuNTeRgyYQxAqo0XSJpXpTBnPwqj0DqL6U3Gx/i4yE1rQ6Fb1SX4Pahw Ho1VxWDDxai6fI6RGpZ5WYPEUK/vgatmHYqAZiKnQOV4PtYHll2X6t6jZotA/dF3RiRUijhxi5Z 4iCwD6M9GaZcsGBUVT4vqF1W9/0gyXbsjzyRc4JpB808Q3u7sZqBQKrAc6x8Cmi169fRPRv/osE x/6rrbTBfQw4Hijy14wpmRmTdcpa8madoI5ZBWB4VEziZkBG43FKHYVWHnihskG767/jiKcb7bi uZn0YXdsiTyaVQkiybDOen7moiYUF/cm165LX31L/Tg0QdX+TJoU9uMK00H77rIRphHMz6xvre2 iA5zif3fRuXU9ngNV9AzC3Zex0y1NvOjb81aaapQ0O/stjcBq2fQ5rY8382FQVL/kFng== X-Received: by 2002:a05:600c:34c2:b0:4a1:a45a:88f with SMTP id 5b1f17b1804b1-4a1d76039d7mr227410065e9.20.1792517845273; Tue, 20 Oct 2026 10:37:25 -0700 (PDT) Received: from luca-vm.lan ([154.61.61.58]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a1f8016c93sm52505235e9.5.2026.10.20.10.37.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Oct 2026 10:37:24 -0700 (PDT) From: Luca Leonardo Scorcia To: linux-mediatek@lists.infradead.org Cc: Luca Leonardo Scorcia , AngeloGioacchino Del Regno , Dmitry Torokhov , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Sen Chu , Sean Wang , Macpaul Lin , Lee Jones , Matthias Brugger , Liam Girdwood , Mark Brown , Linus Walleij , Val Packett , Fabien Parent , Akari Tsuyukusa , Chen Zhong , linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, mfd@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org Subject: [PATCH RESEND v10 4/9] mfd: mt6397: Use MFD_CELL_* to describe sub-devices Date: Tue, 20 Oct 2026 19:33:25 +0200 Message-ID: <20261020173556.632798-5-l.scorcia@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261020173556.632798-1-l.scorcia@gmail.com> References: <20261020173556.632798-1-l.scorcia@gmail.com> X-Archived-By: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261020_183727_297257_937791E0 X-CRM114-Status: GOOD ( 14.00 ) X-Spam-Score: -0.2 (/) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 Use the MFD_CELL_* macros to describe sub-devices. No functional changes. Signed-off-by: Luca Leonardo Scorcia Reviewed-by: AngeloGioacchino Del Regno --- drivers/mfd/mt6397-core.c | 207 ++++++++++++-------------------------- 1 file changed, 67 insertions(+), 140 deletions(-) diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c index 9ec951996588..3e08179002fa 100644 --- a/drivers/mfd/mt6397-core.c +++ b/drivers/mfd/mt6397-core.c @@ -124,165 +124,92 @@ static const struct resource mt6323_pwrc_resources[] = { }; static const struct mfd_cell mt6323_devs[] = { - { - .name = "mt6323-auxadc", - .of_compatible = "mediatek,mt6323-auxadc", - }, { - .name = "mt6323-efuse", - .of_compatible = "mediatek,mt6323-efuse", - }, { - .name = "mt6323-rtc", - .num_resources = ARRAY_SIZE(mt6323_rtc_resources), - .resources = mt6323_rtc_resources, - .of_compatible = "mediatek,mt6323-rtc", - }, { - .name = "mt6323-regulator", - .of_compatible = "mediatek,mt6323-regulator" - }, { - .name = "mt6323-led", - .of_compatible = "mediatek,mt6323-led" - }, { - .name = "mt6323-keys", - .num_resources = ARRAY_SIZE(mt6323_keys_resources), - .resources = mt6323_keys_resources, - .of_compatible = "mediatek,mt6323-keys" - }, { - .name = "mt6323-pwrc", - .num_resources = ARRAY_SIZE(mt6323_pwrc_resources), - .resources = mt6323_pwrc_resources, - .of_compatible = "mediatek,mt6323-pwrc" - }, + MFD_CELL_OF("mt6323-auxadc", NULL, NULL, 0, 0, + "mediatek,mt6323-auxadc"), + MFD_CELL_OF("mt6323-efuse", NULL, NULL, 0, 0, + "mediatek,mt6323-efuse"), + MFD_CELL_OF("mt6323-rtc", mt6323_rtc_resources, NULL, 0, 0, + "mediatek,mt6323-rtc"), + MFD_CELL_OF("mt6323-regulator", NULL, NULL, 0, 0, + "mediatek,mt6323-regulator"), + MFD_CELL_OF("mt6323-led", NULL, NULL, 0, 0, + "mediatek,mt6323-led"), + MFD_CELL_OF("mt6323-keys", mt6323_keys_resources, NULL, 0, 0, + "mediatek,mt6323-keys"), + MFD_CELL_OF("mt6323-pwrc", mt6323_pwrc_resources, NULL, 0, 0, + "mediatek,mt6323-pwrc"), }; static const struct mfd_cell mt6328_devs[] = { - { - .name = "mt6328-regulator", - .of_compatible = "mediatek,mt6328-regulator" - }, { - .name = "mt6328-keys", - .num_resources = ARRAY_SIZE(mt6328_keys_resources), - .resources = mt6328_keys_resources, - .of_compatible = "mediatek,mt6328-keys" - }, + MFD_CELL_OF("mt6328-regulator", NULL, NULL, 0, 0, + "mediatek,mt6328-regulator"), + MFD_CELL_OF("mt6328-keys", mt6328_keys_resources, NULL, 0, 0, + "mediatek,mt6328-keys"), }; static const struct mfd_cell mt6357_devs[] = { - { - .name = "mt6359-auxadc", - .of_compatible = "mediatek,mt6357-auxadc" - }, { - .name = "mt6357-regulator", - }, { - .name = "mt6357-rtc", - .num_resources = ARRAY_SIZE(mt6357_rtc_resources), - .resources = mt6357_rtc_resources, - .of_compatible = "mediatek,mt6357-rtc", - }, { - .name = "mt6357-sound", - .of_compatible = "mediatek,mt6357-sound" - }, { - .name = "mt6357-keys", - .num_resources = ARRAY_SIZE(mt6357_keys_resources), - .resources = mt6357_keys_resources, - .of_compatible = "mediatek,mt6357-keys" - }, + MFD_CELL_OF("mt6359-auxadc", NULL, NULL, 0, 0, + "mediatek,mt6357-auxadc"), + MFD_CELL_NAME("mt6357-regulator"), + MFD_CELL_OF("mt6357-rtc", mt6357_rtc_resources, NULL, 0, 0, + "mediatek,mt6357-rtc"), + MFD_CELL_OF("mt6357-sound", NULL, NULL, 0, 0, + "mediatek,mt6357-sound"), + MFD_CELL_OF("mt6357-keys", mt6357_keys_resources, NULL, 0, 0, + "mediatek,mt6357-keys"), }; /* MT6331 is always used in combination with MT6332 */ static const struct mfd_cell mt6331_mt6332_devs[] = { - { - .name = "mt6331-rtc", - .num_resources = ARRAY_SIZE(mt6331_rtc_resources), - .resources = mt6331_rtc_resources, - .of_compatible = "mediatek,mt6331-rtc", - }, { - .name = "mt6331-regulator", - .of_compatible = "mediatek,mt6331-regulator" - }, { - .name = "mt6332-regulator", - .of_compatible = "mediatek,mt6332-regulator" - }, { - .name = "mt6331-keys", - .num_resources = ARRAY_SIZE(mt6331_keys_resources), - .resources = mt6331_keys_resources, - .of_compatible = "mediatek,mt6331-keys" - }, + MFD_CELL_OF("mt6331-rtc", mt6331_rtc_resources, NULL, 0, 0, + "mediatek,mt6331-rtc"), + MFD_CELL_OF("mt6331-regulator", NULL, NULL, 0, 0, + "mediatek,mt6331-regulator"), + MFD_CELL_OF("mt6332-regulator", NULL, NULL, 0, 0, + "mediatek,mt6332-regulator"), + MFD_CELL_OF("mt6331-keys", mt6331_keys_resources, NULL, 0, 0, + "mediatek,mt6331-keys"), }; static const struct mfd_cell mt6358_devs[] = { - { - .name = "mt6359-auxadc", - .of_compatible = "mediatek,mt6358-auxadc" - }, { - .name = "mt6358-regulator", - .of_compatible = "mediatek,mt6358-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" - }, + MFD_CELL_OF("mt6359-auxadc", NULL, NULL, 0, 0, + "mediatek,mt6358-auxadc"), + MFD_CELL_OF("mt6358-regulator", NULL, NULL, 0, 0, + "mediatek,mt6358-regulator"), + MFD_CELL_OF("mt6358-rtc", mt6358_rtc_resources, NULL, 0, 0, + "mediatek,mt6358-rtc"), + MFD_CELL_OF("mt6358-sound", NULL, NULL, 0, 0, + "mediatek,mt6358-sound"), + MFD_CELL_OF("mt6358-keys", mt6358_keys_resources, NULL, 0, 0, + "mediatek,mt6358-keys"), }; static const struct mfd_cell mt6359_devs[] = { - { - .name = "mt6359-auxadc", - .of_compatible = "mediatek,mt6359-auxadc" - }, - { .name = "mt6359-regulator", }, - { - .name = "mt6359-rtc", - .num_resources = ARRAY_SIZE(mt6358_rtc_resources), - .resources = mt6358_rtc_resources, - .of_compatible = "mediatek,mt6358-rtc", - }, - { .name = "mt6359-sound", }, - { - .name = "mt6359-keys", - .num_resources = ARRAY_SIZE(mt6359_keys_resources), - .resources = mt6359_keys_resources, - .of_compatible = "mediatek,mt6359-keys" - }, - { - .name = "mt6359-accdet", - .of_compatible = "mediatek,mt6359-accdet", - .num_resources = ARRAY_SIZE(mt6359_accdet_resources), - .resources = mt6359_accdet_resources, - }, + MFD_CELL_OF("mt6359-auxadc", NULL, NULL, 0, 0, + "mediatek,mt6359-auxadc"), + MFD_CELL_NAME("mt6359-regulator"), + MFD_CELL_OF("mt6359-rtc", mt6358_rtc_resources, NULL, 0, 0, + "mediatek,mt6358-rtc"), + MFD_CELL_NAME("mt6359-sound"), + MFD_CELL_OF("mt6359-keys", mt6359_keys_resources, NULL, 0, 0, + "mediatek,mt6359-keys"), + MFD_CELL_OF("mt6359-accdet", mt6359_accdet_resources, NULL, 0, 0, + "mediatek,mt6359-accdet"), }; static const struct mfd_cell mt6397_devs[] = { - { - .name = "mt6397-rtc", - .num_resources = ARRAY_SIZE(mt6397_rtc_resources), - .resources = mt6397_rtc_resources, - .of_compatible = "mediatek,mt6397-rtc", - }, { - .name = "mt6397-regulator", - .of_compatible = "mediatek,mt6397-regulator", - }, { - .name = "mt6397-codec", - .of_compatible = "mediatek,mt6397-codec", - }, { - .name = "mt6397-clk", - .of_compatible = "mediatek,mt6397-clk", - }, { - .name = "mt6397-pinctrl", - .of_compatible = "mediatek,mt6397-pinctrl", - }, { - .name = "mt6397-keys", - .num_resources = ARRAY_SIZE(mt6397_keys_resources), - .resources = mt6397_keys_resources, - .of_compatible = "mediatek,mt6397-keys" - } + MFD_CELL_OF("mt6397-rtc", mt6397_rtc_resources, NULL, 0, 0, + "mediatek,mt6397-rtc"), + MFD_CELL_OF("mt6397-regulator", NULL, NULL, 0, 0, + "mediatek,mt6397-regulator"), + MFD_CELL_OF("mt6397-codec", NULL, NULL, 0, 0, + "mediatek,mt6397-codec"), + MFD_CELL_OF("mt6397-clk", NULL, NULL, 0, 0, + "mediatek,mt6397-clk"), + MFD_CELL_OF("mt6397-pinctrl", NULL, NULL, 0, 0, + "mediatek,mt6397-pinctrl"), + MFD_CELL_OF("mt6397-keys", mt6397_keys_resources, NULL, 0, 0, + "mediatek,mt6397-keys"), }; struct chip_data { -- 2.43.0