From patchwork Thu Jul 7 07:52:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mattijs Korpershoek X-Patchwork-Id: 12909192 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 A035EC433EF for ; Thu, 7 Jul 2022 07:53:53 +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: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:In-Reply-To:References: List-Owner; bh=wjbiJUZZXfkS+HEIYOf1XoXKFAaiYRHKhRwJsaCSiOE=; b=IbYSXQbEwJPJAL 5eLyJvzaV9/HgBH8NPGFZ6aktxR8cpqx8ITIJT3ZIH0I1q9MgMVDxJBxSPfRw68fJezp9HnohEiS5 stiHNVsoqiu0Xe28gSfZ8oSl2WMZ01RT4tYXNlhscVBBUij0ncjLJ2XEkHI9aZeEVv9i4nOKqyk8L sK62qINRMxc+aFHAWosgky3++P2OxRLqRoHkYGp9q3Bqp72zWZpLmEys2Q9ZjNL939SVAaDmze8zQ 3Ka3QT6x2h3+oOVoANVDiUFTo4B6PPLPE0UP1Qvpjd6bmdVHR2+2+R1qtN16AP71R/JDgj7Cfguvp C1d0wg1xFP0nOkC5DdsQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o9MJd-00EsJQ-Qh; Thu, 07 Jul 2022 07:52:49 +0000 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o9MJX-00Es7p-QL for linux-arm-kernel@lists.infradead.org; Thu, 07 Jul 2022 07:52:46 +0000 Received: by mail-wr1-x430.google.com with SMTP id v16so13656023wrd.13 for ; Thu, 07 Jul 2022 00:52:40 -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:mime-version :content-transfer-encoding; bh=70xtc+uGcQwXm4fuaD/+Dh6Vj8lV/MgZmktrLD3peVk=; b=q+ABpgrDDFIRVVXBzf1fEBgDOZzkcnovjTczwvCHoQEx9EgtVFK1S3cP2uNewqCcTu p46x/EAuzL8Mq8CqKyQKnXaxdbv3t5xEZRPHIX+0v+6H8mmMHaFBVqG/LkKwzDxuMvnC hBFFYWRW6D7mzE+7JF28l0mzOAPa6pzYpJundz2VwprhE2P8uOzoL2H6ZCYKZxy9MJ// BeAQIkrUCwLtgQ8mgVS0wZ1tqgWgPyRDmcXgxyV01Cd757TNNiA/UbgAwSOyR+wXyAvU Qqv9uxflEEFTnsmPUuz5NOh649OaU3wk0Y4VIjLPFzrTqwduxHStzOCezNJdJWkRcmOQ SUdQ== 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:mime-version :content-transfer-encoding; bh=70xtc+uGcQwXm4fuaD/+Dh6Vj8lV/MgZmktrLD3peVk=; b=WESX4ywk8cIMexcbJSlPpASz43ARKVn8kbjON0MdLg0SDBHpHlYDlk0TTI+Ia/KFH5 aZUYeFO6SMkCINbW7GCZoO9wh3R+Ot4WX1s8cBtt59xc3z2pSx2Pk/mZvVezyIdSYrJZ vWKtlA3CvOYqykROwJqZW+Tqypokeq+/n0rd+DcKJ15XkSx0H98ZjgKAnziGFsF2/472 qvNCv/avhHKVd1joFuzdQTw4rpdkHr4LfwTka2dCBE2tIv+uEQzXAq5cpkimCldEkjM6 V+SscKlwGTuQGX57Fa7ul/hKdMp7dxqQxw1f/H+d49Is+8oUCDTqHCg/xNkYJEH6BFHd Z05Q== X-Gm-Message-State: AJIora9Wq85cy9zpwLpniOiADt6Gp+xcFCI4113Adw/4IkojiB81Kx/J miReIMEAFLEj0QsPlU+o2wkdCQ== X-Google-Smtp-Source: AGRyM1sZKaUua+SZ//O7YATU5JaHhkvcrG36JPkNNJpcew0H+3gBJSHXOrAH+5Ri9Sdz2ccf4TInhA== X-Received: by 2002:adf:f34c:0:b0:21d:6705:87dd with SMTP id e12-20020adff34c000000b0021d670587ddmr20717172wrp.430.1657180359439; Thu, 07 Jul 2022 00:52:39 -0700 (PDT) Received: from groot.home ([2a01:cb19:85e6:1900:334b:5931:88c6:bbd2]) by smtp.gmail.com with ESMTPSA id m16-20020adfe950000000b0021d70a871cbsm6972089wrn.32.2022.07.07.00.52.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jul 2022 00:52:39 -0700 (PDT) From: Mattijs Korpershoek To: Dmitry Torokhov Cc: Matthias Brugger , AngeloGioacchino Del Regno , Kevin Hilman , Fabien Parent , linux-input@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Mattijs Korpershoek Subject: [RESEND PATCH v3 0/2] Input: mt6779-keypad - fix hw code logic and row/col selection Date: Thu, 7 Jul 2022 09:52:34 +0200 Message-Id: <20220707075236.126631-1-mkorpershoek@baylibre.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220707_005244_154864_2FB75B51 X-CRM114-Status: UNSURE ( 9.95 ) X-CRM114-Notice: Please train this message. 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 Input: mt6779-keypad - fix hw code logic and row/col selection This serie is the first follow-up on the mt6779-keypad in order to enable it on the MediaTek mt8183-pumpkin board. To fully enable it on mt8183-pumpkin, we still need: * double key support * dts changes To ease up reviewing, I preferred sending this first. The first patch fixes a logic bug based on the (non-public) datasheet I have. The second patch configures the keypad correctly in order to not report bogus values. Thank you, Mattijs Changes in v3: * reworked row/column logic as discussed in [1] * Dropped Angelo's review since patch 1 changed Changes in v2: * Simplified SEL_COL/ROW_MASK macros as suggested by Dmitry * Added Angelo's Reviewed-by on patch 1 Mattijs Korpershoek (2): Input: mt6779-keypad - match hardware matrix organization Input: mt6779-keypad - implement row/column selection drivers/input/keyboard/mt6779-keypad.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) [1] https://lore.kernel.org/r/YpMDZORAlHmg/x/0@google.com base-commit: c4bcc1b99b8b8acdfe673e4701a9c2acb6b8b2fb