From patchwork Tue Sep 27 06:25:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Krzyszkowiak X-Patchwork-Id: 609898 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 5824FC07E9D for ; Tue, 27 Sep 2022 06:26:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229993AbiI0G0H (ORCPT ); Tue, 27 Sep 2022 02:26:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229910AbiI0GZu (ORCPT ); Tue, 27 Sep 2022 02:25:50 -0400 Received: from comms.puri.sm (comms.puri.sm [159.203.221.185]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 204EE5301F; Mon, 26 Sep 2022 23:25:48 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by comms.puri.sm (Postfix) with ESMTP id 017EBDFB29; Mon, 26 Sep 2022 23:25:18 -0700 (PDT) Received: from comms.puri.sm ([127.0.0.1]) by localhost (comms.puri.sm [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1rXqicgzvIOQ; Mon, 26 Sep 2022 23:25:17 -0700 (PDT) From: Sebastian Krzyszkowiak DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=puri.sm; s=comms; t=1664259917; bh=elzvasrQIRaQ/TMI2xT9N+8/vihR2HHiUa+rWtzD5sI=; h=From:To:Cc:Subject:Date:From; b=oIF4cevGTawKs0GUNKcLE2Nt9u2+LJnf9t2ihXA59s8qrXGs3ugs2iL8/r2OWCFcj WTUVKGhGDuLuZOI3byvD46aCKm4qhPModlg0NCJyOzURJiqub++RkylnDwI5ecDcyw 14Zg74OuypULQ+MCm1wWm5Q9E7Wam48lU3deRIoLDeftcab0ZyD5x/r06+tTjn46VE EH7/gno+FrS8+EhSvfd1z9RbfFtMAYd9l99swrxhVtvbAX099TOrtuwQazlf5P8JWf EuxLYrcBLvJsOojL9mgnwerlY+8rfqibAax/mMsSTX2PRRWbFlNkxKrV5bLAly5aZq kge6JgMwglsYw== To: Dmitry Torokhov , linux-input@vger.kernel.org Cc: Sebastian Krzyszkowiak , Robin van der Gracht , linux-kernel@vger.kernel.org, kernel@puri.sm, Uwe =?iso-8859-1?q?Kleine-K=F6nig?= , stable@vger.kernel.org, Martin Kepplinger Subject: [PATCH v2 RESEND] input: keyboard: snvs_pwrkey: Fix SNVS_HPVIDR1 register address Date: Tue, 27 Sep 2022 08:25:12 +0200 Message-ID: <4599101.ElGaqSPkdT@pliszka> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Both i.MX6 and i.MX8 reference manuals list 0xBF8 as SNVS_HPVIDR1 (chapters 57.9 and 6.4.5 respectively). Without this, trying to read the revision number results in 0 on all revisions, causing the i.MX6 quirk to apply on all platforms, which in turn causes the driver to synthesise power button release events instead of passing the real one as they happen even on platforms like i.MX8 where that's not wanted. Fixes: 1a26c920717a ("Input: snvs_pwrkey - send key events for i.MX6 S, DL and Q") Cc: Tested-by: Martin Kepplinger Signed-off-by: Sebastian Krzyszkowiak --- Resent <20220321171755.656750-1-sebastian.krzyszkowiak@puri.sm> v2: augmented commit message; added cc: stable and tested-by --- drivers/input/keyboard/snvs_pwrkey.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/keyboard/snvs_pwrkey.c b/drivers/input/keyboard/snvs_pwrkey.c index 65286762b02a..ad8660be0127 100644 --- a/drivers/input/keyboard/snvs_pwrkey.c +++ b/drivers/input/keyboard/snvs_pwrkey.c @@ -20,7 +20,7 @@ #include #include -#define SNVS_HPVIDR1_REG 0xF8 +#define SNVS_HPVIDR1_REG 0xBF8 #define SNVS_LPSR_REG 0x4C /* LP Status Register */ #define SNVS_LPCR_REG 0x38 /* LP Control Register */ #define SNVS_HPSR_REG 0x14