From patchwork Thu Sep 8 13:15:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff LaBundy X-Patchwork-Id: 603993 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 B8FCEC6FA82 for ; Thu, 8 Sep 2022 13:17:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232271AbiIHNRI (ORCPT ); Thu, 8 Sep 2022 09:17:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232274AbiIHNRC (ORCPT ); Thu, 8 Sep 2022 09:17:02 -0400 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2062.outbound.protection.outlook.com [40.107.244.62]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB7F88E457; Thu, 8 Sep 2022 06:16:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=miRUG5O6FBhMLsXrujUtugK5J5noIQF4qM86S2svyqvGxVliUJDJZTgx2/aa3xqmTbWTacIRkpq5L+ZwOuBzAAV/MCbgGZQqHEfzSd5qf3cWAaUCU6HJ/RXXzbNguCeL/uFX1voBlNHc/CyiXDj0hjBIQKn3D3iNONdujpsFYt7fRBBnkhC7GVQ/q+1oWCKaOFOQ2XMSa+fL+YqhJXbnw56LsxxgA5EmQJWEqrD5jeiPDv5cP3+1rdztBrrXvchdF5TgBh5klELsqjrpNfjxSfMdWDTKOLQJf8hw3UvOFL+Ukr9W9Lisw3+UINKqRIh/hq1sq921GiOdruqKQ6U9BQ== 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=JU6w/DPRfqgcC4kWRlB1VDbXBJPUJ89t5LVFAuuOgiQ=; b=Eg3bbuggc6gqtimNJYJDtWYvBixLsKkDIdLGM89uEdn8GXL3cN4xAQFOYgL8ChkEgPqQJnGrqqYSWa1byv4u/uEeM7zbI/RYfg/HxqFfx7HAXfiCD0gb4roKyBTYCgGsLL9Hbse9g8cFK6Qtuk4NRcplj7UvqoVB4bY0bstZraM4Vj1bzA0MCpqlPOPQGI104b9q344JYZ+8Xh/Se4CnFN2nr7JowAqkaoBre6W7gk6M+GJzMNAvon0DBiUgFWMxztyTpxuzWEoOZ46NBGRicBj25/z251kHGhx+MI0DUwe0h4XpgfsgvGVJMfomcw6cZrCyHzuzWq/dkmdVNTsU/g== 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=JU6w/DPRfqgcC4kWRlB1VDbXBJPUJ89t5LVFAuuOgiQ=; b=zJJv2Oa+QpovR4nMzVC5G23ApkSUVCs5lsZLwDnOh0ilsTNt2AKNyCBeWvZ7O8JS6HdTjPdv0Ucnxw0U8Lb+Z2f3MP90KLL+DGD1KeeahL4e/3joFNQp10kFLzJwdbQMpGsf0EOnZ66CbSLYKd0TxuJVTPIIot+11sff4rowUeM= 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 SN6PR08MB4976.namprd08.prod.outlook.com (2603:10b6:805:6e::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.14; Thu, 8 Sep 2022 13:16:48 +0000 Received: from SN4PR0801MB3774.namprd08.prod.outlook.com ([fe80::90a1:7f76:cf5:f9ca]) by SN4PR0801MB3774.namprd08.prod.outlook.com ([fe80::90a1:7f76:cf5:f9ca%7]) with mapi id 15.20.5588.016; Thu, 8 Sep 2022 13:16:48 +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 01/11] Input: iqs7222 - drop unused device node references Date: Thu, 8 Sep 2022 08:15:38 -0500 Message-Id: <20220908131548.48120-2-jeff@labundy.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220908131548.48120-1-jeff@labundy.com> References: <20220908131548.48120-1-jeff@labundy.com> X-ClientProxiedBy: DS7PR03CA0078.namprd03.prod.outlook.com (2603:10b6:5:3bb::23) 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: b57f7379-1805-43fe-243e-08da919c6268 X-MS-TrafficTypeDiagnostic: SN6PR08MB4976:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zJnzomfWsPQgwSmsbDXIlhS4pT906qWY1VHXcOH6OD/3rrRqxO91lJBpavTKQoZcev83hdt4fJHyOcKoNhoxYgiB6VxjsTgyNhVDPM93Mq61oHHp1YDpooe/+bRzzb17sS4voXQqSV9+IvULrUboKZH69g8OGq0IRh3KK3u6U8N6kOvhg6YOiqqZchleP2iv2jymJxXb4kVpt56ifWWiKUp7AhAqg54fdl9+9B6y0nnNjHhE/hAzH2QqYznhtZhOqOxHapka5caF7PAnHRVpEzcngKYGN9aljLwGqU3rXbSrNjdTa9EQ6GYG0/+kVNwiF4wXPYU3Rb6pEIjq6aNIMtowf2PqsQnVDwpglfdB7RyuTzrvs6DEfjTyQx3CSUdJ/AqvcbzOq4g2SoB2KxP+BrLp6Sc/Y7bdyDmo1ETw13TybRuWrBVd+QxgHlSPMazJw1fjt271v6GZB5jM3uTugt6mLtaGu+8IiuqGR7dIErSM6KN8LVVdf4nQI+Rpya5swKhLQaF/9OmT9Kq7LCQwLfOu+gj1d+ApDSFwfD1ch47d1RwtQhPfTWPDGUWofg2KcejY7C/7cnEwZMYeZW6GQ+oBfuvYIsGUsSDuofWKQstpAf3QA9LqIza6w5TOC44SV52PNbPboaDGhpNHDp+eZIQOVJkxJtWrMAmqN7mlkWlUrvFsMoE2/AiN8+hX6fxGo9+cVRkXh0JuECTC6O47Kz9RlL8X82uVYW5KBNjpiTesnm3jGxGZrvAQc3ndUPTE 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)(396003)(366004)(39830400003)(346002)(136003)(376002)(8676002)(66556008)(5660300002)(66946007)(86362001)(66476007)(4326008)(107886003)(52116002)(2616005)(38350700002)(1076003)(38100700002)(186003)(8936002)(2906002)(36756003)(30864003)(316002)(26005)(478600001)(6512007)(6666004)(6506007)(41300700001)(83380400001)(6486002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Tq5Aim6Ei+Lmf9zTE4xDyNTDc6dEZgOMafaak6kEeusWo7jmg5+8O2D76kOGWNMP15Csu4IBfcsZGN9Ju6jOJz8z6ZoANxCqd1fco6QeWRR+vKW0ZSskAJMKV8/PUUnMCijMrv48T7uihbWZeX7ogbE3FpgMpQxwOD7qgcUxWFqqHKoytjOBqXVUOw54kvmOpGRo2gG4AgLzDHe3gjzJOxa/vB0MP9j4MG5rL78TMAtkdkltIoA5Hg5tsKsYfoEZMzJSZSvDnDE1lzAuFrduelj9RzrWQt1fNljSYI2aH1FqBwyzKvqb9kDBvxeFR4U5wRXSWvIl5jcFHueAdcb+CZGJngFdcMR/xaAwL3fXBynhfkoNbZA2FP+V31Z4d2PRMKTRflFiugMJFDPdmUZQZTqIzV9rcw0whhkSfeeIHsDmtbBfTUeKfHQt6IxU0se/uB3CQVBCJNhK6fn6dot7gtm6Ex4XI+dIAo5dGh2cEaurFj+6a7VTh5sdAauYGa0TdqcETn7iFmoVp66MHl2P/mCDCUMmXpjU53Au2MAmux50MWYyNhk+ZwHYkBiu6WF/80QnymZErj8FC80WppdlbKto/cVE+NAZblhYRN1sK6nT/khbhEZr5RvDUbXqTmBot979BXZ6u+7zZfXQ2HnoHLGO3NsBMSnP/3iKC71jHFhiXY7+hhiRQweUrK2ltNRerF6tAJhoq/8vTWwtZIciZyIO1ns9qyh7awUEWNPLQwsvf7JWZ8y69X83nC92vdO27epX2nz/IITv2PGXMsmH7SP6QjtK/fLGP/RnCGxSon0ePqU8q7+hmnumC9+3qqEGdDvXmd1WXeuJBFYaS/S3qr2YKwwweldOTiFls0sxEGdkOO5z1kfAtKAffIKJZkYDd9pngN5KSl4aCNKqz1tfta+OFwWcjwN/4F8FJz7eTsNWNY8cpsG0o5yHMUsWClODUdrqTp18y2HNcnDCh9OxD5FbeLxbSvg+SMe4MR7WDnsgV54QPvFZINsb+vx/AOwNbmT8hsfFhGVkEolPwcDmvtJn9sNqwMAkLiPHbaCxv2VL0NeGO18EUfvZ4P5Kx3vi9sZYGSCJcXSdkCJ27tui04XTqhCuwo17N5dx795VTDeL7T+B0jXAADbg2pVG4pFtcwRT3/ZhVw/MHVKfb+cGHQOIoU1pCeQDODsjRAHdl2JM6LZfUsPiGEdtAYveR9AFUyobxNd71obLPCCnUGxJG124kN/3RxkwlFwLMlqcq9AqiAedw9QM7tEJtBMD6ASjLCimdPMEZPqqdJIkpqx7HIvWEcDA7JQyowPJJT0b4kZCIz9KfmtHuFz2WB00+qFXnQmSwXPJq8cAsQsvRbR4GPciSACoWmlcxYSnfW361qIw+WSNQC+CH9DeCLKcj+gVM55hNh0rCu6kYYkcUhmZRjZCWgUIqdTzgioijXN1gnc8AXsb5Bw6ly/uQY7uqY8OcGjWdVdEmSwHkk3YlZB0U/hr41vDAO3WCl7VYhsx5XMs+N7Q3K502F6qFGI+mkVg2A0hz6sSW0j7siF0+0gYH+jgqFrkfjhQYLb59YwmyWTdEhKMWZPQy6JjqNE+cfj4 X-OriginatorOrg: labundy.com X-MS-Exchange-CrossTenant-Network-Message-Id: b57f7379-1805-43fe-243e-08da919c6268 X-MS-Exchange-CrossTenant-AuthSource: SN4PR0801MB3774.namprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Sep 2022 13:16:47.9358 (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: j/YtV4Mc/hZ/pzyijo1UmZl+1OfV4doY5zbe/29Qmes1VYDGVroLQBjZcMFcxTG5mwSZzgy533fLuGmlT2tU6Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR08MB4976 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Each call to device/fwnode_get_named_child_node() must be matched with a call to fwnode_handle_put() once the corresponding node is no longer in use. This ensures a reference count remains balanced in the case of dynamic device tree support. Currently, the driver never calls fwnode_handle_put(). This patch adds the missing calls. Fixes: e505edaedcb9 ("Input: add support for Azoteq IQS7222A/B/C") Signed-off-by: Jeff LaBundy --- drivers/input/misc/iqs7222.c | 134 ++++++++++++++++++++++++----------- 1 file changed, 91 insertions(+), 43 deletions(-) diff --git a/drivers/input/misc/iqs7222.c b/drivers/input/misc/iqs7222.c index b2e8097a2e6d..04c1050d845c 100644 --- a/drivers/input/misc/iqs7222.c +++ b/drivers/input/misc/iqs7222.c @@ -1703,7 +1703,7 @@ static int iqs7222_parse_cycle(struct iqs7222_private *iqs7222, int cycle_index) IQS7222_REG_GRP_CYCLE, IQS7222_REG_KEY_NONE); if (error) - return error; + goto put_cycle_node; if (!cycle_node) return 0; @@ -1714,17 +1714,19 @@ static int iqs7222_parse_cycle(struct iqs7222_private *iqs7222, int cycle_index) * CTx pins (CTx0-8). */ if (!fwnode_property_present(cycle_node, "azoteq,tx-enable")) - return 0; + goto put_cycle_node; count = fwnode_property_count_u32(cycle_node, "azoteq,tx-enable"); if (count < 0) { dev_err(&client->dev, "Failed to count %s CTx pins: %d\n", fwnode_get_name(cycle_node), count); - return count; + error = count; + goto put_cycle_node; } else if (count > ARRAY_SIZE(pins)) { dev_err(&client->dev, "Invalid number of %s CTx pins\n", fwnode_get_name(cycle_node)); - return -EINVAL; + error = -EINVAL; + goto put_cycle_node; } error = fwnode_property_read_u32_array(cycle_node, "azoteq,tx-enable", @@ -1732,7 +1734,7 @@ static int iqs7222_parse_cycle(struct iqs7222_private *iqs7222, int cycle_index) if (error) { dev_err(&client->dev, "Failed to read %s CTx pins: %d\n", fwnode_get_name(cycle_node), error); - return error; + goto put_cycle_node; } cycle_setup[1] &= ~GENMASK(7 + ARRAY_SIZE(pins) - 1, 7); @@ -1741,13 +1743,17 @@ static int iqs7222_parse_cycle(struct iqs7222_private *iqs7222, int cycle_index) if (pins[i] > 8) { dev_err(&client->dev, "Invalid %s CTx pin: %u\n", fwnode_get_name(cycle_node), pins[i]); - return -EINVAL; + error = -EINVAL; + goto put_cycle_node; } cycle_setup[1] |= BIT(pins[i] + 7); } - return 0; +put_cycle_node: + fwnode_handle_put(cycle_node); + + return error; } static int iqs7222_parse_chan(struct iqs7222_private *iqs7222, int chan_index) @@ -1766,7 +1772,7 @@ static int iqs7222_parse_chan(struct iqs7222_private *iqs7222, int chan_index) IQS7222_REG_GRP_CHAN, IQS7222_REG_KEY_NONE); if (error) - return error; + goto put_chan_node; if (!chan_node) return 0; @@ -1793,14 +1799,15 @@ static int iqs7222_parse_chan(struct iqs7222_private *iqs7222, int chan_index) dev_err(&client->dev, "Failed to read %s reference channel: %d\n", fwnode_get_name(chan_node), error); - return error; + goto put_chan_node; } if (val >= ext_chan) { dev_err(&client->dev, "Invalid %s reference channel: %u\n", fwnode_get_name(chan_node), val); - return -EINVAL; + error = -EINVAL; + goto put_chan_node; } ref_setup = iqs7222->chan_setup[val]; @@ -1818,7 +1825,8 @@ static int iqs7222_parse_chan(struct iqs7222_private *iqs7222, int chan_index) dev_err(&client->dev, "Invalid %s reference weight: %u\n", fwnode_get_name(chan_node), val); - return -EINVAL; + error = -EINVAL; + goto put_chan_node; } chan_setup[5] = val; @@ -1851,12 +1859,14 @@ static int iqs7222_parse_chan(struct iqs7222_private *iqs7222, int chan_index) dev_err(&client->dev, "Failed to count %s CRx pins: %d\n", fwnode_get_name(chan_node), count); - return count; + error = count; + goto put_chan_node; } else if (count > ARRAY_SIZE(pins)) { dev_err(&client->dev, "Invalid number of %s CRx pins\n", fwnode_get_name(chan_node)); - return -EINVAL; + error = -EINVAL; + goto put_chan_node; } error = fwnode_property_read_u32_array(chan_node, @@ -1866,7 +1876,7 @@ static int iqs7222_parse_chan(struct iqs7222_private *iqs7222, int chan_index) dev_err(&client->dev, "Failed to read %s CRx pins: %d\n", fwnode_get_name(chan_node), error); - return error; + goto put_chan_node; } chan_setup[0] &= ~GENMASK(4 + ARRAY_SIZE(pins) - 1, 4); @@ -1878,7 +1888,8 @@ static int iqs7222_parse_chan(struct iqs7222_private *iqs7222, int chan_index) dev_err(&client->dev, "Invalid %s CRx pin: %u\n", fwnode_get_name(chan_node), pins[i]); - return -EINVAL; + error = -EINVAL; + goto put_chan_node; } chan_setup[0] |= BIT(pins[i] + 4 - min_crx); @@ -1897,14 +1908,18 @@ static int iqs7222_parse_chan(struct iqs7222_private *iqs7222, int chan_index) error = iqs7222_parse_props(iqs7222, &event_node, chan_index, IQS7222_REG_GRP_BTN, iqs7222_kp_events[i].reg_key); - if (error) - return error; + if (error) { + fwnode_handle_put(event_node); + goto put_chan_node; + } error = iqs7222_gpio_select(iqs7222, event_node, BIT(chan_index), dev_desc->touch_link - (i ? 0 : 2)); - if (error) - return error; + if (error) { + fwnode_handle_put(event_node); + goto put_chan_node; + } if (!fwnode_property_read_u32(event_node, "azoteq,timeout-press-ms", @@ -1922,7 +1937,9 @@ static int iqs7222_parse_chan(struct iqs7222_private *iqs7222, int chan_index) dev_err(&client->dev, "Invalid %s press timeout: %u\n", fwnode_get_name(chan_node), val); - return -EINVAL; + error = -EINVAL; + fwnode_handle_put(event_node); + goto put_chan_node; } *setup &= ~(U8_MAX << i * 8); @@ -1934,7 +1951,8 @@ static int iqs7222_parse_chan(struct iqs7222_private *iqs7222, int chan_index) if (error) { dev_err(&client->dev, "Failed to read %s code: %d\n", fwnode_get_name(chan_node), error); - return error; + fwnode_handle_put(event_node); + goto put_chan_node; } iqs7222->kp_code[chan_index][i] = val; @@ -1948,19 +1966,24 @@ static int iqs7222_parse_chan(struct iqs7222_private *iqs7222, int chan_index) dev_err(&client->dev, "Failed to read %s input type: %d\n", fwnode_get_name(chan_node), error); - return error; + fwnode_handle_put(event_node); + goto put_chan_node; } if (val != EV_KEY && val != EV_SW) { dev_err(&client->dev, "Invalid %s input type: %u\n", fwnode_get_name(chan_node), val); - return -EINVAL; + error = -EINVAL; + fwnode_handle_put(event_node); + goto put_chan_node; } iqs7222->kp_type[chan_index][i] = val; } + fwnode_handle_put(event_node); + /* * Reference channels can opt out of event reporting by using * KEY_RESERVED in place of a true key or switch code. @@ -1983,9 +2006,14 @@ static int iqs7222_parse_chan(struct iqs7222_private *iqs7222, int chan_index) * The following call handles a special pair of properties that apply * to a channel node, but reside within the button (event) group. */ - return iqs7222_parse_props(iqs7222, &chan_node, chan_index, - IQS7222_REG_GRP_BTN, - IQS7222_REG_KEY_DEBOUNCE); + error = iqs7222_parse_props(iqs7222, &chan_node, chan_index, + IQS7222_REG_GRP_BTN, + IQS7222_REG_KEY_DEBOUNCE); + +put_chan_node: + fwnode_handle_put(chan_node); + + return error; } static int iqs7222_parse_sldr(struct iqs7222_private *iqs7222, int sldr_index) @@ -2004,7 +2032,7 @@ static int iqs7222_parse_sldr(struct iqs7222_private *iqs7222, int sldr_index) IQS7222_REG_GRP_SLDR, IQS7222_REG_KEY_NONE); if (error) - return error; + goto put_sldr_node; if (!sldr_node) return 0; @@ -2018,11 +2046,13 @@ static int iqs7222_parse_sldr(struct iqs7222_private *iqs7222, int sldr_index) if (count < 0) { dev_err(&client->dev, "Failed to count %s channels: %d\n", fwnode_get_name(sldr_node), count); - return count; + error = count; + goto put_sldr_node; } else if (count < 3 || count > ARRAY_SIZE(chan_sel)) { dev_err(&client->dev, "Invalid number of %s channels\n", fwnode_get_name(sldr_node)); - return -EINVAL; + error = -EINVAL; + goto put_sldr_node; } error = fwnode_property_read_u32_array(sldr_node, @@ -2031,7 +2061,7 @@ static int iqs7222_parse_sldr(struct iqs7222_private *iqs7222, int sldr_index) if (error) { dev_err(&client->dev, "Failed to read %s channels: %d\n", fwnode_get_name(sldr_node), error); - return error; + goto put_sldr_node; } /* @@ -2052,7 +2082,8 @@ static int iqs7222_parse_sldr(struct iqs7222_private *iqs7222, int sldr_index) if (chan_sel[i] >= ext_chan) { dev_err(&client->dev, "Invalid %s channel: %u\n", fwnode_get_name(sldr_node), chan_sel[i]); - return -EINVAL; + error = -EINVAL; + goto put_sldr_node; } /* @@ -2071,7 +2102,8 @@ static int iqs7222_parse_sldr(struct iqs7222_private *iqs7222, int sldr_index) if (!val || val > dev_desc->sldr_res) { dev_err(&client->dev, "Invalid %s size: %u\n", fwnode_get_name(sldr_node), val); - return -EINVAL; + error = -EINVAL; + goto put_sldr_node; } if (reg_offset) { @@ -2087,7 +2119,8 @@ static int iqs7222_parse_sldr(struct iqs7222_private *iqs7222, int sldr_index) if (val > (reg_offset ? U16_MAX : U8_MAX * 4)) { dev_err(&client->dev, "Invalid %s top speed: %u\n", fwnode_get_name(sldr_node), val); - return -EINVAL; + error = -EINVAL; + goto put_sldr_node; } if (reg_offset) { @@ -2142,8 +2175,10 @@ static int iqs7222_parse_sldr(struct iqs7222_private *iqs7222, int sldr_index) reg_offset ? IQS7222_REG_KEY_RESERVED : iqs7222_sl_events[i].reg_key); - if (error) - return error; + if (error) { + fwnode_handle_put(event_node); + goto put_sldr_node; + } /* * The press/release event does not expose a direct GPIO link, @@ -2155,8 +2190,10 @@ static int iqs7222_parse_sldr(struct iqs7222_private *iqs7222, int sldr_index) : sldr_setup[3 + reg_offset], i ? 1568 + sldr_index * 30 : sldr_setup[4 + reg_offset]); - if (error) - return error; + if (error) { + fwnode_handle_put(event_node); + goto put_sldr_node; + } if (!reg_offset) sldr_setup[9] |= iqs7222_sl_events[i].enable; @@ -2166,12 +2203,15 @@ static int iqs7222_parse_sldr(struct iqs7222_private *iqs7222, int sldr_index) if (error) { dev_err(&client->dev, "Failed to read %s code: %d\n", fwnode_get_name(sldr_node), error); - return error; + fwnode_handle_put(event_node); + goto put_sldr_node; } iqs7222->sl_code[sldr_index][i] = val; input_set_capability(iqs7222->keypad, EV_KEY, val); + fwnode_handle_put(event_node); + if (!dev_desc->event_offset) continue; @@ -2192,11 +2232,16 @@ static int iqs7222_parse_sldr(struct iqs7222_private *iqs7222, int sldr_index) * The following call handles a special pair of properties that shift * to make room for a wheel enable control in the case of IQS7222C. */ - return iqs7222_parse_props(iqs7222, &sldr_node, sldr_index, - IQS7222_REG_GRP_SLDR, - dev_desc->wheel_enable ? - IQS7222_REG_KEY_WHEEL : - IQS7222_REG_KEY_NO_WHEEL); + error = iqs7222_parse_props(iqs7222, &sldr_node, sldr_index, + IQS7222_REG_GRP_SLDR, + dev_desc->wheel_enable ? + IQS7222_REG_KEY_WHEEL : + IQS7222_REG_KEY_NO_WHEEL); + +put_sldr_node: + fwnode_handle_put(sldr_node); + + return error; } static int iqs7222_parse_all(struct iqs7222_private *iqs7222) @@ -2232,6 +2277,9 @@ static int iqs7222_parse_all(struct iqs7222_private *iqs7222) error = iqs7222_parse_props(iqs7222, &gpio_node, i, IQS7222_REG_GRP_GPIO, IQS7222_REG_KEY_NONE); + if (gpio_node) + fwnode_handle_put(gpio_node); + if (error) return error; From patchwork Thu Sep 8 13:15:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff LaBundy X-Patchwork-Id: 603992 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 13913C6FA8A for ; Thu, 8 Sep 2022 13:17:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232296AbiIHNRK (ORCPT ); Thu, 8 Sep 2022 09:17:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232305AbiIHNRG (ORCPT ); Thu, 8 Sep 2022 09:17:06 -0400 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2080.outbound.protection.outlook.com [40.107.223.80]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9711652FD4; Thu, 8 Sep 2022 06:17:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IHwl+4E/o5WY2MckqpnmpfMbDPv3drkmNdlclIWcpj4czaQoegnZpm7DtYHJaV+bWunirJ742riTQ5MZExso7/1TY7bmWrTOtcNYyFeNRi0k+koE6H/RSK92yU6ohBLYkZPEnT/T23SBycqx44u2+/SiU++e+N/tFqJx+FS8j4BHnDm2Zy6AovLyRs7t1uhzt8gr8ge2Idea5P6J4OpMdv6h6lU0Qtx+bzxQBruCj7tgV2mFfMJucmccbne9VxQgHIyY6VlNye8dBfbT/K1IoXhGapEmySkIwbf1/7qWUEC34muZUSv7j58lUIu1/uRuGDrgHCmL86ktnBGxFjuUjw== 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=IQsUBvVvcVVrngGyh3Ie+QUgf6DrZBZZDVfOfexOXxU=; b=AvAxPoyqz7Fde+hYNDyEdVB55gxMIH5w4hX0vi4ywr2oMZVzrfGqd/+f2nn7GxxqfuCYtT6cK78+bkmCV2qNMCpT1m+mEiFVMd2a/s5bOKl2g5hjkwOC2QwVhzpq4uudw7P8aTI7fQmWLH1f4jAvf0Prl1t+jiTWdkyjQ0AU8VIYIUbbNfYG3ErU4c16MJ2LyPZj7BBD8erLyo2d1b4IzrJwjm3SfaulxfMgnvbT5Fmhp2axUBK6rOi0x67/iN1on24KORJ5c0JqWSOeJ4biKE9a72gveQ0Tx3c4B/e+VKuYU9oAar121cWI3ooqE1JE6s5nqvfGARkjE9QfeI543g== 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=IQsUBvVvcVVrngGyh3Ie+QUgf6DrZBZZDVfOfexOXxU=; b=VPgK4Xtuj7HjubzYHserPh+AToVQaW1BMfco2l0NXBaryM6Z3488kvuuKJlv/DhEEIqkIAwzsp1ueRLdTO1R0kAYffGY7wp+WLB4qUTa5XvzNLHdZY3RxI2P7VYHcT7AWoBOy7Na/LWTR829zbQshII2X2ZqIRxuc+R6HVg6puc= 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 SN6PR08MB4976.namprd08.prod.outlook.com (2603:10b6:805:6e::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.14; Thu, 8 Sep 2022 13:17:04 +0000 Received: from SN4PR0801MB3774.namprd08.prod.outlook.com ([fe80::90a1:7f76:cf5:f9ca]) by SN4PR0801MB3774.namprd08.prod.outlook.com ([fe80::90a1:7f76:cf5:f9ca%7]) with mapi id 15.20.5588.016; Thu, 8 Sep 2022 13:17:04 +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 03/11] dt-bindings: input: iqs7222: Correct minimum slider size Date: Thu, 8 Sep 2022 08:15:40 -0500 Message-Id: <20220908131548.48120-4-jeff@labundy.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220908131548.48120-1-jeff@labundy.com> References: <20220908131548.48120-1-jeff@labundy.com> X-ClientProxiedBy: DS7PR03CA0078.namprd03.prod.outlook.com (2603:10b6:5:3bb::23) 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: 71912bf7-3360-4735-bb6c-08da919c6c12 X-MS-TrafficTypeDiagnostic: SN6PR08MB4976:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kMzpXzEe5hbk0WClpOCS0584cMUWBo6jeAj6NukqyChCP57r+msHWlMM3qP/Dy8Ney50U1doYJS1Dl2e69gcmdUBwQTuEc2ZuRIYAQG8PvK0LFgOxP2pfadygPJY4oTOwSzKYL+aMULEGDFn85zQ/ARAbcVXnNALj5rAAmaKcchXkxIdOzGcE5lXUqcvsxQs8M5SOWfzjAdBIeIcvBM1apqcYGUmQyAVuHbo7sqnFTLDTkOI/vpUhEtdYM+NsBwg4OKe1eFs/oq1a/4qsHC2KCGwwpEBu8wuA05ttAPo5Qt6LKiFZ/rQOSkfjaj6mU45bL7jf3OM1hFIHs8RuYct9tYHrD1rBRzR2uJWiki3R/h+LfgiFpmFD1vCBbRk4j49t1QC0k8vBex/A65OuVOiLCbFSe/lREfbdRo7fMq+iGRNkQNEcTzVoyvxYdcHRgf5EhZ3HRmJppZBdWAPPh5gdRRBN+YiX1fYCsdjKfgC3V1cHFqpzMz1dT8ReN1+r1wlw4VF/2rUEKoRTilNbc6pzLZuP2oiiMqLLjrGezxVRlfzvIcgzrkeTgvvvfQQKgxdz2jW/CdV7uyg13/nTnTw9A2hRWAt6ActkB8+xktGHTb3pHAm4TU6HI3AM+pV+HWaU/+Ya6oeGprzjsUsa7ZCuQgl8zgUapvtgT0AkOvyvQBR4BUkdL4zwKQSfAn+4rPD+nlatYkeu9aP4L7XMJt7ZHB6Hy4qB5TXJe/SEXkIdCuyGTflQd88eJlz/KVvriHC2Tl2kDLx8/ctnbUlfqZoVw== 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)(396003)(366004)(39830400003)(346002)(136003)(376002)(8676002)(66556008)(5660300002)(66946007)(86362001)(66476007)(4326008)(107886003)(52116002)(2616005)(38350700002)(1076003)(38100700002)(186003)(8936002)(2906002)(36756003)(316002)(26005)(478600001)(6512007)(6666004)(6506007)(41300700001)(83380400001)(6486002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: cpelpPHr8HWFnlKTEyKK/0+Z/cWIP40qRnetoTgaxGgh4NV+MFnjya/EDIq4lZ7ldBPRJmwG7kE2nYAUXUajEdUm79K7Y08ZWXmuXQG88PhqwJXNirgOefSmTGYH+yLiyj99pKfJYdHAIpVE0JA2XCUmyPWMFOP3w5QVrE1RI1Ri3CuroVK4v3mUCwItwynkxeskHLOtP4DdfeYimYofM/E2QQ9OqlF2FRAccsrZgFwObrATdlx0XV6Zh5GLhUr+CfYPDwF2Txn7tHK7MLXSqms2V4DwEG1HksDbdqfGOBgYtyC5mRqaN0Ae9dsvEEjTQOUO6MDjqnjaTGZMRk4ezold7cpXfH4IyGJ3NIar+xu5+gOr81PFjqPXvdOYnT3ulYlEjECYqKMcP7RF1W7fnJqREs/ImRwMVFWoRJIN/uPcZpvJcOB2X+1S2IIXr0D8IDW/YCM237vsREsbmqgk5F3pwYEPmEinY3QQ2zw3925a65wY2n4WflIQx1iVFfg+DezMuc+BXBEAGxcgs5h2Jmw+awvPam6EQsK2B9QfPAHJWTMLrPg2cxMFmxbFtx639PbhRqe90b2hHk6UtSLvaGH/J+BcLtBk9D/VlDFqqd5zPILHobZf2ZluMwHKqv9WbMDafupZIy6tg7CiU8sY3kZvzQIwtxKUD2yL2sJeYbPx7C/U0wqDIlN3/lH3OOVaZwWeAulOXFncRcJD9weLeDbptd0NgBenAOzq3MIwiJ5NTAUtrYxzLaRCQb46BnyRQKVmju+bjhtfILk/x2ZbMPyVJoQ3tSwj8eAJTZOIVIyARbsbGMCAEwJbPDkDO1dr2gi/7/K9snUDZDdhD4yF7y1gkRCHYlvd/Sub+UPzXQYMtb/yQ+902bTdYYJhPsqtV+IyjDl8wDQcfR0O1DR0wuz3/F1HeWV0ROkw6aQ8K0R7XVhG8rURde8sasA8peK/MIezzUi8BVhQm/lppEvDUgCfiZ7PXprLh3jaD4zl9mzUeky5VL0ra+yw2OJX5t5kYktQl9wdFBZ3NRr/ptXIPI8dUqBbJOEnZOCer03VLk7H3PVJdPEhZdgcog50dongjztXorD5HGv2f28vQFzr0AKr8+NweuJChn2fhAAZbLL9/D8tIcd5BLUG8NUNtJ5DTE2os6ULpQFlfdEBTruJUFks0fjcvhu6uhzSYssjMjDwaadGQ2yFWH4d97Z3NA1RKiDuYLO5wBqEVe/LLfPZWDrSRl6Is2nNAu2YFDXBXPw4/vOPaDywSEbJYUHct1QzCvMFFQpIHpZFXM7/URXC/OOjKIzcqghR64umw80kKCfaj/56ctJPBiWKBJe60+SduQlIeYi/7zGRw9muoDbrYolCORf9G/2c8v8KEbVWl84JAARlLunkbNv8lGqVJeIiites8jGjKUVAWzDbdmwgXSa7eOnO5FFmuyWiqV6FJqAXOJJRNw76lH7FKKNMt4l0nv2s1hap8g3zdQhpc9Esryl+/mzf8cp5IJuAPaxg+FSlz+Rj+qbu+FVgQEEFApbrI9H1pLbixdYCdone845k11YHBCO9UmQbGc9UsyurIl46NUuHjnHdX5cWcHT94aKZ X-OriginatorOrg: labundy.com X-MS-Exchange-CrossTenant-Network-Message-Id: 71912bf7-3360-4735-bb6c-08da919c6c12 X-MS-Exchange-CrossTenant-AuthSource: SN4PR0801MB3774.namprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Sep 2022 13:17:04.2157 (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: yZKaAV95YNxC0VeQz+LacJSrdffxXOC6ORwFEs6ZRgYygEPO7kxfT4tDAvMKoIP+pHulXf7O8oVgJ+5BJFsGYQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR08MB4976 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The minimum slider size enforced by the driver is 1 or 16 for the IQS7222C or IQS7222A, respectively. 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, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml b/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml index 02e605fac408..785fb9e83354 100644 --- a/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml +++ b/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml @@ -501,7 +501,7 @@ patternProperties: azoteq,slider-size: $ref: /schemas/types.yaml#/definitions/uint32 - minimum: 0 + minimum: 1 maximum: 65535 description: Specifies the slider's one-dimensional resolution, equal to the @@ -693,6 +693,7 @@ allOf: properties: azoteq,slider-size: multipleOf: 16 + minimum: 16 maximum: 4080 azoteq,top-speed: From patchwork Thu Sep 8 13:15:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff LaBundy X-Patchwork-Id: 603991 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 A1A3CC38145 for ; Thu, 8 Sep 2022 13:17:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232311AbiIHNRP (ORCPT ); Thu, 8 Sep 2022 09:17:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232291AbiIHNRO (ORCPT ); Thu, 8 Sep 2022 09:17:14 -0400 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2051.outbound.protection.outlook.com [40.107.223.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85C7D2F644; Thu, 8 Sep 2022 06:17:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ha6Zz7/ueZmtL0k5D7GJmYkKuIw51AVXfF9dAiZtGfR2YYs6yPpsUAquHbK/+srtNIgW4Sp1ZFwEdA6xuqv3Ka2VglwaUgHojk+cpxdyJ9wbHxT06TLcki2tDUb5vwvPRUO1SY/dQBh3BuyDl4VW4zZDJRCSA6BkUTPQJirkjGrbPjgxKdbwQ1UPHEq26g+x0eGIhydu30lVbvXdYS/Oiqr0Nwq6RB/Tj7ZIOLUmWcT/nvJd557momn42LJP9p1AaVZAhZJCrgvi+2aGTGvBBpOHLdMh+2AZ/wdKKNKFqcIxSer2FV5yZ7dcknpaijH2PgOmsQJsU9sJFSJgj2EcfQ== 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=TIMvIZD7FKC2tdBRYHWyF7bydlAFIVDiV3vJjLXfl/s=; b=XWk8BGm3DN5b2dc/Zd8quaYjwR5L2wjd0H7JswMSZ19HZD/s0SkSJFqX99+BA2+qKhl9Zfkipw53dkkEUQV7o3Go50SmOWA4b2Y694yEGvTsdP/q5eyB6GB6hVQHEa0OTzD+I1tegcfYkQZTB0aKkpJ6+PXlce9btFeixuabJv4I0kgf9bnZvGmAAO6iUEPoiPhp4aF+uiOZSBvQ70fibyaRzN7u0An5CJaMGSpXA38wc0QSGC9/Z8mx7hWyWdMvxLWnVPVD2amkpzFapAvK7Hjney/r6ilKqrSg5bn67Q2qWj9HmNm+x6bq2LBMutk+qAMYTnqGP2eHnz3MonTSQg== 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=TIMvIZD7FKC2tdBRYHWyF7bydlAFIVDiV3vJjLXfl/s=; b=Zv7lMwNujcOWyL6gVpag74WDG12BzuciVXBmbpZSwsTuMG+r2329dXdwIK7vtL++8t4otfFvfcG9ZRqZB066NCZDJ5ZT+Ilerkr7oPPTYpxJtNgwgtPhe/Pkc1zHkEYmednBYfkDqbNmqUXRaLmt4nNLKo0nNh4GHoi0+wPKH0U= 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 SN6PR08MB4976.namprd08.prod.outlook.com (2603:10b6:805:6e::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.14; Thu, 8 Sep 2022 13:17:11 +0000 Received: from SN4PR0801MB3774.namprd08.prod.outlook.com ([fe80::90a1:7f76:cf5:f9ca]) by SN4PR0801MB3774.namprd08.prod.outlook.com ([fe80::90a1:7f76:cf5:f9ca%7]) with mapi id 15.20.5588.016; Thu, 8 Sep 2022 13:17:11 +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 05/11] Input: iqs7222 - trim force communication command Date: Thu, 8 Sep 2022 08:15:42 -0500 Message-Id: <20220908131548.48120-6-jeff@labundy.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220908131548.48120-1-jeff@labundy.com> References: <20220908131548.48120-1-jeff@labundy.com> X-ClientProxiedBy: DS7PR03CA0078.namprd03.prod.outlook.com (2603:10b6:5:3bb::23) 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: 958a3efa-e55b-4243-c35e-08da919c703e X-MS-TrafficTypeDiagnostic: SN6PR08MB4976:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /5QzJk/s1p0HVPmHMoU8TDs1LbNkByor2r4z6poOHm3og0vV9kVZZVD5TTnbgyipHGp10rfE5LkehN43MnKLDc36qakCNm0L98JZ6yegr8KC91+DRQ2DL3mN3Pxl2o8PYrd76Ev6s3C8VdAb5UV5ij1r7FvGTXTc0BNIJPe/mjKZJ42dAvnBwlcV7izkprm32FvQRvcA0DYOVulySKRN1nJ96xTUlTiQUbmgDB7MePEFnCYzRhdu5LaGf32S+td6yl0rZ2EgHr9CsyAbL2sxvnYR2A52Ms6FgQKe98kG5V4n5LwAdkJ+K3lQaF6vRhVvcO9wxAAVI9necarnSlQyn42QnhbL4ZbMh2IGUZ0HST6hpY9I36HG8YgT90d9ZVZdg9unEiqfwJCR8KG23sJqguXTIMju2geeYQfKegfxcw0rM8FKkr7y9p3baqt282S89iB0pm2UkCjLzKhs6pJ/9X+BHKEk+9q/HbD1BMVHuRL5pfEGWo+/OTXriB790KlnL69Icr2hv0gkxY6AL6kEHkU6K9qEIvI8BE8z4zkM5x3EJxj+DTM7qrlfW6sD2pENk3itvz5T8vrxpHm1Gi5zYXprW08aIuIuySplPuf3pEPALdnPnCmPIXpr+R7muDzjHIOWFAvGfo+q2tXIk4LKNlFQ2JDW6sO3Tb0fTeHLvGCV6y2z15Xxm8iw28yKz//NfsSCyK01WIZx4pC7jIjUxV5vTaKUByVThkfwXJaqgdFssvcLPqi1kMbMDJ00xEiCrvT/tK9lGh5i0aJ0CnK8jw== 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)(396003)(366004)(39830400003)(346002)(136003)(376002)(8676002)(66556008)(5660300002)(66946007)(86362001)(66476007)(4326008)(107886003)(52116002)(2616005)(38350700002)(1076003)(38100700002)(186003)(8936002)(4744005)(2906002)(36756003)(316002)(26005)(478600001)(6512007)(6666004)(6506007)(41300700001)(83380400001)(6486002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 22f9ni7pI7NYkgQqy/UrTFyvwwWZj0X/FwAeQk3bHMLT7vhYHKHWQrcuw/ZYE0RsiGPFNN+rnz19AOM7VsMqotD8pLCxXCI6wCKHN+B/OasEMv/IdICDYmu3SiDpfHvUmRzVBp2yHKhZiTOTv8CsrYY1E4PNg1l0s6hychJ1oRV1O15gEobZSKyRzsX79Gdh5zpHRmWcjIpVx/ycRbMShGEommdm2YDV4IC7T+ht94qgpb51/JJY8r9VWwT/wczQKUylRYVjXpfjB/ip1KPpCG1EkWay3PT423eD4Dg9A5HXL/Z8L+P0SWl14XE69T+I9TEeefoiX0Gxi/OCyi0+FJjfMVlFgqSDwcQoXT2lBGHrxI22CxpIDfXqpAXtfalxGklc8mH/3ItoES/yLMZe04hkxOHCSusZhDbGJH0UN33cp9iVVKGD2icfMfGaxPaDZ4BS5tg1Y2wuKQAblJVHQJVkT2zfAywpP1LsmD/L7NumskgTPf/OzPPoQuBsIiw+sQ4bGowyi1vrYJpS6wl6YZMRxedU0izEkwPP1okL4724cLJvwKgZ+dUfsHuHeDLwGWPztKUTbvy9LduQG3nOLZezQpSLtEhIZApTLxvGHTYRBw1uciF+pOUDaId+q2wSkjY1jXMiEuAuoHls+vEV2KKaCe9OcrOGcO8USDumq0vyQAA6ti2FuzFM3H87ntv9S6jV1c1RC+41fesqmiMnMuo7er/rKXOHBYg/1+kv5rVJqUyUov4qaIlg7jaySXfWNNv0JtjV4cFhWk5vGYYChh1sqAlJUf8397ju7IZX/WasLx6VDDysrUUydzr9H8e48XN9O9xxHNMFlfV9REFMYP1JFsmra66dhTKUFYtDR8JGEV9YhQHNBes1cHgAVWMHm4opBrd3Ft1Fves4z5KizZ2P0L76MQHlFN9/KPb1fcK3hztKC21nh3ey76cvozD8zOBnbACJLPzgrqsyGi0el4xxVPb3PNPuZJpF2799tL72rZAtDaJdJTclFqdrZ2JQ7I9bwk/bjHWE6sO8p2b7ih2hahxgrUy8i37l62mLaCQ+FpGbuAECQbm4q38W5XQl3uhmA7FhMIwBwQVAG7G7koQInsZFTYGhYHDNxQGNnAdViySTdRi4xnhq0vtY8oByf/a+HMJhWmRcIrUC4qAKD6NXklWzr6FY2uJdJTSdyE0XmMWK2/zWY+Myywh76aN5mveI1E4720DPsHgSlfKm4daFHDjSMNnkETUwVu6eUwpj9TbzhNe8tUX1guhTt12gUEZUWm009n/UjvMFF4SIdfTGjYOY7VpjDbuUQTG6fou20ldCDCbdGdgAOu337Ug1vrnPsttSddOe8cUs5BgHWk8OIJpWA1ypSg6L8TWzhE+mIL/zfXStubqGCokPbiAc4mPBmei2ip2D6GzDs8WzDSSDJpGMufmqvEJ5SL/1PPiuVSywvOeBkpoq5Icj24u0UC4XUiRvLzkY+wjXb2a1gydwhNnNrrNjPfzqIUPh8V56VHshD/Kbjix/mMf0phQFbfUjUrcCMYv2b++eRpAaFH4sZMhx8aYF7nlDggNEh9421vVRQcNOOQMzbxR8DNHc X-OriginatorOrg: labundy.com X-MS-Exchange-CrossTenant-Network-Message-Id: 958a3efa-e55b-4243-c35e-08da919c703e X-MS-Exchange-CrossTenant-AuthSource: SN4PR0801MB3774.namprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Sep 2022 13:17:11.2152 (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: BmcM25GlqN2hYTKVg5go6jl4JOZYMgmy5e4WunxhTdluRytUdrEvzMfRGoubqfDmxuYWwC8cHr8zVSgrh1VzRg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR08MB4976 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org According to the datasheets, writing only 0xFF is sufficient to elicit a communication window. Remove the superfluous 0x00 from the force communication command. Fixes: e505edaedcb9 ("Input: add support for Azoteq IQS7222A/B/C") Signed-off-by: Jeff LaBundy --- drivers/input/misc/iqs7222.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/misc/iqs7222.c b/drivers/input/misc/iqs7222.c index ba12c49e972c..365e59f78f1a 100644 --- a/drivers/input/misc/iqs7222.c +++ b/drivers/input/misc/iqs7222.c @@ -1077,7 +1077,7 @@ static int iqs7222_hard_reset(struct iqs7222_private *iqs7222) static int iqs7222_force_comms(struct iqs7222_private *iqs7222) { - u8 msg_buf[] = { 0xFF, 0x00, }; + u8 msg_buf[] = { 0xFF, }; int ret; /* From patchwork Thu Sep 8 13:15:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff LaBundy X-Patchwork-Id: 603990 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 7F311C6FA82 for ; Thu, 8 Sep 2022 13:17:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232331AbiIHNR0 (ORCPT ); Thu, 8 Sep 2022 09:17:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232359AbiIHNRX (ORCPT ); Thu, 8 Sep 2022 09:17:23 -0400 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2083.outbound.protection.outlook.com [40.107.244.83]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 928338307E; Thu, 8 Sep 2022 06:17:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=F/hWUX8sdNz+Z8o1CQ60P6hhJaz5Ji8iujE5yL1+W2d411UTEzRkfZ3yfpo2gTYHovndNkpOd57ayOgVJ/TMwCmeIhPbsxmKsjmDiQfoNVg/qZlULmostcCZpvy6iubB/F5pO1b2dqJRt4fBLcny4Jx0xea0BCrWnXXuDSnLSgVP28+L1ONF78qy1iUPYpsBr1uDI5PSPccGZ1cTZ1tUFdElyhly96RRmAWvpFoHtkOJpTsH6Jf4JA1AGI/b2LS03TTxv8n0P1qiueMhRcSJ45KAIHwJ3iwNTbY+GtYDHZbR2HbRYTsqFE0GTDdgPwmMqH8lyW3tDoaxO/h4aNyF3Q== 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=Y7ZmgEroWRBoqzBKBPBXo0rXHrQOa5zwapyrt7KKPyU=; b=W38t2/JninNHpygv85pQAJ6V35Ln8cUJCdig4QYf3a4Nltb/+0MpKJghluAEuPQXXUOq8ZwT5SQOCuLA/WNCkgiooKfkwf3Iagqy5hXFGBj5cmuKkh1yuVevxDgro4WLUZd3sdd4K7j1cKnEC875LDncRrMNeFEMvZ70nY+l4SVvKRzMsWhlKnRmKTjHEdk1bbOAgwN6xQ7EnE2kP8UAeB7XaS3kwQnUezi7/e1fQhtURGdqA7CnOmSjUgbxo4kd0kJPb/2WiJkIiNjPPS0wb8fNc7kqNt2e3WAYxW7A1y5GV7i8wmahjo4YXyQFvEhrmGFoK1Sh88fL0Vr2iYxPHw== 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=Y7ZmgEroWRBoqzBKBPBXo0rXHrQOa5zwapyrt7KKPyU=; b=l2J0wJDH9hpJg/FVZSx0+DVSKVVdkm7Jj2cyBXINFnhTGib7tCTLinTGnCL3IDQvB8+SADr4jp2BMC87VLxZJBeo+4dWAEabEjmf0l6wVF0UvdO189QQ2O9b6hjF4UxhsqCuI1zDudxhjyYUUGiLBJfQaBU5vx3cDFkGCAK95oY= 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 SN6PR08MB4976.namprd08.prod.outlook.com (2603:10b6:805:6e::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.14; Thu, 8 Sep 2022 13:17:19 +0000 Received: from SN4PR0801MB3774.namprd08.prod.outlook.com ([fe80::90a1:7f76:cf5:f9ca]) by SN4PR0801MB3774.namprd08.prod.outlook.com ([fe80::90a1:7f76:cf5:f9ca%7]) with mapi id 15.20.5588.016; Thu, 8 Sep 2022 13:17:19 +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 07/11] Input: iqs7222 - set all ULP entry masks by default Date: Thu, 8 Sep 2022 08:15:44 -0500 Message-Id: <20220908131548.48120-8-jeff@labundy.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220908131548.48120-1-jeff@labundy.com> References: <20220908131548.48120-1-jeff@labundy.com> X-ClientProxiedBy: DS7PR03CA0078.namprd03.prod.outlook.com (2603:10b6:5:3bb::23) 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: 53be3bd8-330c-4bf5-e60a-08da919c752b X-MS-TrafficTypeDiagnostic: SN6PR08MB4976:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YiCUKcVOzkIGBVyxB1Nqp7NpCQcxhxMkrfUe1DFIfuFOa3wO+U0lkqlua+d102rIXLUeFpe4kIsgwaDEwVcznWSI1oxV4FGQdkFQSh9PBo9rMKmEXTiD8ts7TxzHoxVA87NF5o1jsKVRTTigkQCE4QxY8qkfO0PeC5N+2hFZigwcMC2RPJHnvKvcd95t0W8tz8gqe6T8lyUUXEy4oPk1jh7mJvZyz8R3qi/LSWHTO7CsjfSssS3K82aiSKLXhURXQ+8WUywbVRP0Q1oTkDueWdpY1m3G3H21dzojVMIVsdrmPBPCLCdrLPmdEfC3akUcZyuhcUrzGfwW5NutaIqYgA48J8CCOMNiN/OplZOtUIlT1CEA0Vx/bELn+fu8oTbNFcns3gGXd7K3TJge6mZAPvVs9sPc0Wh5UwoZP9PUz+YR90gvOoJAP7HgsRKf8nA0y8irD/futlf8qL0sRDoKmsTIqdg5P4AM//tipwIIYGTNJdHy7DB1RZQQQn1XfqGqs6g3WdhIcgy0q/qLuOrR+OdaKksRAgLXbWKsB623pLV+qnGYBMZAmXTTeihGiKmDjOYxTzaKGjkht1Fl2ON+JJqGnzoeI/EmZZSqFRRSsvCXikI+hRsNn1DSDSh95iDZEUlytZfi4eHmp8cZqeATCrt+KzgpdfVBJgmZrjNJ/WZUUwvjB8FKVe/XvDKtbzjlxD/5zpue+J+Nkj11HBSDTxMWqpJ2cv3WYQYb5UgAWB4vKhLF1YKpcsF1IKBUv/3ifRQxKIsiNAzwNC01fmXZWA== 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)(396003)(366004)(39830400003)(346002)(136003)(376002)(8676002)(66556008)(5660300002)(66946007)(86362001)(66476007)(4326008)(107886003)(52116002)(2616005)(38350700002)(1076003)(38100700002)(186003)(8936002)(2906002)(36756003)(316002)(26005)(478600001)(6512007)(6666004)(6506007)(41300700001)(83380400001)(6486002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 9Jjuv2X5FL2hFqs+dbV1gmoxZP5LUzlLi0B0JpgQBw0zh9J5gQ5WsHOPg7ffXZmjM36t6aB8rGD80xAHzBQTN2F/BSnmD5LIgnoHxG/kIZIZZleIUzjm/iXDTrDoL64nYRCai8KplstlO9l4LlMr9G36Js1xE3KLkhkx42ftfrFQdAiozL910BOd+kHdh0QmeyNOSd42Z8UcOkCPKq2LAH4pja1Lee5s4vIC0lSbwotoylxtVFEiSFkjg39ly+dz1Heq74MhEBIB/unf+v1CazC9kpsFmFGd9WACBExepzgnDuG++el4NwgPWNb9NBVLgAr+EX6bjZ6gwDcZ8N9/jJ78QLnjvWFxloOx29JhewdtpuMZvXb6EfocftVc061qgFkUViOI0+DC3DzS9G2/GLwkD7wjTEM+Y7Q98A2f66D8JShMT1l0a2Z5QqlXaVtzSuxMF5+HIDNVNe9F26jUGCu8TmMycHX1orHN0JWTOvhmh06QsjwSjDWZPPN2z3yrx0p2LpNhGIpDObFG9IkmyJ5kpfA+SqG5wFoip0cZot2yhiAcqMw1YA10NMiuJ616xXcqVCjzmeYyRpK5ayIkG0blMgFcgFWw41weFWtMc/tuvgjKD2EweXVG4KyUoRo92wUIBg0vwZjA6Ubxlcv+0dpHhxeSXgzSQQy0zmrL6eCkOhQOxh415ZrA0l19qPAdncA8SsEnEm22RlHZ403mDf1Bo45wj+nNJtoS6JIXZcaRwIqoIwe4Snx3ObISvkO2WvNnVlWRd4nVHnOwGc+0vGwoogccIORq0DqVPXWR9jv8lKfcnCkkwbdU13J5g/U3nRN0+RWosLLiNJadXeH2njTk/q5+lI6VQ0R5cr46/uQoDcoJZz1NYe10VN9ja298LCkOzD76LBxj1MkcCib06ZdsKqiQyEOiI5xuSJNqI+O1Pi47kCyqM+w0sm4mdvFsEGBS5BBAWfi0uwGcAqGvuoHkZYCYHxtRGJIHf79sl1Gu2JrBhtuFU7QE82Vx7RU0j3oZETSHT+ARrNvLX5w52O0qJjc666HvVEgezKNjJbutVFjrujXQsyzO+phCrf2nWeLvEmhClMT8mXDso6huspUwcLRcJztGgZkauiYkQqeNnGJss1qFy5kDXGNMYhBD7uuU1bJuvzb3f1pktEk36NiKkqqW7GaKp4k/WRX33B1qcTo1WgPW9P5iAcLD1p/7zvEmVAqDo/QZDnh2FWu4UaVYMc/H5BCdPQTsH5dx2240wKK4jneMPEICqR+D7ORbBeaooAp1eCaTiohKedyg92Qp3ZG5UBEKkHhVPY7OI7bbRS8rIZsK0FbjlwzmTwMbhl+yP7FCOMBxxN+OXw27jDKkQVjWKhqpNB7wdkU12NgBS/XlvmAS95GhkZ2Mirkr7zDSquDKZoW6xmKFyYOnh85Eks8uVbmDq6PX7rnzm0Aa9HDNU2KFgHuYdw4xbMDjVBPb56qSiFd7MA6jU0a3gT+P7ugfytRSPIXXzLzhJrSO99axX/s5w+MbPS+3BTzkeAenc1MPRH732+SgyGcfnLOC2xx6YxuyrUh9Ux/N6QwA2D5BTfpySsJ+97+3ujNu X-OriginatorOrg: labundy.com X-MS-Exchange-CrossTenant-Network-Message-Id: 53be3bd8-330c-4bf5-e60a-08da919c752b X-MS-Exchange-CrossTenant-AuthSource: SN4PR0801MB3774.namprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Sep 2022 13:17:19.4489 (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: ZDJTGcsmdR40JooZsteWB09fiKgdXpXCGkSQC0reFTbE/27ytJCq+30k2KPobYVMxnsF7/5sG8wm//6nW+G9IA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR08MB4976 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Some devices expose an ultra-low-power (ULP) mode entry mask for each channel. If the mask is set, the device cannot enter ULP so long as the corresponding channel remains in an active state. The vendor has advised setting the mask for any disabled channel. To accommodate this suggestion, initially set all masks and then clear them only if specified in the device tree. Fixes: e505edaedcb9 ("Input: add support for Azoteq IQS7222A/B/C") Signed-off-by: Jeff LaBundy --- drivers/input/misc/iqs7222.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/input/misc/iqs7222.c b/drivers/input/misc/iqs7222.c index 00c73a920ab2..d1a4ab3c95d3 100644 --- a/drivers/input/misc/iqs7222.c +++ b/drivers/input/misc/iqs7222.c @@ -1777,11 +1777,9 @@ static int iqs7222_parse_chan(struct iqs7222_private *iqs7222, int chan_index) if (!chan_node) return 0; - if (dev_desc->allow_offset) { - sys_setup[dev_desc->allow_offset] |= BIT(chan_index); - if (fwnode_property_present(chan_node, "azoteq,ulp-allow")) - sys_setup[dev_desc->allow_offset] &= ~BIT(chan_index); - } + if (dev_desc->allow_offset && + fwnode_property_present(chan_node, "azoteq,ulp-allow")) + sys_setup[dev_desc->allow_offset] &= ~BIT(chan_index); chan_setup[0] |= IQS7222_CHAN_SETUP_0_CHAN_EN; @@ -2304,6 +2302,9 @@ static int iqs7222_parse_all(struct iqs7222_private *iqs7222) u16 *sys_setup = iqs7222->sys_setup; int error, i; + if (dev_desc->allow_offset) + sys_setup[dev_desc->allow_offset] = U16_MAX; + if (dev_desc->event_offset) sys_setup[dev_desc->event_offset] = IQS7222_EVENT_MASK_ATI; From patchwork Thu Sep 8 13:15:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff LaBundy X-Patchwork-Id: 603989 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 4B3E5C38145 for ; Thu, 8 Sep 2022 13:17:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232355AbiIHNRe (ORCPT ); Thu, 8 Sep 2022 09:17:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232366AbiIHNRb (ORCPT ); Thu, 8 Sep 2022 09:17:31 -0400 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2081.outbound.protection.outlook.com [40.107.244.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7DE8DABB3; Thu, 8 Sep 2022 06:17:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=X4llZ9lZtOau0vjAGSXV/VFyrNK3kxQbDFMOyc7svFzgBB+GT/07f4xg9l1tsZgUpMS9vjs1jv4Z5nd9c1UVyKcUMkDXN9okNlPNfGCaK+/6P2ktCdrXUKj4v90X2WpoaMxd8+6kuHKwojjPubGXkLyyC2/RkJhoiGzYyPnWzMNojzp9XVx2JgHU9/J5c9egZ3qbh0iFlmlie/xXi2dhBnhIjbZlrsTxJZKLwvdh04r3zaWen83CBSgIpEMwuoFcH88EtitSgNxHdos6W9mEhEcJIv/eO0t5nnZ25RIQ7E3qbicYmTIugiLnRlGZIYkLi9VSYXurAwggmyh7RA32Cg== 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=0RW6JvCzeK/n0ofZa7xvCTMTOJjIlXZLlZpPD0hgU+k=; b=UFAuXhkoR92E93CvY5mtqffrhQvZK4jtJM9/7QlMWp6RJQgWgKWn8P43V4QqVfCHLpWCgdoU1azMLM05dkvBHUjZxGuCjQJuGB1XfnMLpOvJYRjSobqmtIgAHBKpC4TI7sa0IBG9oE9t6koHqs4goAyV3ZsPQN+UTaro1M2+dX/+4CL3NblR0WNGTUKA1uwIre60Tet5McdqgJdB5s86MnllyxW+8Nu7T9EdBKhcfsas5BD8lY1KsMZtrknLNPqown3Qvc8Sd4m90k7qJ61iLIybu4cZObPAVGLHCVjrgzSidTi3wZDKdL9NZHsIt/ZV0kWz6qNHyhde19u/ps+uMw== 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=0RW6JvCzeK/n0ofZa7xvCTMTOJjIlXZLlZpPD0hgU+k=; b=UAH0XEakc/xwL7szmzGgPTFV/WUC9Y1AuOTm853gk6r1hN4BTZu+Oht6tAIYrV6XerGiG/hBETES/oALPeqgSct/ikcKaQjoBlKrvKJSmpuwlfbE7JBtqJgJZO/fWUiu/Pc8RblOWrr+dyPx5xnOJu42l9ZkuHwqi9ls/QT5rUY= 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 SN6PR08MB4976.namprd08.prod.outlook.com (2603:10b6:805:6e::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.14; Thu, 8 Sep 2022 13:17:27 +0000 Received: from SN4PR0801MB3774.namprd08.prod.outlook.com ([fe80::90a1:7f76:cf5:f9ca]) by SN4PR0801MB3774.namprd08.prod.outlook.com ([fe80::90a1:7f76:cf5:f9ca%7]) with mapi id 15.20.5588.016; Thu, 8 Sep 2022 13:17:27 +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 09/11] dt-bindings: input: iqs7222: Allow 'linux,code' to be optional Date: Thu, 8 Sep 2022 08:15:46 -0500 Message-Id: <20220908131548.48120-10-jeff@labundy.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220908131548.48120-1-jeff@labundy.com> References: <20220908131548.48120-1-jeff@labundy.com> X-ClientProxiedBy: DS7PR03CA0078.namprd03.prod.outlook.com (2603:10b6:5:3bb::23) 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: 6fd42d7a-1f76-4a5c-1d17-08da919c7a0d X-MS-TrafficTypeDiagnostic: SN6PR08MB4976:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zdpQPSYLNgUfBwot18GsRNjgIcoqSrqsGDsBD2GW7yZ6z1le3DD89AV68geTetd+MNRgETQgIWUki8E1UuwtWtiqGP5YUL8Vh4aYxifFUP9/ZqIzOUr9zDm3l4RMVPKvhNj94O4OJYODNOC3hW9/LjEzqf1tSWwh3+rTkze/NIlakblRQBIQxXFOv9C6WflmFlve61o8Vo3efmF3geCRuu3EInlXyy6HWfIxe6JlbmtPwqznlBdi2E8YdbhyMH/s4Lu8eQMEuMm0n8LobRTLHL1tAbgOoUCOEemB/4YtjNt/WnvqksTWNCFQfBA4GZU/nevV+37rpoen0iSOy3oT9pi70F4qQ5Fx6FPhhls2uMS+n7v+t9itIL+dLp7DMfb7eyJiFXQd+jujinP0D7CTwJtGQR7MIHgk3ENsrgO4KTLKWzXuedvLR4aRTJC7HKZwfv0LhtVtY70K/H9rn/T7934P17/Rl8DzP+1WcUtrYnfIe2q2F4d7HMbXzl53pC28E62ljMocp/CTN8IRwIrG25e2lylzxYuW4BP16O+xiGfECfbbIEhNclq/pPg/Jgmqw/q9sd2waVh3B6az0xoG1LlEs0tvJ+GDMwrhqIrxgVdfeF4YL3lQgNYuCuKRnM31VU0ygR5r/c8bRHzlzu6Lgy8CC59fKgsATaFT/XNNEmNMpqZOxGK9YT2wYh3U6p2MILgDpFBPSLmV37r6B/3BMdj46p4R5Re9C6EmJfvFZKgefgiGW/j6ZgZDzbGv3OLLP5xG+0xdJdWJgMxvkhKTWg== 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)(396003)(366004)(39830400003)(346002)(136003)(376002)(8676002)(66556008)(5660300002)(66946007)(86362001)(66476007)(4326008)(107886003)(52116002)(2616005)(38350700002)(1076003)(38100700002)(186003)(8936002)(2906002)(36756003)(316002)(26005)(478600001)(6512007)(6666004)(6506007)(41300700001)(83380400001)(6486002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: E9gOhXLp2qWcD0tB2wwOUzU6M7YO2J5iTcJXggBSgJIPcYI8/l73vOMMUbhaOvkDprpBgwA7pb1z6e4mON8WuFN7HMX4/Hq8r1bhle8jhxIUzWvcMqWtb+JDPEcZcBy92U0m2STNFaK3xp3aG2MTrNzNfGEy3tjLFYymdOkVW40pc5A6picu+1eKVgbd6cBTBXrk6G0DjFPI0tWUsPrxQsiO1ITF/owPIkagRfoLKfNc+jfWJRXaLTmos2t/uYR/nv1FSIqtzBpxV/nPb8dKjGm23/hWK0GbrtsXQS7cSSfJ+drURSGyxNcHkK4w7U3JfGZigVOmaLLtVN+vtuZK/uKB3s3HxCj4BczA7di84GR/zaerSoqKBA4SOtL0QZ3TfiJDy8nK/TX8bnFFerJYc63/eTDOVtl0Afi6UNGdLcKPDSTw1HQJkuwEX9KRAkc2sPlUvcKG+OthHEvoN4nOnjqorpgdWkvFXFlsCOh+8Bo/IPYFkaYXG/JW11IrWX6YetScASzge4z0gqzKM6Gz6hV8noz6euA0ffb5DywnULzcIKDt5NR6Zi/6y/KyGzsFcsKA+BED2/HXiYga/9nkVKp/Nxrwwg5mrC5t1pjcbY7Wp/ReXssiyzsZv/AUeYcIXFYovSu2mZMlRcNg39NxKPPDsFTvu1M+0mszZ4+XU2dSju+tq/eB6S924JCuopgng8NQxcvFbv/h/mpWUYJdGP1gL4C4XWTPcytlyQ4hE1sjz1PGUAcoT4qQtC8sXK2Zy6sMdo2TTlehTGPtlowcPsV5Dd0zGf7yx64k7nCZEs/wFrSZgrVeaLeYeKXwgWSAeGMp1FwkeokFbOMxWi0zNC6uTjO4XT7zsLdgefzvYGC1VHJIUq7WOA0iIEqlPA+OO/gEgdMfLJVefS9DsCz9dl3j6V8OhsWASr89W7pOCR/0qSl9oId6PcLkSD87NlUyo8E9FcEx8+6QGv2kdq0qEow3LXjBxF7JYWzYEXBAAJAIxn4GKrt2akhb3Ud/L/etaukklSVMbEqEEDh1NTu73cpUU7o66q6/1bpd3t6UsGEoJOoC2PLNeG0zRnlkFOeuK0maL6d+vnjVkPZFbx4yWMmb9r/foux1XC0HLLSs22+TqzitpH4HWwH3uf5ofEdbfh838HHVeeagtuMSYKeqAgF9ThKooz8w1gfLMl5a7v4MpXAEdaoi9QOIeoWXYDxBy2Xa4ECeLuPQ/Fu0fgWEeacZglVaCG/UqKPUtbVo7Om3NJZEYAxQbqgJY14hXycCh3xBQT9dd6Nm+Iw/E6YoMeBNy85ZfFY9GQplgCMRpZBtexxqlYaaDQGU79mVY12UsHWyeIxI/C3828rsBGsuYCqj0/djieoPYEGUOroowEyB9A18LmzypqNy6Wv6xh/zhrEyiLRB0r6aJLbCc7SxooFYzK0PFYPNlSkbGzFSFD38O2PXpML11uPaqmtMzglKjzP/9fM8VM7YxUDk/O6KlCbpMKLsRZIrkU68yeNKCRejgxPSycZJBeIswVKGpM+KdbEtafB9zg908aSU9rYvUBONiPRRrGuoAUFFalm/EmCCjtUSYjRF8ReclDLpM2YB X-OriginatorOrg: labundy.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6fd42d7a-1f76-4a5c-1d17-08da919c7a0d X-MS-Exchange-CrossTenant-AuthSource: SN4PR0801MB3774.namprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Sep 2022 13:17:27.6670 (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: pvl0Bd0HBMatYCZ5QkBrvDPOeb1gtkT5ugnBGlZeON2apC3whVm97TflarEXym/PephcEkdsfH8ovSQXSzecyA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR08MB4976 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The 'linux,code' property has been made optional in the driver; update the binding to reflect this change. Fixes: 44dc42d254bf ("dt-bindings: input: Add bindings for Azoteq IQS7222A/B/C") Signed-off-by: Jeff LaBundy --- Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml b/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml index 785fb9e83354..913fd2da9862 100644 --- a/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml +++ b/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml @@ -473,9 +473,6 @@ patternProperties: Specifies whether the event is to be interpreted as a key (1) or a switch (5). - required: - - linux,code - additionalProperties: false dependencies: @@ -620,9 +617,6 @@ patternProperties: GPIO, they must all be of the same type (proximity, touch or slider gesture). - required: - - linux,code - additionalProperties: false required: From patchwork Thu Sep 8 13:15:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff LaBundy X-Patchwork-Id: 603988 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 57123C54EE9 for ; Thu, 8 Sep 2022 13:17:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232335AbiIHNRo (ORCPT ); Thu, 8 Sep 2022 09:17:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58566 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232320AbiIHNRl (ORCPT ); Thu, 8 Sep 2022 09:17:41 -0400 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2089.outbound.protection.outlook.com [40.107.244.89]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30A47BC0E; Thu, 8 Sep 2022 06:17:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I3nTIzqE9bmNc6uX+CWCnF0fM3y8VXcrmZ/pwe65IZ2LGjj/A/dtssdVO1SA2kQok7wr/idgCreB9P8RJo9GX0dx07TK0yrO7eRL/mve77gyKftrE+vQASL4in35nqQv1Baq4egdFn+KC+BNhjnPdo6SfguaQAGyX/HFn4L9dPWZBr4L3zQw95XOK4ZUam2ThaPiT0zg6SdpGubeJl08X9fxPOQipgKRbQn0H13SXSINqxP8M4w2p49TEhX0UMU1GlXgH5GDDKjKT89mhzv3pzmirGZYXYrsy0LlL2yHx8dKElnAJk/NykYIIQGZ/mx+T+b1m2/OTlTSJjbV9vybxQ== 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=8Z6dBunGTo+w4FT6iDDcKgF2TPJQGSkpXGRYizsjMu4=; b=bc91jnIhgmqVCqiLRHidOjt0GiaGMraeZlj5ywQp9woSaGqcJtC/vfLc2A5gGiJRLf44N1Vu34EY2UAn4191bgX9fW49Mla9egAB3PnWVDMuoNaNdZQVVTF/SJEEioL8flFgMctfJ5J5NfzxZbbES/iN4iDV1GXMw9LlRu3MFrVBIYAO3JhhbYowTSgqu323w1/CbpZdZytSfVhFeqWg7qdbCaRCaVmNw1L08xxkrz4XFN4DGef3Yz0vxtqvXGi8RII2VgumcvulKove71lF+YDG/kE5hGQYKVdyLNVrjXjh281rzHDNJN6U8I9y7D0LHCZoyYwcQJme1ZkmLFn+9w== 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=8Z6dBunGTo+w4FT6iDDcKgF2TPJQGSkpXGRYizsjMu4=; b=zDnY3R5krKuuzZALy/Ckw4MXnx8YQ8byWmV6sKYNtK2EQPwSizTIswnVdc9g+9099BL/kUT0pziynccuyKZIdQ/m6ZEhPij6BM0yl9nY5ZocrVsa9zBXyATkQQ3V/J1zCKfQtx09YvpKSmLcqOMoM691HsBpcKCiHPwFcEPCfA4= 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 SJ0PR08MB6671.namprd08.prod.outlook.com (2603:10b6:a03:2d0::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.10; Thu, 8 Sep 2022 13:17:37 +0000 Received: from SN4PR0801MB3774.namprd08.prod.outlook.com ([fe80::90a1:7f76:cf5:f9ca]) by SN4PR0801MB3774.namprd08.prod.outlook.com ([fe80::90a1:7f76:cf5:f9ca%7]) with mapi id 15.20.5588.016; Thu, 8 Sep 2022 13:17:37 +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 11/11] Input: iqs7222 - add support for IQS7222A v1.13+ Date: Thu, 8 Sep 2022 08:15:48 -0500 Message-Id: <20220908131548.48120-12-jeff@labundy.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220908131548.48120-1-jeff@labundy.com> References: <20220908131548.48120-1-jeff@labundy.com> X-ClientProxiedBy: DS7PR03CA0078.namprd03.prod.outlook.com (2603:10b6:5:3bb::23) 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: 8be78b89-9171-4e8f-cae3-08da919c800e X-MS-TrafficTypeDiagnostic: SJ0PR08MB6671:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FDvWru/O/EFcpRw7a5SGfq5iC1LEdRRMRKd+3Iwe/zL34LzTSvE+Fg6o/JpXT41cvNc6NX2pllp7QCJzYvjTJ5hZIt0GO1xqVBU1YL0smH4xXzfBnSrGdCHj2WeGMXM+Nz2ndcR3k4PwCz9rKPq9jjBqb9Nh/DTTmitIpeSOcDeOcrlOoMDIvRGHBRMNBqjFrSaRvQ2XYfO+fPxHqGwlWoqUXl7Nj39Che2HlEe4LpFUryH0yzBsnf4lrJ5P0qyvl1/SRvXduMSAYL2Fdm02ZqWFRUge2gsKup5d4Ynn9jchoiUphs5B4OJBnjwo6iI/oS6Xth+kSHgb+71QyLrAIrtj75APFSZc7L9yWds2Qhiqw5kI2f4GY3B/dvWhfa/E+EjyBP8L8entSHWaOPCatlYhnmZtY0tUM32LsawumvTLhZxclG4/RIksQyPUoHmy8smjXCudatdN3TJJ5bYBw3UGfzaR2hIIKVRguZZc5MrKpXTGJ62m007GyH+oHBEfFcF5T7wR77ktp/8gD0mb5B6LGRgxMDh1TiyTaBoRLixu1JaP7emRFs3DvUw26LkemUo7DP1yJ9SzsKrLUTuCu/sq2ignzlF+xCEQLZ3OnLd7MPVEPEMt+X/dBJBRUC8uQB6qdCv4O1fNjsbUVM0lLyHhtJxkV3gzZUnm0iBHoM6aPGf16XbY0VpF/9K7zh7/w5NWTBqTgzgbJ+ZZMrf80vw0BUzW0TrIDt+hElmFYaxj9AXLMeOo7Y3TcUJwqaMm 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)(39830400003)(376002)(366004)(396003)(346002)(86362001)(66946007)(4326008)(66476007)(66556008)(8676002)(36756003)(38350700002)(38100700002)(83380400001)(2616005)(186003)(1076003)(26005)(6512007)(52116002)(41300700001)(6506007)(6486002)(107886003)(6666004)(478600001)(316002)(5660300002)(8936002)(2906002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: YYhSdbpuITNMNInbPKR4QK1mkIk7RvnclHTTFg0K4TVszgBalEvbXxLqqZhW3ehEZ407M97PSVdOT7epM4xpVOOEEu+X+vKynsUqR+Cy4BFxV6HNj5JxIzsAesQwWfcuaP2FfX08QQwOAuShbm5r1MkP92Gv2Bw0mr+ZLmYA2dbYEnJvTrXwnrQw0MR2sloNVBclo/zOTxaazd1APDHzS67U3bYyWeLyJJ3HGjpz70WSufHS1hGMYQGR0Dp+4e9de1iHHjWKXWZp52USR+6SvhhoFYTStCaUjehKYrucBeNwsBYfunfKoeL+N2TmzMk8JNYLyjdaskb7IjypKOTY5xluiKcqBbE6pZcZAiCzTM4rgwELhSj+E/+U3fi47rKBhw16cFP/0IU2rXSF9lsOUkqQjzJobW8Id4DOVTt4gUzqIFvDeR+iE0E+WYzSvsHjfzgQRgVwOAl8Wr48EaIqlL9dOLa+7Y/gfPRPY28UpEzmyqQHJkYugc2wePpn9L8JKGwiaqOoVdmPdDj15eHjKQdyL7nz4hktqXnN66DO9SUeTLfymyi7togysT+rpcbxu59aKc8QVL5TMI85CZDARlmjZ4av6ayGgpYMFKk/0ne7gZKKHa0T4lzNf5DqZhj+ytPNWs60Omvtf5/LskrrA9/8o9Msroy/hClKA/E2euI7kjtkQhsikwngXl6UhsN+KNrJ0/72P+RqbA4vzNUZ0SeZtCnFSpgONZyfeu1T3+zOTpm0DUqpuI8/zkeG8pUU8JxHjkCNiG9RwlrJYI452LOThkLwEMrictJxMaj+eFzXW65fYcYzE5iopt2zJ+1g4uPSenITdHTh3FKVWfuVI2qRtVlbHnjTz3lLmvPV4iWAOPYeWKiipILQk+QaXP5IG6GqY+yhPldrRhHvnZUvRIlHmYTQFqkfhl7Mu9V+tV0CKSuzCw0faFYaLiuhhl3hci5Y/IwqomFyVOBW1LUaxvvWYGe1lPyIdxPCzUo6ouqMqa3UuF8jZQMX5TyjIQ63PjddOiSDZz3BjZB4yPnKFSx6Bje7djLY5eKWBMtcicZg8DqwEVAH+NCj8SQoSc+r6MqG5sTSGOEH+BIyH/NPCWNgdZ9G7Q2bOnayrb+x+AVsa8DAKkyzzX3RWZ8DhO9JzDg8QnG5ps7riTE97jxSyPWHLkj4F15HoMrLtxZsiYOkfg8Cy11jiZTegQwrBqcBvTFj+62OWMAmaLOi7yHz8H7FPnS1hfnL1Zi/6x/tZDIltnIk/Dn+LUxKNTevLn9ZwdTVu7+0AgPcUfcrCGObVv5ewrnGL30DiAhU+nGvdNBknHswMbXHyzIvsDDw3M7LZV/J0A4tDO6CUREQ4z/dg4zbKlWZaC0RL3wvT9sxrZCXhBr7j+VbHbI2kxNS/RPuS7m91ntpFieAqiyxo1PrpJChiO7RgQDaYM2eW58SAm77FQbuAGxHks8Dk3X/d5N9PU28f20bNmus7kMb1kVgI+KBDEtd0hjPY9Zd1AkgaCvv4TsrgujO0yNKZmqCNuv8U9pXqkOj+GHZYC814krLBzTxo/6hti2KiFJvXBXAWRK3TsLB2BYf1AU4YPxIqzC8 X-OriginatorOrg: labundy.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8be78b89-9171-4e8f-cae3-08da919c800e X-MS-Exchange-CrossTenant-AuthSource: SN4PR0801MB3774.namprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Sep 2022 13:17:37.7131 (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: xg1nMDQlio6D8vZI8ApavX2BVKHyUjoPmeP9ncNKY/WixhfgNv464XXBQ/MAr5kN6GLxA33ZBmZ62AZXq48J9w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR08MB6671 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org IQS7222A revisions 1.13 and later widen the gesture multiplier from x4 ms to x16 ms. Add a means to scale the gesture timings specified in the device tree based on the revision of the device. Fixes: e505edaedcb9 ("Input: add support for Azoteq IQS7222A/B/C") Signed-off-by: Jeff LaBundy --- drivers/input/misc/iqs7222.c | 122 +++++++++++++++++++++++++++++++++-- 1 file changed, 118 insertions(+), 4 deletions(-) diff --git a/drivers/input/misc/iqs7222.c b/drivers/input/misc/iqs7222.c index ac810b8ab69f..15f0bfa899dd 100644 --- a/drivers/input/misc/iqs7222.c +++ b/drivers/input/misc/iqs7222.c @@ -86,7 +86,9 @@ enum iqs7222_reg_key_id { IQS7222_REG_KEY_TOUCH, IQS7222_REG_KEY_DEBOUNCE, IQS7222_REG_KEY_TAP, + IQS7222_REG_KEY_TAP_LEGACY, IQS7222_REG_KEY_AXIAL, + IQS7222_REG_KEY_AXIAL_LEGACY, IQS7222_REG_KEY_WHEEL, IQS7222_REG_KEY_NO_WHEEL, IQS7222_REG_KEY_RESERVED @@ -202,10 +204,68 @@ struct iqs7222_dev_desc { int allow_offset; int event_offset; int comms_offset; + bool legacy_gesture; struct iqs7222_reg_grp_desc reg_grps[IQS7222_NUM_REG_GRPS]; }; static const struct iqs7222_dev_desc iqs7222_devs[] = { + { + .prod_num = IQS7222_PROD_NUM_A, + .fw_major = 1, + .fw_minor = 13, + .sldr_res = U8_MAX * 16, + .touch_link = 1768, + .allow_offset = 9, + .event_offset = 10, + .comms_offset = 12, + .reg_grps = { + [IQS7222_REG_GRP_STAT] = { + .base = IQS7222_SYS_STATUS, + .num_row = 1, + .num_col = 8, + }, + [IQS7222_REG_GRP_CYCLE] = { + .base = 0x8000, + .num_row = 7, + .num_col = 3, + }, + [IQS7222_REG_GRP_GLBL] = { + .base = 0x8700, + .num_row = 1, + .num_col = 3, + }, + [IQS7222_REG_GRP_BTN] = { + .base = 0x9000, + .num_row = 12, + .num_col = 3, + }, + [IQS7222_REG_GRP_CHAN] = { + .base = 0xA000, + .num_row = 12, + .num_col = 6, + }, + [IQS7222_REG_GRP_FILT] = { + .base = 0xAC00, + .num_row = 1, + .num_col = 2, + }, + [IQS7222_REG_GRP_SLDR] = { + .base = 0xB000, + .num_row = 2, + .num_col = 11, + }, + [IQS7222_REG_GRP_GPIO] = { + .base = 0xC000, + .num_row = 1, + .num_col = 3, + }, + [IQS7222_REG_GRP_SYS] = { + .base = IQS7222_SYS_SETUP, + .num_row = 1, + .num_col = 13, + }, + }, + }, { .prod_num = IQS7222_PROD_NUM_A, .fw_major = 1, @@ -215,6 +275,7 @@ static const struct iqs7222_dev_desc iqs7222_devs[] = { .allow_offset = 9, .event_offset = 10, .comms_offset = 12, + .legacy_gesture = true, .reg_grps = { [IQS7222_REG_GRP_STAT] = { .base = IQS7222_SYS_STATUS, @@ -874,6 +935,16 @@ static const struct iqs7222_prop_desc iqs7222_props[] = { .reg_offset = 9, .reg_shift = 8, .reg_width = 8, + .val_pitch = 16, + .label = "maximum gesture time", + }, + { + .name = "azoteq,gesture-max-ms", + .reg_grp = IQS7222_REG_GRP_SLDR, + .reg_key = IQS7222_REG_KEY_TAP_LEGACY, + .reg_offset = 9, + .reg_shift = 8, + .reg_width = 8, .val_pitch = 4, .label = "maximum gesture time", }, @@ -884,6 +955,16 @@ static const struct iqs7222_prop_desc iqs7222_props[] = { .reg_offset = 9, .reg_shift = 3, .reg_width = 5, + .val_pitch = 16, + .label = "minimum gesture time", + }, + { + .name = "azoteq,gesture-min-ms", + .reg_grp = IQS7222_REG_GRP_SLDR, + .reg_key = IQS7222_REG_KEY_TAP_LEGACY, + .reg_offset = 9, + .reg_shift = 3, + .reg_width = 5, .val_pitch = 4, .label = "minimum gesture time", }, @@ -897,6 +978,16 @@ static const struct iqs7222_prop_desc iqs7222_props[] = { .val_pitch = 16, .label = "gesture distance", }, + { + .name = "azoteq,gesture-dist", + .reg_grp = IQS7222_REG_GRP_SLDR, + .reg_key = IQS7222_REG_KEY_AXIAL_LEGACY, + .reg_offset = 10, + .reg_shift = 8, + .reg_width = 8, + .val_pitch = 16, + .label = "gesture distance", + }, { .name = "azoteq,gesture-max-ms", .reg_grp = IQS7222_REG_GRP_SLDR, @@ -904,6 +995,16 @@ static const struct iqs7222_prop_desc iqs7222_props[] = { .reg_offset = 10, .reg_shift = 0, .reg_width = 8, + .val_pitch = 16, + .label = "maximum gesture time", + }, + { + .name = "azoteq,gesture-max-ms", + .reg_grp = IQS7222_REG_GRP_SLDR, + .reg_key = IQS7222_REG_KEY_AXIAL_LEGACY, + .reg_offset = 10, + .reg_shift = 0, + .reg_width = 8, .val_pitch = 4, .label = "maximum gesture time", }, @@ -2213,16 +2314,29 @@ static int iqs7222_parse_sldr(struct iqs7222_private *iqs7222, int sldr_index) for (i = 0; i < ARRAY_SIZE(iqs7222_sl_events); i++) { const char *event_name = iqs7222_sl_events[i].name; struct fwnode_handle *event_node; + enum iqs7222_reg_key_id reg_key; event_node = fwnode_get_named_child_node(sldr_node, event_name); if (!event_node) continue; + /* + * Depending on the device, gestures are either offered using + * one of two timing resolutions, or are not supported at all. + */ + if (reg_offset) + reg_key = IQS7222_REG_KEY_RESERVED; + else if (dev_desc->legacy_gesture && + iqs7222_sl_events[i].reg_key == IQS7222_REG_KEY_TAP) + reg_key = IQS7222_REG_KEY_TAP_LEGACY; + else if (dev_desc->legacy_gesture && + iqs7222_sl_events[i].reg_key == IQS7222_REG_KEY_AXIAL) + reg_key = IQS7222_REG_KEY_AXIAL_LEGACY; + else + reg_key = iqs7222_sl_events[i].reg_key; + error = iqs7222_parse_props(iqs7222, &event_node, sldr_index, - IQS7222_REG_GRP_SLDR, - reg_offset ? - IQS7222_REG_KEY_RESERVED : - iqs7222_sl_events[i].reg_key); + IQS7222_REG_GRP_SLDR, reg_key); if (error) { fwnode_handle_put(event_node); goto put_sldr_node;