From patchwork Tue Jul 18 15:13:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shiji Yang X-Patchwork-Id: 13317397 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5BA89EB64DC for ; Tue, 18 Jul 2023 15:16:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233502AbjGRPQg (ORCPT ); Tue, 18 Jul 2023 11:16:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231965AbjGRPQf (ORCPT ); Tue, 18 Jul 2023 11:16:35 -0400 Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01olkn2021.outbound.protection.outlook.com [40.92.99.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26C451726; Tue, 18 Jul 2023 08:16:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iEwNYmfYcdK8eLbnUQsW1Vg2T+oNX+bdNU5gob6R3DHURnBoodDEMdf+FChuWzyyKQpAi659kvQv5YzehwEOhbF8d6ZqDMZPSMBtpZCK0NyiE2PWhd7DA9BGUA6HZGQ6W6XnEb00uFciiO87D2AVYQwL4Y+ralQpzfWfjGgQm5fw3zDGPqFDw7Q7EQRhd3mSqTuc/SpP8ZhG9oHrpfLkiArX76CBqMjNrjN4fYNjSQSUyiIOV6cxMc3Gy1If32r1uBJ6iJFdT6YsLpa3OK8WQMvBPQKQleuZET/UQwbzxsl9QLhMGPZmf58v0uDJOeHkR/KTZMcXvqZWA2N0JTrA5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=RnLEhHQWScLLHZqoEPStaexmOu00uTjsXHaDjwDdVW0=; b=T3h0Bk4UYZW6G7fsdv6XTNubjhX37Z1MQntvAG+8PoQwwtE8r031FAjWYVPVLJcQ1Tuh/gP8xrRPeK8dMK0GTATnme+mKT3ZpJKE45mTzpOivPhrZOkT8PcZYtRs6wGkE/rVcqm7ywo2yjuT4n5fhHO4I9WMP8tYT77NAmxIHc3fDn3YtXUZaRyAJvXRAot81Yt7l9PtA014glygmBq19UWPmCssFYgW+MBamPPgmdIljPDPK0F+q79SaaM7n6wDSzMV8F2noTqeGDoLHRmppY/C0busY5PC6u1IEoOEM54xVtzaa7Tv0FOK6nDQMnHK/XWwoe6v5SEW+JNLxFvDaw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RnLEhHQWScLLHZqoEPStaexmOu00uTjsXHaDjwDdVW0=; b=udx0Uprg4zHh6RYQOh8nztpTZBbtoEChRB1LazWfUVN6NsXZRuUmAGexVk1HP0/H36asEV/p64bLFEb1z+VlTj/r2DMTu5gM2Fvs2VGE6ASRVsPb4i4JCGNzlaoejY0i2qPh9emjGbOIccrlVfDuAdoWu8a1H5ih1lSDrz6N1QoMBf7cHyEAe1oetAGm/v6s33noVbS7W8LMGR95Xl8x5fjl+DPyoncnX8Ao3AEiec9abcCoSxfT1HAEMg1/QWBowhed1gXo8PPzM9voevPDgf6S7TPi7RShzcEh4zNm1t+ep7kuMQCiavMPJT+tEEB52eNwHHqFronfOTohj77RCg== Received: from TYAP286MB0315.JPNP286.PROD.OUTLOOK.COM (2603:1096:404:8041::8) by OS3P286MB2215.JPNP286.PROD.OUTLOOK.COM (2603:1096:604:19f::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.23; Tue, 18 Jul 2023 15:16:10 +0000 Received: from TYAP286MB0315.JPNP286.PROD.OUTLOOK.COM ([fe80::f4c2:4b38:d074:f1e9]) by TYAP286MB0315.JPNP286.PROD.OUTLOOK.COM ([fe80::f4c2:4b38:d074:f1e9%5]) with mapi id 15.20.6588.031; Tue, 18 Jul 2023 15:16:09 +0000 From: Shiji Yang To: linux-gpio@vger.kernel.org Cc: =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= , Sergio Paracuellos , Sean Wang , Linus Walleij , Matthias Brugger , AngeloGioacchino Del Regno , linux-mediatek@lists.infradead.org, linux-mips@vger.kernel.org, Shiji Yang Subject: [PATCH] pinctrl: mtmips: do not log when repeating the same pinctrl request Date: Tue, 18 Jul 2023 23:13:46 +0800 Message-ID: X-Mailer: git-send-email 2.30.2 X-TMN: [b4oWDF+nRk2gc1a5ICE0Szv/OHSKiDA0Ni0AFMdORW4=] X-ClientProxiedBy: TYCPR01CA0102.jpnprd01.prod.outlook.com (2603:1096:405:4::18) To TYAP286MB0315.JPNP286.PROD.OUTLOOK.COM (2603:1096:404:8041::8) X-Microsoft-Original-Message-ID: <20230718151346.2512-1-yangshiji66@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYAP286MB0315:EE_|OS3P286MB2215:EE_ X-MS-Office365-Filtering-Correlation-Id: a2ffe219-22da-43af-eea4-08db87a1ea64 X-MS-Exchange-SLBlob-MailProps: 9IecXKUgicDvYya0XF0tkOtrlBp/mHl3nDh0vrcNBF+mdsNI54ktcXt8VMBdbQOGC/ZQTfjEWeolhuJ/nwc1u3e2sBrSt4wccnLHNLi+n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MO/Qx3zHDHJLfJ5EDWg5TFAjed3V60uEQpdtXUB8S2KzNPUSGo/v991JLFG0GC893FaIiQS4kbmFt+Xvzh2SEnnpJW/jQk+1kDGhcndBtCJ0G1iyvpHGx1FYcRB0qVsv+6jI0kvpPHw23pr1etPYLHNrtS3MWJxqs8bgOBfEuwKT+/8bM7cp9ZQDjbjgpRWokS2iQ19FnIMW/HjyzeYnIkYTLP5lMq3Q2Y3YEw+4Z9LgJbPrrt9MQoeMPV9YxJ5b+bUgKnQFxVtW3nrDM31ET5YYsV/pjNKo/7aEd2Iq0POSEe2DeZuAzePezNflYSaLhRTF8lVEyZnXgC6QgPhXxaTweK+SnOR5642gAgr2v4rjZ4gVowLVKdhlD9IbQXEnf303XrwVZIy+PaywT5YLhCqcbl1Cj0n5AKL/GszseycEB2tbqT8aDqKLvWC3KD2DqYacsm69d4ESD+EDVi63sfFyQIVQ9U= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a2ffe219-22da-43af-eea4-08db87a1ea64 X-MS-Exchange-CrossTenant-AuthSource: TYAP286MB0315.JPNP286.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jul 2023 15:16:09.9134 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS3P286MB2215 Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org Sometimes when driver fails to probe a device, the kernel will retry it later. However, this will result in duplicate requests for the same pinctrl configuration. In this case, we should not throw error logs. This patch adds extra check for the pin group function. Now the pinctrl driver only prints error log when attempting to configure the same group as different functions. Signed-off-by: Shiji Yang --- drivers/pinctrl/mediatek/pinctrl-mtmips.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/mediatek/pinctrl-mtmips.c b/drivers/pinctrl/mediatek/pinctrl-mtmips.c index efd77b6c5..8f5493220 100644 --- a/drivers/pinctrl/mediatek/pinctrl-mtmips.c +++ b/drivers/pinctrl/mediatek/pinctrl-mtmips.c @@ -125,8 +125,9 @@ static int mtmips_pmx_group_enable(struct pinctrl_dev *pctrldev, /* dont allow double use */ if (p->groups[group].enabled) { - dev_err(p->dev, "%s is already enabled\n", - p->groups[group].name); + if (!p->func[func]->enabled) + dev_err(p->dev, "%s is already enabled\n", + p->groups[group].name); return 0; }