Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1052373iob; Wed, 4 May 2022 13:35:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxjr2YOCNmHR+L7boltwPR1jm/Yk+pS0dZbT0/etbQyyG/B+fN8OIlK3tftDYOd83sevWhe X-Received: by 2002:a05:6402:27cc:b0:427:b593:62ef with SMTP id c12-20020a05640227cc00b00427b59362efmr19942959ede.409.1651696558845; Wed, 04 May 2022 13:35:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651696558; cv=none; d=google.com; s=arc-20160816; b=kpWNXO3cZs/3EMPl3//CuXQ2WmC+48EBQhz2OyUu5C4p6MBciHs5Y1658r5Bn3KE8z t5KGVEdCs4U7OoneHlB2CZNssiqQYBlVrm30N/o8rufGxsxBASZIwL6i6jbfN/R6K6eg i13CLMq6RN7IBb3Z36yEv7z9A6Y8OkK/f9P0QkXYyJMjFuE08W5gvA82OePKOoLM7ouq WM/VfXcuV5LBBBgyP1CNM4IoIYHGnumWOGh7Z1G5xSK14kaXxaM/w4Nv+C4Q3yx2EI3g 4qHxaA98pQeEJPuzYwVydXf8AbYHiYB8YhmV+ykEo/LpaHYw9xHyUpMvJJyU0wTgFPAp w3Bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=nhIu0JV8yOZQkA9vmXujMuMdDUXS4WzNXTCCyQJX59o=; b=QIvQtygJtrzR7YkR7BxDaVDVexNg1wJa8SNo+tWrBZ+ET36pP8vnLqDZRt8zG2eHB8 SRJ7cSY3Pvcp51C9WR+nOFx+7CJ9Nkf2LrJk4F7FrjnTMVC/IBqE3ljFtJRitvt4r9Wj 7mtQF6UwdF7oyCKHmSNp7NZLzkHoEep4WV02ryE2solXv87VHEqQ3mYEw5TPfU8rzz1L 6UNJf7Dqdu8M+1bqpNlzH/jv+OXOF8+79RVUuQ3Kn2yT3WAnvgt8HSReZa32iw7oJscM hjO2uCG8kvZC9E+SBYWPROctQWRZtZizbcpQ7vwLG9mK+XJsCHD3+/0OEf6xdIAKg0aq 05pw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g2-20020aa7c582000000b00425d9a15f10si16726247edq.189.2022.05.04.13.35.34; Wed, 04 May 2022 13:35:58 -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; 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 S1351179AbiEDORv (ORCPT + 99 others); Wed, 4 May 2022 10:17:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351123AbiEDORu (ORCPT ); Wed, 4 May 2022 10:17:50 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3399C42490 for ; Wed, 4 May 2022 07:14:14 -0700 (PDT) Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nmFlZ-0001VG-Ix; Wed, 04 May 2022 16:14:09 +0200 Received: from mfe by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1nmFlU-0006LT-3Q; Wed, 04 May 2022 16:14:04 +0200 Date: Wed, 4 May 2022 16:14:04 +0200 From: Marco Felsch To: Gireesh.Hiremath@in.bosch.com Cc: linux-omap@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, bcousson@baylibre.com, tony@atomide.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, dmitry.torokhov@gmail.com, mkorpershoek@baylibre.com, davidgow@google.com, swboyd@chromium.org, fengping.yu@mediatek.com, y.oudjana@protonmail.com, rdunlap@infradead.org, colin.king@intel.com, sjoerd.simons@collabora.co.uk, VinayKumar.Shettar@in.bosch.com, Govindaraji.Sivanantham@in.bosch.com, anaclaudia.dias@de.bosch.com Subject: Re: [PATCH 2/4] Input: mt-matrix-keypad: Add Bosch mt matrix keypad driver Message-ID: <20220504141404.onom7x5lycyg3b22@pengutronix.de> References: <20220504105254.1576-2-Gireesh.Hiremath@in.bosch.com> <20220504134817.1490-1-Gireesh.Hiremath@in.bosch.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220504134817.1490-1-Gireesh.Hiremath@in.bosch.com> User-Agent: NeoMutt/20180716 X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: mfe@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 On 22-05-04, Gireesh.Hiremath@in.bosch.com wrote: > From: Gireesh Hiremath > > The existing matric_keypad.c use different gpio line for row and colunm, > where in mt_matrix_kepad.c use same gpio line for row as well as column. > a key can be placed at each intersection of a unique row number > not equal to a unique column and they are diagonally symmetric. > Advantage of this is with existed gpio line we can get more keys > > example: in matrix_keypad.c for 5 gpio line possible matrix is 2X3 or 3X2 > and maximum possible keys are 6 but > in mt_matrix_kepad.c for same 5 gpio line possible matrix is 5X5 and maximum > possible buttons are 10, below table will discribe that Nobody should stop you to increase the amount of max. possible keys, so this isn't a real block. > ------------------------------------------------------ > |Row\Col |GPIO 0 | GPIO 1 | GPIO 2 | GPIO 3 | GPIO 4 | > ------------------------------------------------------ > | GPIO 0 | X | KEY_9 | KEY_2 | KEY_3 | KEY_1 | > ------------------------------------------------------ > | GPIO 1 | KEY_9 | X | KEY_6 | KEY_5 | KEY_0 | > ------------------------------------------------------ > | GPIO 2 | KEY_2 | KEY_6 | X | KEY_4 | KEY_7 | > ------------------------------------------------------ > | GPIO 3 | KEY_3 | KEY_5 | KEY_4 | X | KEY_8 | > ------------------------------------------------------ > | GPIO 4 | KEY_1 | KEY_0 | KEY_7 | KEY_8 | X | > ------------------------------------------------------ > X - invalid key > KEY_x - preferred key code That should be pointed somewhere very clearly, thanks for the description. Also what is than the benefit of the original matrix_keypad driver? > both matric_keypad.c and mt_matrix_kepad.c logically operate differently, > my openion is not to merge both. IMHO from the user/system-integrator pov it is looking the same and so one driver should be fine. To distinguish between both modes we could add dt-property or add a new dt-compatible like "gpio-matrix-keypad-v2". Regards, Marco