From patchwork Fri Apr 15 15:36:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 12815165 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 827E6C433EF for ; Fri, 15 Apr 2022 16:11:29 +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-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xOEktQzF3qYXeaV9P2TnGy1K8+BviAHSxQD+xSYulLE=; b=GBBGiXZA+V0Wm2 WQmvAjbH3SI26+we2IAY5MRLCy8O3b4keU22eAHaA4qiy3oWuel/ymMReUFlAA4IbrHiz/eFlWJX6 vi+IRP0jOsyT0vCAMMPryRAAJ1uFCPLnwQt/wNVkgP9H4IYEpOv0Z/bkKjLChuTAYR5CJmHqPmAWt 17GklA0Q6V1U5r74MhpWT2mpK3Dn62EFmru5udwO0pmAzJEnRvXT+VVHAGcklNKbIqNA4cR9/6F7t CkU+yZVvtgTw5eUOF84Lv+DUOotfgibigsVJVHtb43TzevuDrMxGQeFLyqRLvoMU0PXHlvWjv++lL 795b3GuBnVkAZSvbbxmg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nfOWU-00AomA-7s; Fri, 15 Apr 2022 16:10:15 +0000 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nfO0N-00AbRD-Fu for linux-arm-kernel@lists.infradead.org; Fri, 15 Apr 2022 15:37:05 +0000 Received: by mail-wm1-x332.google.com with SMTP id m33-20020a05600c3b2100b0038ec0218103so5223371wms.3 for ; Fri, 15 Apr 2022 08:37:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WDWruGhytuHi8Hvh9Dd5EXmCI8L1q6rKOX9fLidj6Ec=; b=7PMInzua21fpHF4kYL57dFlermowOW/PqKGwQW3jR3av/kD270Yz7hbxnumJtgBQZe qTv0oUPTjvZJ/BIK4h9Rfj2/YizFRGCoEJTPeJV7gLczJ9GUhdouEgHr4dTvJcvc7DWA ie3j/T1pAG0eWAf8WjtV3bekFzyv+C2k78Igwue3O8AULtfm08Hb0K5xw19m0BWHGPUL /0YZN1+SUuUsmv8pGx7v5SS6Mdpln+x0dEEX9NoSK5i5fdB+ZqNwDcGkZuPaB3q9g9HQ am556YuRXY6z19YPvt+WqjCMBWDsjvB5lX8ib7SaCcTkaBKkrVxYzfJdHgMY0U79NvcT veIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WDWruGhytuHi8Hvh9Dd5EXmCI8L1q6rKOX9fLidj6Ec=; b=DBI+03A7rBxFLTJEmsQs5KTfhtlt2ZrgnSYf1kSWAZT0jsOvhSvG7Z9DCO+/WM3y5t Pr0LVg7K2KiY7XMdHDhtPiqGsoqZbvhNzCv+Drq+q/rpOkZoqYyhdE9bw/UuYvVk9RMK XoBFqQBUEPWDwSmMKH4VO/s0RmKHLSBK1qg8e+lNh6GyQgZQDlWA6qOXT+tpEV6gUvDQ QQQ56UpvBzPE/ZKoLZfxrhLlhhvE6geN0V0xRn12W+joDcv+rrnkfEqrLFLDHFOZOPif R/IKgdbdww+smlZWQR5S1iuY3Kqq9GwS7WSug7vvO0qo0ZdkNLMWyYSVRQ+99zf/uSXN t1mQ== X-Gm-Message-State: AOAM533vIGeEPrFPFkg+jMX/LsESgHD2Ny9mokMxfgj7rU9GdGm3cLhv M6+FCKCRuaDXKUBKS0ouHvj59w== X-Google-Smtp-Source: ABdhPJw+A/iRYwe+lAeKns1b6yTF/VsCPkstrY3ipuTjcg6HrcxfTo54JB/+0tA8BqHvGSAeVJOP9Q== X-Received: by 2002:a1c:2b05:0:b0:392:5bfb:a0e2 with SMTP id r5-20020a1c2b05000000b003925bfba0e2mr521128wmr.165.1650037021444; Fri, 15 Apr 2022 08:37:01 -0700 (PDT) Received: from localhost.localdomain ([88.160.162.107]) by smtp.gmail.com with ESMTPSA id c24-20020a7bc018000000b0038a18068cf5sm8459292wmb.15.2022.04.15.08.37.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 08:37:01 -0700 (PDT) From: Fabien Parent To: Dmitry Torokhov , Matthias Brugger Cc: Fabien Parent , linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/7] Input: mtk-pmic-keys: rename platform data struct Date: Fri, 15 Apr 2022 17:36:26 +0200 Message-Id: <20220415153629.1817202-5-fparent@baylibre.com> X-Mailer: git-send-email 2.35.2 In-Reply-To: <20220415153629.1817202-1-fparent@baylibre.com> References: <20220415153629.1817202-1-fparent@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220415_083703_557380_A0006219 X-CRM114-Status: GOOD ( 16.20 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Rename the struct that is given to the .data field of the of_device_id entries to reflect that this structure will not only contain register definitions but also other platform data. Signed-off-by: Fabien Parent Tested-by: Mattijs Korpershoek # on mt8183-pumpkin --- drivers/input/keyboard/mtk-pmic-keys.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/input/keyboard/mtk-pmic-keys.c b/drivers/input/keyboard/mtk-pmic-keys.c index c31ab4368388..a0da644fe93d 100644 --- a/drivers/input/keyboard/mtk-pmic-keys.c +++ b/drivers/input/keyboard/mtk-pmic-keys.c @@ -50,12 +50,12 @@ struct mtk_pmic_keys_regs { .intsel_mask = _intsel_mask, \ } -struct mtk_pmic_regs { +struct mtk_pmic_keys_pdata { const struct mtk_pmic_keys_regs keys_regs[MTK_PMIC_MAX_KEY_COUNT]; u32 pmic_rst_reg; }; -static const struct mtk_pmic_regs mt6397_regs = { +static const struct mtk_pmic_keys_pdata mt6397_pdata = { .keys_regs[MTK_PMIC_PWRKEY_INDEX] = MTK_PMIC_KEYS_REGS(MT6397_CHRSTATUS, 0x8, MT6397_INT_RSV, 0x10), @@ -65,7 +65,7 @@ static const struct mtk_pmic_regs mt6397_regs = { .pmic_rst_reg = MT6397_TOP_RST_MISC, }; -static const struct mtk_pmic_regs mt6323_regs = { +static const struct mtk_pmic_keys_pdata mt6323_pdata = { .keys_regs[MTK_PMIC_PWRKEY_INDEX] = MTK_PMIC_KEYS_REGS(MT6323_CHRSTATUS, 0x2, MT6323_INT_MISC_CON, 0x10), @@ -75,7 +75,7 @@ static const struct mtk_pmic_regs mt6323_regs = { .pmic_rst_reg = MT6323_TOP_RST_MISC, }; -static const struct mtk_pmic_regs mt6358_regs = { +static const struct mtk_pmic_keys_pdata mt6358_pdata = { .keys_regs[MTK_PMIC_PWRKEY_INDEX] = MTK_PMIC_KEYS_REGS(MT6358_TOPSTATUS, 0x2, MT6358_PSC_TOP_INT_CON0, 0x5), @@ -255,13 +255,13 @@ static SIMPLE_DEV_PM_OPS(mtk_pmic_keys_pm_ops, mtk_pmic_keys_suspend, static const struct of_device_id of_mtk_pmic_keys_match_tbl[] = { { .compatible = "mediatek,mt6397-keys", - .data = &mt6397_regs, + .data = &mt6397_pdata, }, { .compatible = "mediatek,mt6323-keys", - .data = &mt6323_regs, + .data = &mt6323_pdata, }, { .compatible = "mediatek,mt6358-keys", - .data = &mt6358_regs, + .data = &mt6358_pdata, }, { /* sentinel */ } @@ -277,7 +277,7 @@ static int mtk_pmic_keys_probe(struct platform_device *pdev) static const char *const irqnames[] = { "powerkey", "homekey" }; static const char *const irqnames_r[] = { "powerkey_r", "homekey_r" }; struct mtk_pmic_keys *keys; - const struct mtk_pmic_regs *mtk_pmic_regs; + const struct mtk_pmic_keys_pdata *mtk_pmic_keys_pdata; struct input_dev *input_dev; const struct of_device_id *of_id = of_match_device(of_mtk_pmic_keys_match_tbl, &pdev->dev); @@ -288,7 +288,7 @@ static int mtk_pmic_keys_probe(struct platform_device *pdev) keys->dev = &pdev->dev; keys->regmap = pmic_chip->regmap; - mtk_pmic_regs = of_id->data; + mtk_pmic_keys_pdata = of_id->data; keys->input_dev = input_dev = devm_input_allocate_device(keys->dev); if (!input_dev) { @@ -310,7 +310,7 @@ static int mtk_pmic_keys_probe(struct platform_device *pdev) } for_each_child_of_node(node, child) { - keys->keys[index].regs = &mtk_pmic_regs->keys_regs[index]; + keys->keys[index].regs = &mtk_pmic_keys_pdata->keys_regs[index]; keys->keys[index].irq = platform_get_irq_byname(pdev, irqnames[index]); @@ -358,7 +358,7 @@ static int mtk_pmic_keys_probe(struct platform_device *pdev) return error; } - mtk_pmic_keys_lp_reset_setup(keys, mtk_pmic_regs->pmic_rst_reg); + mtk_pmic_keys_lp_reset_setup(keys, mtk_pmic_keys_pdata->pmic_rst_reg); platform_set_drvdata(pdev, keys);