From patchwork Fri Oct 21 08:47:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Balsam CHIHI X-Patchwork-Id: 466 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp573603wrr; Fri, 21 Oct 2022 01:56:34 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5A59BUC3zL5RE5Pa/7mHv/pa3u42gZekrQMr2iu2zV+3GE5kXWA+GIBDbg7LiQCOJYru8I X-Received: by 2002:a17:907:2e0d:b0:78e:1d21:8001 with SMTP id ig13-20020a1709072e0d00b0078e1d218001mr14328572ejc.246.1666342594131; Fri, 21 Oct 2022 01:56:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666342594; cv=none; d=google.com; s=arc-20160816; b=VYwoWkx+qYznpe+DLCc2PVGfNWztM2AssbOO7upsi6ab5DZs4HyPlCKMSdqBYcw3co nNuZmVOiQFUpdmQ1lyIN2CksRm9Oo3p3+l8f2vPK1cNVHrqzyOblbylWkdih/QzowX79 duSQPmBio6d1cmDs9LaHYTlHzhPEf88j7h6yaUw6/oC6A/UkXF9OcbE5hTQZwUWVTESN GN+C35jOJRmKvVi1vUALrh+EyXWYF9Jfi3xahkc/XRVf/zqyGjnRueDkboPDWiMI9FFC 65A2pocfQu5NhvV62hLEwDXG7CgqsVwN8sRhaELsI07Sy0uKf6HDmY1aNiDzPPWRWZBe Oa7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=8M+2HNwl7XWGItcQCTiwBk4Uc5IZqpHpGl3TOzAlGns=; b=N10XIbSfsf2TJRZdHoT1OAjOUtmPEvdvhfQsRgS1kOuaLOPUfctPdnaWaNsFT/8KAr ladvP/3o/UKkUTDxg4/aVbhss+WBaAY0eUhuAz34yiA7LELoPJCiPzvh5W9NU4gRcHJY l3aba+SGFnxygCJauuHQX+vX+5AmhtwKRKNx3tcrteKK0Mzry0uhjiFo0zGSbXi4j+yD 3yKKgU0LeXDOo/WwPZzeD2/TbKCCQrhFPcMIETamWBh0Ch09XoSvIdzoh6MQoNO8KDcy Pqwll1U8X0myJRQZf/qMQKgaiKFFf4v29kpuFrTiUo0JucPByhe7t7uEMilq9G0oU0gY 1aaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=c6b8NGeP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nc1-20020a1709071c0100b007820f6b65c6si21386484ejc.469.2022.10.21.01.56.09; Fri, 21 Oct 2022 01:56:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=c6b8NGeP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230300AbiJUIsG (ORCPT + 99 others); Fri, 21 Oct 2022 04:48:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230087AbiJUIsA (ORCPT ); Fri, 21 Oct 2022 04:48:00 -0400 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 367BB141399 for ; Fri, 21 Oct 2022 01:47:58 -0700 (PDT) Received: by mail-wm1-x329.google.com with SMTP id fn7-20020a05600c688700b003b4fb113b86so1559840wmb.0 for ; Fri, 21 Oct 2022 01:47:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=8M+2HNwl7XWGItcQCTiwBk4Uc5IZqpHpGl3TOzAlGns=; b=c6b8NGePdJZgI5zUn5CGAcV7JSaPVOUZ5eGZIO32zysb2gg4Gq2jYEA4/0zJAIq/xA caON2UGCcujNP4oVN/7GnoNUHxfLnjYiTUANOrfbRL32OvhjvV9Hz059fZbvMvnkAfe4 pIUCjwBUyhGknBLtKXXK+UhsiwA3bBXkei0uw+y1x1n+8wex2FimMYlStj0HVgwf0qHP Y7h/DbhbmJtIJMbEHSrnEX82UnoRRvRQGpkycEcodeuCM7W8RGt/t2AsiZaUVckaBwKf pMjzNNjvALGEea705fgPe1uqEFAfYcPgWW9QqvNTEaPdqdZUHNCbvNiumPs00tsfma3j LuxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=8M+2HNwl7XWGItcQCTiwBk4Uc5IZqpHpGl3TOzAlGns=; b=u2QisjtNTJNDb+Fi7Jz3STP9cZNfAKy/7MWvPmKnaeDAGfUFfzKYVHs6fk2tfGl/RL KuIv/3L0CVTBfvsZ5eE1gxTrIpqaZtIaDM3fL8IdGgdyucDYJ0yDXVJL2bH9SARUDhLa /ktN1lxZlfKCaCRb0eDp48qr6xybXJ7hho/MeGKw4ic1lCB5NvVCDdT2FOl4RDEeQj0q z2vsC7kq9gxMG8C97SPBTm1QVglOGabejIxNiJYq6IrgzOqLTO431ks02PPxqh7M8Dm+ Pw4Y/mJ0+R2yUmoMDQ9EfIM9E2V3+eM3wG+ZMt1nNOHGWvivGfWd4oddn1MfVYPMSDiN mUfA== X-Gm-Message-State: ACrzQf3ffuPXReppY3SU4FhN3eFz/tsgbVkrZ1+4MPejSBSvYKgwVqTC MyjLWIE103Q1ptf6iXLSo1JVHg== X-Received: by 2002:a1c:f20e:0:b0:3c2:5062:4017 with SMTP id s14-20020a1cf20e000000b003c250624017mr32194144wmc.175.1666342076033; Fri, 21 Oct 2022 01:47:56 -0700 (PDT) Received: from localhost.localdomain (laubervilliers-657-1-248-155.w90-24.abo.wanadoo.fr. [90.24.137.155]) by smtp.gmail.com with ESMTPSA id k5-20020a05600c0b4500b003c41144b3cfsm2040233wmr.20.2022.10.21.01.47.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Oct 2022 01:47:55 -0700 (PDT) From: bchihi@baylibre.com To: sean.wang@kernel.org, linus.walleij@linaro.org, matthias.bgg@gmail.com Cc: linux-mediatek@lists.infradead.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [v2, 0/2] Fix broken SET/CLR mode of a certain number of pins for MediaTek MT8385 SoC Date: Fri, 21 Oct 2022 10:47:06 +0200 Message-Id: <20221021084708.1109986-1-bchihi@baylibre.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747286852290994578?= X-GMAIL-MSGID: =?utf-8?q?1747286852290994578?= From: Balsam CHIHI On MT8365, the SET/CLR of the mode is broken and some pins won't set or clear the modes correctly. To fix this issue, we add a specific callback mt8365_set_clr_mode() for this specific SoC. This callback uses the main R/W register to read/update/write the modes instead of using the SET/CLR register. This is the original patch series proposed by Fabien Parent . "https://lore.kernel.org/linux-arm-kernel/20220530123425.689459-1-fparent@baylibre.com/" Changelog: Changes in v2 : - Rebase on top of 6.1.0-rc1-next-20221020 - Delete MTK_PINCTRL_MODE_SET_CLR_BROKEN quirk - Add mt8365_set_clr_mode() callback Changes in v1 : - "https://lore.kernel.org/linux-arm-kernel/20220530123425.689459-1-fparent@baylibre.com/" Balsam CHIHI (2): pinctrl: mediatek: common: add mt8365_set_clr_mode() callback for broken SET/CLR modes pinctrl: mediatek: mt8365: use mt8365_set_clr_mode() callback drivers/pinctrl/mediatek/pinctrl-mt8365.c | 18 ++++++++++++++++++ drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 15 +++++++++++++++ drivers/pinctrl/mediatek/pinctrl-mtk-common.h | 8 +++++++- 3 files changed, 40 insertions(+), 1 deletion(-)