From patchwork Thu Jun 23 03:53:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff LaBundy X-Patchwork-Id: 584384 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 F3854CCA47C for ; Thu, 23 Jun 2022 04:45:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232388AbiFWEpT (ORCPT ); Thu, 23 Jun 2022 00:45:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244189AbiFWDxm (ORCPT ); Wed, 22 Jun 2022 23:53:42 -0400 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2060.outbound.protection.outlook.com [40.107.102.60]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 632E7EE07; Wed, 22 Jun 2022 20:53:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UeVk4nFviqvXbIJciXUIPEnGQ0rTf9aKDl2T1/QjtUsJH4zREdOj5KesPqz9u5Re8LuLF3seXLMawCpRgj7/ON2wRU9cmJEpUZtqVLUq4z+16kE3bOmzFedV48ThqCs/2vm38pTZe3zBdK+WKcL4RoLURPsHnXu7WC4tx5pqwWlHEpA2LXg4ARPWvkUNunWmEspxNkKT6NfnK9QudHJJZhAQ3KDlPzIrdLGKcVoh/3XYW6CfVm0dYJUAA/iBeROj+4UxPJLpGvztEefcHgRamRGs4QWHfDvduhSVFZyp8gquU/BUCA5HaiaD9jqyYviZ66saK62pusbAaCp4XED0Vw== 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=cbftze5G0Bnz8w5vLabtU8ziJ2bL7OUa1ew64sv+6Nk=; b=K1bfwwX3QJnI1hqUMTNMhtL3nayzjdTG1J+V0bRiz/CbeGJgYX4XtZnyBdw7umlERjNAaN+C6qFT1VkwMd35uc9//Kyvbw0QyJ7dFWlCY0QhTqwBtHaZrWnP3EXISwdBRlSNhmtvSc1eY1cYhNTxnqG+Odd4m8rCQW0itEPmIBllU0VwbJrS09FpbodNQS3FRm6uECRrT715ET/lH1pUrIYHUgYIdZnrRT2sj6aTMGEuC3muWSEL1QCkEsMEISbURMjwX+ldWJB95ung+nvCkGhL6OR8R4khGALvBkf78FriAlmc8imcd5++fWr+eCJNGC36eVHaLV18zq3ivmAaJQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=labundy.com; dmarc=pass action=none header.from=labundy.com; dkim=pass header.d=labundy.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NETORG5796793.onmicrosoft.com; s=selector1-NETORG5796793-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cbftze5G0Bnz8w5vLabtU8ziJ2bL7OUa1ew64sv+6Nk=; b=KzF2cVbW6fmD07ORxSvKME5DyQR0p68/wUtv/t38nMWJnEZZoXMe/UfDcMqdTc3IOGYyOJmqiJ8wL4DyelANZrhmdRXqUZftSEtmgXpL3KNnumLTKw4/JahkUIQYvtXwq+DVzZiVOOCZ/hvXHEd7SyNUAb/ONe00QCSmNU/ESCQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=labundy.com; Received: from SN4PR0801MB3774.namprd08.prod.outlook.com (2603:10b6:803:43::21) by SJ0PR08MB7766.namprd08.prod.outlook.com (2603:10b6:a03:3db::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.16; Thu, 23 Jun 2022 03:53:35 +0000 Received: from SN4PR0801MB3774.namprd08.prod.outlook.com ([fe80::ccb4:7984:aaf2:e18f]) by SN4PR0801MB3774.namprd08.prod.outlook.com ([fe80::ccb4:7984:aaf2:e18f%6]) with mapi id 15.20.5353.022; Thu, 23 Jun 2022 03:53:35 +0000 From: Jeff LaBundy To: dmitry.torokhov@gmail.com, robh+dt@kernel.org Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org, Jeff LaBundy Subject: [PATCH 1/7] Input: iqs7222 - fortify slider event reporting Date: Wed, 22 Jun 2022 22:53:03 -0500 Message-Id: <20220623035309.39528-2-jeff@labundy.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220623035309.39528-1-jeff@labundy.com> References: <20220623035309.39528-1-jeff@labundy.com> X-ClientProxiedBy: SN4PR0701CA0001.namprd07.prod.outlook.com (2603:10b6:803:28::11) To SN4PR0801MB3774.namprd08.prod.outlook.com (2603:10b6:803:43::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2e88848a-b4da-4db5-a46f-08da54cbf298 X-MS-TrafficTypeDiagnostic: SJ0PR08MB7766:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZgndUEYvM+S+EAkrn+o5k0BWCIZqD5KSgOlA3xWya43FEPf4UNnk0ZtqEt9bhYuj1wSgBoVt20zOsjZUSjX+jHyIB6S6xzNOAbyJtmMyk3ztB35yMZyZ1dWieIUJLs1rRz2r2yn136LwPMqlzElyPNP4RCkfSC7XL2nIJYFepcAq0aUvejp0sRKdt6ic325I3dovgDP52LVTCioYWV/WOqB8eo9BPt0uW+LtA+99hBSp7AlnNpQq7k7QL4AbNl9VluPplJVZh5v5TA3yoEOUP9jPyAjAgTUQSs8OmGR0IbEufBLl1XkS9ZDf+2in599ZevGhXN+YbupaXsZz5Bo1AA/H51+AB9blKR54ucs7y16qkrBlCcGsPc7BB4OvAqFNrtOzA5gam63VmckzM9142Sj2HcK7lv9IK6kTGB6D8IejoP61dHAWM5gV8bC35jpjGVA2r3S8fx/9pGy+b+jvgWvgtZd6lQz7Cvs2apy+LYHx7L5eT+YauGdcw3cuLujO9yF+W0Iydgp8mviHUqOi5q5oqxdVLQF9Xbilt3U7aFtuBoVJhvnriOt7zVJsyApKxKi3s0JkPKfmlD78OQ/MgL5IBJ8aNBC/tzRUKwYw19U9zWeoEvsZMbEPhJNnQ9TCziCT5aoBvR7FTh1DIAfIw7ZWD9vtZjj+pc5FUqCSMqzvfKv3nDMRDlZQX+YYWf30BGCZdin0LQutcGbRSrUYcnYUlG2UIERl7hvzXa0ffm5mIhia7e51REafRdwR+IYA X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN4PR0801MB3774.namprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(136003)(396003)(346002)(366004)(39830400003)(376002)(52116002)(26005)(6506007)(107886003)(38350700002)(36756003)(186003)(5660300002)(2906002)(1076003)(6666004)(83380400001)(41300700001)(38100700002)(66946007)(2616005)(6512007)(86362001)(4326008)(8676002)(66556008)(8936002)(316002)(66476007)(478600001)(6486002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: EjSpK/0lXZnjaAtCKel9euL8L1JWTkcoTOX4jcMqPP05cKEmPgXDvx1JQxRXzek/9sZo4reHHJj9Jt0RxFL40yRDj5eD6DVjYjuHSK2SUNYaDDL/K9Pee/Tz1RS3pUDqcgXMtYBanYc8idVqGAR6lcCxnZZycMacZ6WoPXoJrQKyyWRqTLXV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flHNSTOY2N41RdfZn/2xjqZjakL2WOjuRdh5hPSB09xCx+4BpceaYGnkwc3uvgGCHdN4UpDMZGvUED/AL5DUfYVFX3F15XDTH7qZZqU2enWgW5HgG0ssVGb6rGMeyrZ8ds0FgxHa2ve/7dk5wJ7C7HG8F+uy/o2KtOj6PUd0pNkLQ53FRI0+r/0t8QKtHVuFbBOimbiu6hOMqC1f3g2Wtwkd3ppIu5N+sMsP+thaDuOOcuftWmyNjAOKHv8mfncKEmf9CfvJpoCdU8ZurwdKcv55oY74uZ4Dphc+Ydp97BWgu7c+vYGuh6q04sLBszp1yvEfApuJZpsog2yzoySuE0ecdqoJQHLEE+VyCuGanS3vhrekBQV+oiDWq9ZRTOWat3XgYLmgnDtOEviBb7WXNx6KkegFFCFCyR+8G6eA+G3Fwh1m/mfW7LyjtXfY4Akcwt2mEEf2W/UbG86lNFno9NnMg== X-OriginatorOrg: labundy.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2e88848a-b4da-4db5-a46f-08da54cbf298 X-MS-Exchange-CrossTenant-AuthSource: SN4PR0801MB3774.namprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jun 2022 03:53:35.2780 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 00b69d09-acab-4585-aca7-8fb7c6323e6f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: mj/OEqdD01odZsI2d5j3iHJJRD1JRJYqbJjOREu2hK5Q6vo95QpVqQbcp3TJ5oOA0rZhNe2eAVirxei2p1LUMg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR08MB7766 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The release cycle of any key mapped to a slider gesture relies upon trailing interrupts generated by other unmasked sources, the timing and presence of which are inconsistent. To solve this problem, explicitly report a release cycle to emulate a full keystroke. Also, unmask touch interrupts if the slider press event is defined; this ensures the device reports a final interrupt with coordinate = 0xFFFF once the finger is lifted. As part of this change, use the device's resolution rather than its number of interrupt status registers to more safely determine if it is capable of reporting gestures. Last but not least, make the code a bit simpler by eliminating some unnecessarily complex conditional statements and a macro that could be derived using information that is already available. Fixes: e505edaedcb9 ("Input: add support for Azoteq IQS7222A/B/C") Signed-off-by: Jeff LaBundy --- drivers/input/misc/iqs7222.c | 66 ++++++++++++++++++++++-------------- 1 file changed, 40 insertions(+), 26 deletions(-) diff --git a/drivers/input/misc/iqs7222.c b/drivers/input/misc/iqs7222.c index 6b4138771a3f..6cfabd6e3a15 100644 --- a/drivers/input/misc/iqs7222.c +++ b/drivers/input/misc/iqs7222.c @@ -40,7 +40,6 @@ #define IQS7222_SLDR_SETUP_2_RES_MASK GENMASK(15, 8) #define IQS7222_SLDR_SETUP_2_RES_SHIFT 8 #define IQS7222_SLDR_SETUP_2_TOP_SPEED_MASK GENMASK(7, 0) -#define IQS7222_SLDR_SETUP_3_CHAN_SEL_MASK GENMASK(9, 0) #define IQS7222_GPIO_SETUP_0_GPIO_EN BIT(0) @@ -54,6 +53,9 @@ #define IQS7222_SYS_SETUP_ACK_RESET BIT(0) #define IQS7222_EVENT_MASK_ATI BIT(12) +#define IQS7222_EVENT_MASK_SLDR BIT(10) +#define IQS7222_EVENT_MASK_TOUCH BIT(1) +#define IQS7222_EVENT_MASK_PROX BIT(0) #define IQS7222_COMMS_HOLD BIT(0) #define IQS7222_COMMS_ERROR 0xEEEE @@ -135,12 +137,12 @@ struct iqs7222_event_desc { static const struct iqs7222_event_desc iqs7222_kp_events[] = { { .name = "event-prox", - .enable = BIT(0), + .enable = IQS7222_EVENT_MASK_PROX, .reg_key = IQS7222_REG_KEY_PROX, }, { .name = "event-touch", - .enable = BIT(1), + .enable = IQS7222_EVENT_MASK_TOUCH, .reg_key = IQS7222_REG_KEY_TOUCH, }, }; @@ -1957,8 +1959,8 @@ static int iqs7222_parse_sldr(struct iqs7222_private *iqs7222, int sldr_index) int num_chan = dev_desc->reg_grps[IQS7222_REG_GRP_CHAN].num_row; int ext_chan = rounddown(num_chan, 10); int count, error, reg_offset, i; + u16 *event_mask = &iqs7222->sys_setup[dev_desc->event_offset]; u16 *sldr_setup = iqs7222->sldr_setup[sldr_index]; - u16 *sys_setup = iqs7222->sys_setup; unsigned int chan_sel[4], val; error = iqs7222_parse_props(iqs7222, &sldr_node, sldr_index, @@ -2003,7 +2005,7 @@ static int iqs7222_parse_sldr(struct iqs7222_private *iqs7222, int sldr_index) reg_offset = dev_desc->sldr_res < U16_MAX ? 0 : 1; sldr_setup[0] |= count; - sldr_setup[3 + reg_offset] &= ~IQS7222_SLDR_SETUP_3_CHAN_SEL_MASK; + sldr_setup[3 + reg_offset] &= ~GENMASK(ext_chan - 1, 0); for (i = 0; i < ARRAY_SIZE(chan_sel); i++) { sldr_setup[5 + reg_offset + i] = 0; @@ -2120,7 +2122,13 @@ static int iqs7222_parse_sldr(struct iqs7222_private *iqs7222, int sldr_index) * coordinate field reports 0xFFFF and has no explicit enable * control. */ - if (!iqs7222_sl_events[i].enable || reg_offset) + if (!iqs7222_sl_events[i].enable) { + if (dev_desc->event_offset) + *event_mask |= IQS7222_EVENT_MASK_TOUCH; + continue; + } + + if (reg_offset) continue; sldr_setup[9] |= iqs7222_sl_events[i].enable; @@ -2131,10 +2139,8 @@ static int iqs7222_parse_sldr(struct iqs7222_private *iqs7222, int sldr_index) if (error) return error; - if (!dev_desc->event_offset) - continue; - - sys_setup[dev_desc->event_offset] |= BIT(10 + sldr_index); + if (dev_desc->event_offset) + *event_mask |= (IQS7222_EVENT_MASK_SLDR << sldr_index); } /* @@ -2299,29 +2305,37 @@ static int iqs7222_report(struct iqs7222_private *iqs7222) input_report_abs(iqs7222->keypad, iqs7222->sl_axis[i], sldr_pos); - for (j = 0; j < ARRAY_SIZE(iqs7222_sl_events); j++) { - u16 mask = iqs7222_sl_events[j].mask; - u16 val = iqs7222_sl_events[j].val; + input_report_key(iqs7222->keypad, iqs7222->sl_code[i][0], + sldr_pos < dev_desc->sldr_res); - if (!iqs7222_sl_events[j].enable) { - input_report_key(iqs7222->keypad, - iqs7222->sl_code[i][j], - sldr_pos < dev_desc->sldr_res); - continue; - } + /* + * A maximum resolution indicates the device does not support + * gestures, in which case the remaining fields are ignored. + */ + if (dev_desc->sldr_res == U16_MAX) + continue; - /* - * The remaining offsets represent gesture state, and - * are discarded in the case of IQS7222C because only - * absolute position is reported. - */ - if (num_stat < IQS7222_MAX_COLS_STAT) - continue; + if (!(le16_to_cpu(status[1]) & IQS7222_EVENT_MASK_SLDR << i)) + continue; + + /* + * Skip the press/release event, as it does not have separate + * status fields and is handled separately. + */ + for (j = 1; j < ARRAY_SIZE(iqs7222_sl_events); j++) { + u16 mask = iqs7222_sl_events[j].mask; + u16 val = iqs7222_sl_events[j].val; input_report_key(iqs7222->keypad, iqs7222->sl_code[i][j], (state & mask) == val); } + + input_sync(iqs7222->keypad); + + for (j = 1; j < ARRAY_SIZE(iqs7222_sl_events); j++) + input_report_key(iqs7222->keypad, + iqs7222->sl_code[i][j], 0); } input_sync(iqs7222->keypad); From patchwork Thu Jun 23 03:53:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff LaBundy X-Patchwork-Id: 584386 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 71F2EC43334 for ; Thu, 23 Jun 2022 04:45:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231216AbiFWEo5 (ORCPT ); Thu, 23 Jun 2022 00:44:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244213AbiFWDxq (ORCPT ); Wed, 22 Jun 2022 23:53:46 -0400 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2042.outbound.protection.outlook.com [40.107.102.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 844866439; Wed, 22 Jun 2022 20:53:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eDoD2iueB7bjNIYAZJr2pcdlGFj8D40wQsAiSXD7ZXnR5RdtGvr91UFDSu5oEO3+0QQs6dzzMKjAbrJzjdmsnlzyKfxgzdQNz8SU1MZnozzIEsF1OwfmuktnKMvlTdkVL5k7KdZPqQcm6KapEXPFdna1XQreYzu7fGQkR6ThKO7P6Ro/ilzHsli3UaA/vH1r7wBRWdz8CmdJoA4rNlMtGBA56KAWXYxUScoYirrd4SmQqRyPs/7SXnPPRmmSzgoKPCI3RqyL8dEdG4gUS19t3XzHojAcs5xEA5cTlGX3UqBoseVMpxWcS4QkNzA6VvTmsnQdB/i39cetC1kOI6E/jw== 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=I7PLB+QvUvPJG89baGRQ5Rr1/8qMQOZQ1C9w/BRCyMM=; b=VGjDpe7md6JAwt3nYT1WvA7sRlFSnG3pGvVkNfLxSHA9oxD4hBf+2h5U3fpTeu9jv77N4Qhx7zoCH96s3n7a7BsUWO3ArFiwXzhjNqpvNuijbLeb8o6ukgo0AYCTK4x80/Rgfh6bFzjwXiU4EBfHy1pfWFOvPtKXJkLKb3chQG+CSDpfBaDzdGSsPZbZY8kIz20bVQqh/tgPb8cLtU1RNfL9ekL7ZSu5C+2g32/M+qzv8O/JfKsmAWwBKvPn2pgGJIbWP1Pwf6Mqai3pDIYvnvKgxCk1DDMFP9UciBTlmD6l/RnWU2S0731eR/XoHO63MRy3oY/dUyTHbacGIWeDQA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=labundy.com; dmarc=pass action=none header.from=labundy.com; dkim=pass header.d=labundy.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NETORG5796793.onmicrosoft.com; s=selector1-NETORG5796793-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=I7PLB+QvUvPJG89baGRQ5Rr1/8qMQOZQ1C9w/BRCyMM=; b=Lak+MVOenpaXstQaLDEvLrF43a9FBQw2KKqDC87IPZGF30t3Sy7caR4uuUkQtRTy7kf1Rcp7J+yC+YUseKQkUjxnOhycMSu4vO7vaUO7q1VTLJFKEN82ghVedPxZ/FRnjHHHhMeTpnLJ34qSCEjU6SEhY7qDj+QHyLpwGGkOXzQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=labundy.com; Received: from SN4PR0801MB3774.namprd08.prod.outlook.com (2603:10b6:803:43::21) by SJ0PR08MB7766.namprd08.prod.outlook.com (2603:10b6:a03:3db::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.16; Thu, 23 Jun 2022 03:53:43 +0000 Received: from SN4PR0801MB3774.namprd08.prod.outlook.com ([fe80::ccb4:7984:aaf2:e18f]) by SN4PR0801MB3774.namprd08.prod.outlook.com ([fe80::ccb4:7984:aaf2:e18f%6]) with mapi id 15.20.5353.022; Thu, 23 Jun 2022 03:53:43 +0000 From: Jeff LaBundy To: dmitry.torokhov@gmail.com, robh+dt@kernel.org Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org, Jeff LaBundy Subject: [PATCH 2/7] Input: iqs7222 - protect volatile registers Date: Wed, 22 Jun 2022 22:53:04 -0500 Message-Id: <20220623035309.39528-3-jeff@labundy.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220623035309.39528-1-jeff@labundy.com> References: <20220623035309.39528-1-jeff@labundy.com> X-ClientProxiedBy: SN4PR0701CA0001.namprd07.prod.outlook.com (2603:10b6:803:28::11) To SN4PR0801MB3774.namprd08.prod.outlook.com (2603:10b6:803:43::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: da79c9e5-9bb6-4d47-68bd-08da54cbf745 X-MS-TrafficTypeDiagnostic: SJ0PR08MB7766:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mpZHcjXzIFwJDKRE+XsW0IOWpNHjEzi0x+BNQh3yiCgj0MJZP7mvrJaP3sdyNE/VVJ+n6ZuoBor9e0+3na6nNz/HbyMfHuUCYpmf+f+b3oYklNJz3tSP8o55lLpnCWzB03VjAf6gduKKlM/hpzthAc/WkGZ5kOL3OB3NExrxgCc4RoitIK2lO2ZSFOXQrfWbAufbjT0dpCow0bkZj9ByjXidVAFWr+lJbjJkL/f2GtQNm3KzCYyafOQGhDcNDVRnetPXLQb3lsRC9rG3RVCD18CkoimohyuLCmIS+Fz4Y+scWpYEfjPbrAWbvzFATXi24kwK7i+eLc/VlUi6YZU4lux2NzcEfRDYX+oqY5KMNPJK9ovuSeR2pRbIQG0vt9b+jMGoWiJqFyU4tYLbfLkCriOM0g96uaV7539VhI70v1d5TCWdGJQ1srjBUFQipDn8MXvuS4eddS1RU8rvD6y44WdOdlj7lChrVmoPFi37MugU5KBORplToJIVFZDsGssm3u+dO+mQgq6SbGPUOAlARf4ccVnWiqg8RIpYlNSauVsoFYuBPf/v0nBkDBQy8r+2J8H0IT1lqk4vgk5LVYk2/OJmjJTsZtEyMbY+KuhA2E+66hX2nq18Yjdx9o1aqmo7cC77Le0hvTMRm3xloOr8t6KndtTCxdcd5iCjTjn6VHC2YJsT4GARNbEEVk9NaqGXWlOfXzQIr31SJVhBJe3o4Xmr2roFwgSdMZnT08YFeL7/x2tBUsXmHrMZkZE/k+Tt X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN4PR0801MB3774.namprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(136003)(396003)(346002)(366004)(39830400003)(376002)(52116002)(26005)(6506007)(107886003)(38350700002)(36756003)(186003)(5660300002)(2906002)(1076003)(6666004)(83380400001)(41300700001)(38100700002)(66946007)(2616005)(6512007)(86362001)(4326008)(8676002)(66556008)(8936002)(316002)(66476007)(478600001)(6486002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: wB6hLSXoNrkqTQ3fc9AuFpE6CZrzfEMsFvopp3cTQnv1p4seI5kDeOYAhvPVG+Wnih2dl+00roz6AnEJxXUQNmfgn6WECtn1jVOZEDQ+b5mPKnAkmS9XHxAuaju/ZqvUPk8cJ2PhvnPeW8tY6PP3LxdKZIkdmGd509G2gM9JcDJplUDebPPozLPGTf2jb4bclgrKHhsh+xPHngKrGVvcn8f17p7i2hF1JWpMr2V3+QZHOq2UgRTNxsRXGnuAkxrfLR3MrOCg7XRNfR3kSNQHGKwvH6Z+Dr3Ob2a6r0lDtCWcSZXSQJ6wrpeVASHJB+USVpn0YMsJUSlRwbVhA8VqWqIkFm4d1IjnmZnxzlLq5zWlx9UB3Ff++43nnuysLICgHwNNh25AAuZcAe5ro4Irst6vZs3l5K0Dp5NQAscCeOf0E9FWeNIVOgCiHeRrgWbdDyAhpcuHt/D930L9NMVJoihanpxASqmrQkD+ntcPIDRFt4fcJH/BZgHBIq3DUOYxMMIiNrZQNVyN1rXdgW9T22/1MKCb+60a8SYJ/QXe8e5e5LEww8U/ufoL4qz3Ty7jdndddWrQVCCQgmx60PW8e9Nelwnci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aHe0flyBHmtYMHtByMAE8gKZw8Txtj1OIb7xouGaqmO2W8cugRZGxJMobCokTxHPAzABBA== X-OriginatorOrg: labundy.com X-MS-Exchange-CrossTenant-Network-Message-Id: da79c9e5-9bb6-4d47-68bd-08da54cbf745 X-MS-Exchange-CrossTenant-AuthSource: SN4PR0801MB3774.namprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jun 2022 03:53:43.1368 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 00b69d09-acab-4585-aca7-8fb7c6323e6f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: pS0S30OMsdgQRHQvd1AD6MCghojBCpT/EQejoYuxVRgrUpRp6h3LJi3bgvtfD9Vuiyc256mXPjGFGzP4EFruxw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR08MB7766 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Select variants of silicon silently mirror part of the event mask register to the system setup register (0xD0), and vice versa. For the following sequence: 1. Read registers 0xD0 onward and store their contents. 2. Modify the contents, including event mask fields. 3. Write registers 0xD0 onward with the modified contents. 4. Write register 0xD0 on its own again later, using the contents from step 1 to populate any reserved fields. ...the event mask register (e.g. address 0xDA) has been corrupted by writing register 0xD0 with contents that were made stale after step 3. To solve this problem, read register 0xD0 once more between steps 3 and 4. When register 0xD0 is written during step 4, the portion which is mirrored to the event mask register already matches what was written in step 3. Fixes: e505edaedcb9 ("Input: add support for Azoteq IQS7222A/B/C") Signed-off-by: Jeff LaBundy --- drivers/input/misc/iqs7222.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/drivers/input/misc/iqs7222.c b/drivers/input/misc/iqs7222.c index 6cfabd6e3a15..ed5989093713 100644 --- a/drivers/input/misc/iqs7222.c +++ b/drivers/input/misc/iqs7222.c @@ -1274,9 +1274,22 @@ static int iqs7222_ati_trigger(struct iqs7222_private *iqs7222) struct i2c_client *client = iqs7222->client; ktime_t ati_timeout; u16 sys_status = 0; - u16 sys_setup = iqs7222->sys_setup[0] & ~IQS7222_SYS_SETUP_ACK_RESET; + u16 sys_setup; int error, i; + /* + * The reserved fields of the system setup register may have changed + * as a result of other registers having been written. As such, read + * the register's latest value to avoid unexpected behavior when the + * register is written in the loop that follows. + */ + error = iqs7222_read_word(iqs7222, IQS7222_SYS_SETUP, &sys_setup); + if (error) + return error; + + sys_setup &= ~IQS7222_SYS_SETUP_INTF_MODE_MASK; + sys_setup &= ~IQS7222_SYS_SETUP_PWR_MODE_MASK; + for (i = 0; i < IQS7222_NUM_RETRIES; i++) { /* * Trigger ATI from streaming and normal-power modes so that @@ -2233,9 +2246,6 @@ static int iqs7222_parse_all(struct iqs7222_private *iqs7222) return error; } - sys_setup[0] &= ~IQS7222_SYS_SETUP_INTF_MODE_MASK; - sys_setup[0] &= ~IQS7222_SYS_SETUP_PWR_MODE_MASK; - sys_setup[0] |= IQS7222_SYS_SETUP_ACK_RESET; return iqs7222_parse_props(iqs7222, NULL, 0, IQS7222_REG_GRP_SYS, From patchwork Thu Jun 23 03:53:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff LaBundy X-Patchwork-Id: 584387 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 8EC12C43334 for ; Thu, 23 Jun 2022 04:44:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232262AbiFWEow (ORCPT ); Thu, 23 Jun 2022 00:44:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244267AbiFWDyD (ORCPT ); Wed, 22 Jun 2022 23:54:03 -0400 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2065.outbound.protection.outlook.com [40.107.102.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E612D6439; Wed, 22 Jun 2022 20:53:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hscW5AZPitPjofS2KRmwOWgpb6Dod1Pxc8smFCCwJCqQt2WTnahQW0ZlZWHU7h/1jF352TPwM4NXydTgDOfbm2Yg/W8FE5hJENfc5hPCxPc01xE61rnjxhNxAHuXMNFAjy/m0WWsSw33JidDHpWcQnwQoPXVM/sh+EG48rvdxITj4kKeWZMOFmFaYG5+jMPoVgfJKlKK3VjJYIZb8qlJGbKV1XW7MjZrQx4jFIy0//NyitI3O7ObuudTbfkKSYLZN9x4+o2Bl20/NGjaSP8XCOKWXwK6OCt2aDZwfz5E0tyjaRRYr2trLxjmn2pFw/rsB2TIo+CVk0YnQTi9P94f2A== 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=wquhuBxbVZrQty6Ue0aWfMJsWyK2tD0m23x4C+fZRho=; b=cVlo84jsMCjzED3WpAukE2dhw7ulCbDgnlQLmtnP/xIsendSpIz7bB6drg7NpdCXRG1ZokvGVyLUwroMKDIC6A+abjUakK79lFSYjDXXqpKnjYyfpI+RnhQdIPwFqIkARFrLhgDfv3cxLw/vJK2fT6+MpWmzz8QRlV54Q3f/tBQ0yOuzEY7VWvnEWYU30RXIRUkXSgK/tU5lYj5ooRP+wts7DurGDfkbQxD2PtEJToRTH6t87PRKX796Hh81ECQ1Z+mUsGRykN7vQzVruIOVwIsNuA8XvM+am9bwe4h/uiAJBrOn7NxxWAePORyO6BzMqvHejzckbKxf2tAZSThE1A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=labundy.com; dmarc=pass action=none header.from=labundy.com; dkim=pass header.d=labundy.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NETORG5796793.onmicrosoft.com; s=selector1-NETORG5796793-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wquhuBxbVZrQty6Ue0aWfMJsWyK2tD0m23x4C+fZRho=; b=NiIR1ZttUbWMPtKIw/xv8RCP0r2kZ/UccABfPnO837xQhWjqrVqmiUqdKtkxfUX6VeNRZcHt+Yd1l2Z90Kw1HbtqdrEE/UZ8mZkt+z+1FguGm5igrY1/QyFluPem70JEs6BMLV6CRAAs0WfCWz1xWsdU+nAsEAbT+LtXqZKnbmw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=labundy.com; Received: from SN4PR0801MB3774.namprd08.prod.outlook.com (2603:10b6:803:43::21) by SJ0PR08MB7766.namprd08.prod.outlook.com (2603:10b6:a03:3db::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.16; Thu, 23 Jun 2022 03:53:58 +0000 Received: from SN4PR0801MB3774.namprd08.prod.outlook.com ([fe80::ccb4:7984:aaf2:e18f]) by SN4PR0801MB3774.namprd08.prod.outlook.com ([fe80::ccb4:7984:aaf2:e18f%6]) with mapi id 15.20.5353.022; Thu, 23 Jun 2022 03:53:58 +0000 From: Jeff LaBundy To: dmitry.torokhov@gmail.com, robh+dt@kernel.org Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org, Jeff LaBundy Subject: [PATCH 5/7] Input: iqs7222 - remove support for RF filter Date: Wed, 22 Jun 2022 22:53:07 -0500 Message-Id: <20220623035309.39528-6-jeff@labundy.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220623035309.39528-1-jeff@labundy.com> References: <20220623035309.39528-1-jeff@labundy.com> X-ClientProxiedBy: SN4PR0701CA0001.namprd07.prod.outlook.com (2603:10b6:803:28::11) To SN4PR0801MB3774.namprd08.prod.outlook.com (2603:10b6:803:43::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 98acf426-595d-46dd-2ece-08da54cc007b X-MS-TrafficTypeDiagnostic: SJ0PR08MB7766:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: imw2PTifBgCAfTQVFVjrCSSUASKX9eknhy2Ga8EZZ6UjrOjoyXcpiMGpFqtj/M+Ju75Y3XvjqXA/6wD+VKrvcuPXa+iVsfgXGAuzB+48htkjrWj5FF15GRKuvZzqJ9LAzyT4+dXRIqxJRYx3N/OYbZyx9D6yIi9cV1e660xFPmfLCxKgy0pR1AtzIqBvXUcXcue4DO+tsfp8FRoVtvNN5f/ApLPMr7VS5YEtjWPe9yyHc5pS6UlITO5gJKl2w7qSoy+Wz5Q2BJ2QeV7Kxh3GetvG8coh7UD+qjRQqZEnmuQe8mD5HM9Dvmx0fPR3/IQsGResahauxPC+kkEzl0V8h+bAuIw34N73DcU+1VuJCozUaUtlCXZBfYtks81ldQvEf+FdyU36vaFVhcLysn4PzvvSHZxoEksDGp4vPqyVX25hL6Ib7BAoii38ooIm7KScbPWioUVHTcZbwCKa5k8jLyrPvc1L6L6gyCaXw1Kb1KPYvQtrvARShA5CbDndyOllHBIY+9VLNLW80TxkQmXbAvRM3CX+04xLyycGRNQzLywYaRKJsg3DNveYIwWwWm99F9SW2QTJPv6gWZms7cm0vqqHEweUozdrPzJmM6PeWwwweAfDiNmRTe8AdHlFOhEBAUiQ1gJrqlJ3F4SSK8HSxJnh7k7ru1kF4t/yKS3FuJtzR7wD1k3wO7ZwWuTGtSN4o9qNnibruBqw56QGejRYcelnGdvw08cUXFNUMj/CAa6DJf+il1FCXCmWKMwm+fkN X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN4PR0801MB3774.namprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(136003)(396003)(346002)(366004)(39830400003)(376002)(52116002)(26005)(6506007)(107886003)(38350700002)(36756003)(186003)(5660300002)(2906002)(1076003)(6666004)(83380400001)(41300700001)(38100700002)(66946007)(2616005)(6512007)(86362001)(4326008)(8676002)(66556008)(8936002)(4744005)(316002)(66476007)(478600001)(6486002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: IV35L9hMxsFt1qxt2DSgXcInumcd3ymbgCXgA5y926kvWMuBYH5oXHSXnwWW1g0gq/2f4xj/HulRwZMgC36KrLMhV2MjfJBl24P5KnUCKPWvLWw4EVjvq34vQ4qJ++HWGR0wpQ/Gku7bci1i+bYWbtfYj6KmozIyGd8ZvzzNg32Vb3gQqZ4fVwovl2uaxAIF/D8D4Ndcr/E0C4KMwr1I1+NHJUQGVzJOdKcMoZs1w2dZTllvF0HNJOgpHv+CbF+AvvmYb8UAc/o1rL1PkOhba7XO+l0vOXZjcB3xH0JXPp/Au8q+/r8PekZt6aczEbNReq7khsJngnSvnsTz+nS/T19cjQ5Eina2j6nczxHqMVXcZCahLct7Qi/NJFOFrw1i/60wcagUrwY+f2xQX4y/zZvIKrBoyKjCarXBqgvcKypTi8iUlpw6ySWv1fwnzDQ4iA1fNeSx9m70TTWy50lHqP8rjWMb/AdcCPEU/wAP+KNdrVCuM18kU73lHOrL36OS4Dq1h7DHSYtEqYHrIoaUHt6lF3z1XDn+ikn8J1kgSNf3ys6ebPGRldM2XpYKvKF+fvlDOQjWpYpBlrAqNjQRyn4nOe3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MyvH7Z+SOeh/meu6WUQbBrRNBu2S+m38gmExfugJpXVIvR+W0NOwqXeYT3IybUFR8V1a57UcWUc1Jw9A4g== X-OriginatorOrg: labundy.com X-MS-Exchange-CrossTenant-Network-Message-Id: 98acf426-595d-46dd-2ece-08da54cc007b X-MS-Exchange-CrossTenant-AuthSource: SN4PR0801MB3774.namprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jun 2022 03:53:58.5730 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 00b69d09-acab-4585-aca7-8fb7c6323e6f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: gx2h0VoiSq6Sux3XSqg4YeL8yU8XN+te3dT3O8Unw4+mr0la5v1XxspSctDCQSLBdiTx9+ebdRLaScaj1fZCYg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR08MB7766 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The vendor has redacted the RF filter enable control; remove it from the driver. Fixes: e505edaedcb9 ("Input: add support for Azoteq IQS7222A/B/C") Signed-off-by: Jeff LaBundy --- drivers/input/misc/iqs7222.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/input/misc/iqs7222.c b/drivers/input/misc/iqs7222.c index a84cc18638df..d1d36d857e55 100644 --- a/drivers/input/misc/iqs7222.c +++ b/drivers/input/misc/iqs7222.c @@ -557,13 +557,6 @@ static const struct iqs7222_prop_desc iqs7222_props[] = { .reg_width = 4, .label = "current reference trim", }, - { - .name = "azoteq,rf-filt-enable", - .reg_grp = IQS7222_REG_GRP_GLBL, - .reg_offset = 0, - .reg_shift = 15, - .reg_width = 1, - }, { .name = "azoteq,max-counts", .reg_grp = IQS7222_REG_GRP_GLBL, From patchwork Thu Jun 23 03:53:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff LaBundy X-Patchwork-Id: 584385 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 8A3FFC433EF for ; Thu, 23 Jun 2022 04:45:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232373AbiFWEpO (ORCPT ); Thu, 23 Jun 2022 00:45:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231254AbiFWDyJ (ORCPT ); Wed, 22 Jun 2022 23:54:09 -0400 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2084.outbound.protection.outlook.com [40.107.102.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 568D26439; Wed, 22 Jun 2022 20:54:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VGy8rOW0uGBSAgH6BX5DvybVkM+d/REToRm1bkQ5XHeyo+wwQuoRHhVoqB6BaDgWyxzGc32J2FcJAE99G9kvyvpdoZ4hkjGeXI9PCrl6huiJQQkxBjQSdb+OVbcJ5SiNrZ7r649ngV9ePlWrQKnnp+UVg37T5hJ0GZj9K2kxlWnkTpPJCa9Srh++YgYIWqW1Er44OQbRGfvbpJGif5u8hx5sP7sBRSE1P0uY0eAIIyb8kxcfdxPsJJ/ChHpQG7GwyLFYQ7wGVaGl1DSf+A/uAq9ylOlZCq5Gzsn2a4ROYPeNWAhNd7plynTf2eEsokv4RK5sReyZZR5RLAlMbIWy/w== 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=I21zdh2GSYfEjqyzPr+01/FgikYnPOsZhUOr2AFRhc4=; b=mIdMK3sauHUxHw/FKHBz7ZqUqT6DE4T84qc6waGtNMb/QGLpQhTSF6apHsOCf0Ouxxz/GJez+CS7yIS3TPmtCfPO87sEoN6cjxkJCGRFh+J004zEoJehJaZze2Xpc2JB+2dMxoqJyBtisEZLawio0J2fQiuKTPQWpBkdFukcv/xJjv3RhBlxJLB2yhSXyBsZs0eipoeRh3TO0dKpS4aFGgDS8PHcsug1r30hLbWCUcScw1N/4H78EjKhn0CTzPxGkX0J1DJWCWXia/hET8EUk96jNRwVxfAYBeJ35qTFLG9yImegEdDm9QNBJts/3Qc0hrPyR8Cpw8o9H3GA9IwG4Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=labundy.com; dmarc=pass action=none header.from=labundy.com; dkim=pass header.d=labundy.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NETORG5796793.onmicrosoft.com; s=selector1-NETORG5796793-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=I21zdh2GSYfEjqyzPr+01/FgikYnPOsZhUOr2AFRhc4=; b=QD8AdIRHgq/jjbekBBXilgWuoghWbvLxWiCCd9dKjP55kVzxOma/1b4yiGD4vYxJFTd8xeuA1cUdmzJxzXki3rKY7n4hUNYtoBcU1o5npIi+KJEAapgP7K3K6Y04jwA+fdpUNG50jIGzM+JEc++Q1UXP4zz6quFqTFRZM2Eo/AQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=labundy.com; Received: from SN4PR0801MB3774.namprd08.prod.outlook.com (2603:10b6:803:43::21) by SJ0PR08MB7766.namprd08.prod.outlook.com (2603:10b6:a03:3db::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.16; Thu, 23 Jun 2022 03:54:07 +0000 Received: from SN4PR0801MB3774.namprd08.prod.outlook.com ([fe80::ccb4:7984:aaf2:e18f]) by SN4PR0801MB3774.namprd08.prod.outlook.com ([fe80::ccb4:7984:aaf2:e18f%6]) with mapi id 15.20.5353.022; Thu, 23 Jun 2022 03:54:07 +0000 From: Jeff LaBundy To: dmitry.torokhov@gmail.com, robh+dt@kernel.org Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org, Jeff LaBundy Subject: [PATCH 7/7] dt-bindings: input: iqs7222: Correct bottom speed step size Date: Wed, 22 Jun 2022 22:53:09 -0500 Message-Id: <20220623035309.39528-8-jeff@labundy.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220623035309.39528-1-jeff@labundy.com> References: <20220623035309.39528-1-jeff@labundy.com> X-ClientProxiedBy: SN4PR0701CA0001.namprd07.prod.outlook.com (2603:10b6:803:28::11) To SN4PR0801MB3774.namprd08.prod.outlook.com (2603:10b6:803:43::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2632ac6c-d9d5-47a1-9f20-08da54cc0576 X-MS-TrafficTypeDiagnostic: SJ0PR08MB7766:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CojT4+MgpAG6yKlnbh7jz+pucnu/S3o5Brq8earZkEuSNifkx78qYludrfI4PKHH98osq7lbsZKOejM7566BRhty1NOAd9/X6q1+Q8JjdMjiw3X05sCjBJS08sBPe/2U1KLbzauaRIwEZXHIjWpvlV32RAmvYFn3LLmlG/DORDuGkcNZ4cA/28w19emxaqjm7jO8s6Ag4iyuhXvLBsHVXN23l/enVLqsLz0GsfiG89fCV1OivqRUBBIK9NFO1Eng4duNagrFU0kKPix27+KoZFaRVyxD02X2d36Ng0AJuTujrnyXl6A8ZSiNkO3/CeQTNn3GCSOHDVgxgYkKBNJuQ5HxLkBpyHItdBO9qUWqm6CHE+Uml8C8Gqsng486yUT3eaN9ipPfaWk1V6WrAZCqHZDrqNsVoNG1Gu95Zu9euu9LxXbyH0y2Wlazh8o42EoAxnjYJazaa7gkNT7n6oOiNcze3+ZAR39fI4Prb4y+FIg4ErjKwHGpbSaY/PauGEdWYIBktzgwf9CJ3IgAq6taEzNoWwoN4x6C3aRj/DlI/UI6EfRB463IQpQm0vgqOPHJl8Qa4ahtFXdh2LZmO6OgJ5BheUGu7f/BX0vVDO9l9nbu00oBz6xO/jzyU31sqqa2SwbnK7KWXObcZphbBfqtPQ63r+oOeCRxkIdi7FHVt2eP4nEoGrFCJFxIippp963ZYaeyL65qM9f5IEviagflJg6/epgoDeO/eG6cjRLqYQuuR1TlSpn2Ix9VCWWd/i7X X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN4PR0801MB3774.namprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(136003)(396003)(346002)(366004)(39830400003)(376002)(52116002)(26005)(6506007)(107886003)(38350700002)(36756003)(186003)(5660300002)(2906002)(1076003)(83380400001)(41300700001)(38100700002)(66946007)(2616005)(6512007)(86362001)(4326008)(8676002)(66556008)(8936002)(4744005)(316002)(66476007)(478600001)(6486002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: KyNA9MWshKRMDCCKmlFU5LG23J8E8GRF+GUXE3kUDrwEYqp43boQ2EYRa9e+AIvubX9D0GAm5NMy2VyGC23820OXKGzox8VvFsf5x+R2JUf3K1qKd0qqXCpsKQDY8NONmuJqvcUXGYQOl8P3IJqV8BZOnO6Sn6P4McKvLgCI3AEjcrm9R8C+otHL3lxemrpaXDECizkouAggzS3feRW7s1tOixQA0itoudXChLo5I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YM832EpelxA0g4s2nEeZgMP/AwOi7g2KoE4vgrl8MuItDTZcgRSP+p3AAY4il9iSqNPEtbFuMCf3m8CdIOt7vOqrCXrHbn1pB17bTOj2wcp0py2rzzrpKSralFySMgKrADzAcxQYNS9myJxC/EobIz+6aq1PkDAGHeCjsTFQ7vGxpKTfM9EVQYhLprO5fveGDj2AtMCz9eaMd52cjjh8r7ti7wjHS56oQLCSmyhIj6/Xsg6s+1x5IY2MQw3vKPS1dmVY2IN0dtLXGrJWi6o2IXZ/PFGTLDrCAf2TU9hOa0kpzPSIlxhsY0QWu7+0dFdKBu7+oKJQt1KjklF+KnPCJaVyhsgMm5MLeo5gqBJp3QLOOMDPsCvLTBxTTML/Tk/JOBaoZc3q+FxxUApbduxYEN7PCh4QENKZPekKK8WhOMEg== X-OriginatorOrg: labundy.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2632ac6c-d9d5-47a1-9f20-08da54cc0576 X-MS-Exchange-CrossTenant-AuthSource: SN4PR0801MB3774.namprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jun 2022 03:54:06.9474 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 00b69d09-acab-4585-aca7-8fb7c6323e6f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: arHpX4oGwtbb8jeHf9sT6LlaWEc1vcwleHQSg/8qOpdTzL34aHWJvMiyAR4AwQITiD8pLbBvPBNNWduHYExZfw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR08MB7766 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The bottom speed property is specified in steps of 1, not 4. Fixes: 44dc42d254bf ("dt-bindings: input: Add bindings for Azoteq IQS7222A/B/C") Signed-off-by: Jeff LaBundy --- Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml b/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml index 6180f7ee2284..c9c3a1e9bcae 100644 --- a/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml +++ b/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml @@ -533,9 +533,8 @@ patternProperties: azoteq,bottom-speed: $ref: /schemas/types.yaml#/definitions/uint32 - multipleOf: 4 minimum: 0 - maximum: 1020 + maximum: 255 description: Specifies the speed of movement after which coordinate filtering is linearly reduced.