Message ID | 20230826-feature-st1232_freeze_wakeup-v2-2-29ae9f747137@wolfvision.net |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp1418880vqi; Fri, 15 Sep 2023 18:20:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEfKVj+dlaug57mA7Vk2x6BgkezcYqTck4d5Sp3NUN0fxDpfi5PffssNqo2lsFsteZQY3q6 X-Received: by 2002:a05:6a20:320c:b0:133:86c:e805 with SMTP id hl12-20020a056a20320c00b00133086ce805mr3304381pzc.10.1694827222570; Fri, 15 Sep 2023 18:20:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1694827222; cv=pass; d=google.com; s=arc-20160816; b=ENHosHIIhfaSsks/E9kcWBODcFsPUAxJoVR3QO1nvTy0xqnfu+NcPQMX8emXsDvIJX 9QjIupvQGBAM5jceexkhvFFjIhqepgT3uBAeuGSerMJM2OXE487RxtUQ6AfC5qpih8HQ 6BG0YQ0okQHGzW1IC3quVXagUdmr4GNVrRmmjsbCFZi8UKQQBe5YJLVwCiR99uREp2l8 Qw6OrTtM7z2fd3DpK9ELpHokRWZUgCuIa0KrQuy1/jZunZ9dZ5h9iV3yQPaVs5fx3/ic 5BvVsXeAyl986OQIoFQ4bJvuhHWUPff+uujasq4UDY5veS5h3khlk5NTl6TDHHXs94AL phWw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:cc:to:in-reply-to:references :message-id:content-transfer-encoding:subject:date:from :dkim-signature; bh=LALxW/oAIyxG7vh7eSxOonN+J0b9RaumMYhm7Wjenvw=; fh=a8Qb7YIebk0ucpJ+B2DGlXr8ABTshRDxe7IAvR150AE=; b=adysFXX1b9bHao9i9RyDX1bEU6b4G6EnPvM6O9x9xCfDmwMAGMRoCO+MEHmEcVOi+a REiVa0lXvWkGXCnBrCIpGB9QlqQugoHOUUNP3LyXVTn91aDP0EmrSzGbDcPfhYSW4iHR kyG+h9T5SO7J4eiHKbmhys7fw8rZfNojjKyL8xEX2ksLHUY1ofnyK82ou9pLiaHF4jIk nFJLoaK7GqIywl2C5JbrZEtMctdrgw+3nTETYZty/Hx2zJt9q3eFYONBk+E59ndO0NA8 23yLxXVScwafFjmnLVW19CVK8Xgmh2amkOiQ/whMayVzoIBzzBG3UOXtmTxah8uKhlJb xAgQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@wolfvision.net header.s=selector2 header.b=uajlXT9m; arc=pass (i=1 spf=pass spfdomain=wolfvision.net dkim=pass dkdomain=wolfvision.net dmarc=pass fromdomain=wolfvision.net); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=wolfvision.net Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id y10-20020a170903010a00b001bb907f3981si4022969plc.302.2023.09.15.18.20.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 18:20:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@wolfvision.net header.s=selector2 header.b=uajlXT9m; arc=pass (i=1 spf=pass spfdomain=wolfvision.net dkim=pass dkdomain=wolfvision.net dmarc=pass fromdomain=wolfvision.net); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=wolfvision.net Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id DCC92806E568; Fri, 15 Sep 2023 06:47:59 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235487AbjIONru (ORCPT <rfc822;ruipengqi7@gmail.com> + 31 others); Fri, 15 Sep 2023 09:47:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235461AbjIONrr (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 15 Sep 2023 09:47:47 -0400 Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2070.outbound.protection.outlook.com [40.107.105.70]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A8691BEB; Fri, 15 Sep 2023 06:47:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W3whhnAF5mLhTdfVesRNd/GgYr15BuI3u/lQ2joCYM5rnbIVy2rJD00a6Tdjm7jB0DGV2sdqR+T0P6Ju5Q2IucYqbQyjcmP4vy38i9X5XqymDiOK3WLzLKgf3LCarmUsGnO92lF254E6r48Ak7O+LgkksLpX/VBsa5+begXyt8su8tlTj77Mkuuma59GoHbnjEEJTl6q2C7yHK756CkiZbgiAC6UTKTva5qyA972hh4ItjOeBbxfoVqS9/3eY1lKxlPpiIcpHjjz43gIzfuq75zKWQ+vHx6u8HTbWq0BD0fKJ89rjG6XI3/5Y/mvTloQIVMIEMMJmLxWyq6nOdd7DQ== 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=LALxW/oAIyxG7vh7eSxOonN+J0b9RaumMYhm7Wjenvw=; b=n7z0w36Woih7aeIg8hWd1jvhxw59Lo4BC0nrXMHwRei2wRu+EB7qmo7PqCYtpVY5Odt42Al6LLOpeQx9pMyFs0PSNHo9mOS3HJ2af11SpOQI4xDpz58GsX1SQs0NwHI7qNvjW0ZmxdQQiwwH0/vNSNXFnI3+yOSspzxJdTO06ZcHvwhZ8RJxtk9hT3RF5YhL8hUx67LlJRG81c4ocCkl+DGQ3fRC1H/YQZeojGyChnW6/96qXipRmLC5X43SGnFiqBfo8pPC748j6CES72fTiWLn7dZN9uc1EEP0cMYNiO9WBBvhbEc/8lDBIDiKJSfHG3lPP/L78nHsyDoyGsNz+A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wolfvision.net; dmarc=pass action=none header.from=wolfvision.net; dkim=pass header.d=wolfvision.net; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wolfvision.net; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LALxW/oAIyxG7vh7eSxOonN+J0b9RaumMYhm7Wjenvw=; b=uajlXT9m/K3l5b951EYzODudZ1jDMFJSl3WmZaTGdY9bsZlqRuU23BQzZXV+irFt/yYGTfUjduB3whIIyzklWJJbuVkkDAoTN/wkbvbyuep/GRCJYX0AWp5MS5QiiNLDeDzecDjR0Ygjxm/AhVJGpc/2KYlIyZeC28ejitUCoGE= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wolfvision.net; Received: from VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) by PAWPR08MB9783.eurprd08.prod.outlook.com (2603:10a6:102:2ee::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6768.31; Fri, 15 Sep 2023 13:47:37 +0000 Received: from VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::bc92:216b:11ed:db63]) by VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::bc92:216b:11ed:db63%6]) with mapi id 15.20.6792.020; Fri, 15 Sep 2023 13:47:37 +0000 From: Javier Carrasco <javier.carrasco@wolfvision.net> Date: Fri, 15 Sep 2023 15:47:25 +0200 Subject: [PATCH v2 2/2] Input: st1232 - add wake up event counting Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20230826-feature-st1232_freeze_wakeup-v2-2-29ae9f747137@wolfvision.net> References: <20230826-feature-st1232_freeze_wakeup-v2-0-29ae9f747137@wolfvision.net> In-Reply-To: <20230826-feature-st1232_freeze_wakeup-v2-0-29ae9f747137@wolfvision.net> To: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Javier Carrasco <javier.carrasco@wolfvision.net> X-Mailer: b4 0.12.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1694785656; l=1867; i=javier.carrasco@wolfvision.net; s=20230509; h=from:subject:message-id; bh=o408kdN/AxMKMa4Y2r3gFHy5WAht80gNXp9pdeuz7ak=; b=2pGM2GOIs9OZ9STHxUNzvClhwzeOp6P8fd/aDww2jHScsECTYrCwWU9Xa3ycrpIau3poIe8Dr L+Lsl8WrQNPDHCpR+XeG6CSw2+AjlsGzC3f6M0anIH+0HYZK7nd2qy5 X-Developer-Key: i=javier.carrasco@wolfvision.net; a=ed25519; pk=tIGJV7M+tCizagNijF0eGMBGcOsPD+0cWGfKjl4h6K8= X-ClientProxiedBy: VI1PR08CA0233.eurprd08.prod.outlook.com (2603:10a6:802:15::42) To VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR08MB4974:EE_|PAWPR08MB9783:EE_ X-MS-Office365-Filtering-Correlation-Id: f0234497-bb9d-4b86-1b56-08dbb5f2523a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gT2lOEChJfZ4MwsA3hEutE64NaCkYO1giojBSmKw/KP8mIUHj0/f+b1B3u2x5lYf5jCEa10lDghPDZiRu4IvQxjsxmfpkpAyBC7PTQ9JNA8zQYkWaKbIYPk7atU2B4aOcLU3AZYMFq4Xa+8/7n0cSD0UAhCM757t1JGAQKEc/BS+oY2wySfy02nLLX0h74dVe77xfws4ga0yQ6C5b7OkCgvK2W/CsCgjK/BTd9GS2UnMxsyMytGKHnLf331VDr+09PNqO2kMJUQ8JgV1dOXdbZfm7mgY/cayVmcj+yBDeCgWHPVj9gss59T5mbPNaqCZhMQIbIYKfW8pdBSCyp2gte5Aad+g7BXqs5WhN1Mgohi38xtxBmbIQgoqaeGBrQwdPDR8ICiCRi9q3L5xXCxegCYGcnRF6C6nphvcq2tH64L9cqp/5bMPweIPHNz47AAjWCGiGLM9Uia+A8YC5g6OgRgjznTMoKavn8zHGAv04mjiFZNkuS0sKjnLMyQWwL+0iT5NBHAdfqn/mM1kEKLRJ7alKlm5KbYBvfci0QbnVCjrPY2Y0cAzVvrUvOik2tWdL+fTwj/2XMLJNEAqKISFPtWEsHwI3+nUCJM6Kc7pU4P3AzgmVpcE3R0/a7NqcsXe X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VE1PR08MB4974.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376002)(366004)(39850400004)(136003)(396003)(346002)(186009)(451199024)(1800799009)(41300700001)(6506007)(52116002)(6486002)(6666004)(38100700002)(26005)(36756003)(6512007)(86362001)(38350700002)(2906002)(2616005)(83380400001)(6916009)(8936002)(8676002)(478600001)(5660300002)(66556008)(4326008)(44832011)(107886003)(66946007)(316002)(66476007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-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4ryPya6xCzAOCbfyBHhoQjLD4jPckC86sGmA70sggsIkm6mg3YBR0YG4qPUzOcl?= =?utf-8?q?TewdSlyTY4OMnRRhv4COsoQkMApQHJfMHt3XQLcJOGOXbV8Xeeqmbq1zuhc4HJgZy?= =?utf-8?q?NTGnhfamBwY1ufYvNadtQ2bhCkmicyTTbdTBPOjkVMCf2/FxB9iLiM1aEQJEgMTtJ?= =?utf-8?q?zIVlqAI3hTsJ1cQZgkUiDMrZI7+LUm30qBQmZ4JUo8eamAhq1dnOW9JeNUg4mi85T?= =?utf-8?q?GDta1CiEtCWp7U/Gn3Pwi6qRn+BJGjXzUKpQRT71bY/YsMquSkw0IgORaWd9v5vWs?= =?utf-8?q?iB7zFQmO4YPlz1B3dNaNGCXIUH7NvirZjnHN5iYiQJIa4ffXXPwOy/8aHRfQT3VwC?= =?utf-8?q?n/VecwSOFSb5E59TN9hwtMfKOc4FSBee+IvXDZdtooDAb+RJQD93WguOUPLlGYKvl?= =?utf-8?q?7k2n0EPoRw5kTbGnLI62adZune9SSiQjRtLX58vSxNDJ9fWDGI8T6s3Mm6G32kWo9?= =?utf-8?q?yvFFWaEr7tRi8G10mcWkeL/04TQrp99HK8NLhD+RLqK7+SKMc2jfYvZo5U/wDZ+sx?= =?utf-8?q?on1VDntYrvjYxCroPqHH1YHH7PW2eNkQveq/0zLRwEceY5t/aMT7+BCrpoYmlVwGR?= =?utf-8?q?oX4lfK3lmZd09k7Jktb1YojBzIqA9LGS+n6qFEZpLLyq9xGPpcNaIMorj90gHSkbk?= =?utf-8?q?llwo15UuAH5V2NFHk6gnhNftHrN8ogr51X3JX4W8UwtQlnX3Lg1flJY=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: f0234497-bb9d-4b86-1b56-08dbb5f2523a X-MS-Exchange-CrossTenant-AuthSource: VE1PR08MB4974.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Sep 2023 13:47:37.0666 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e94ec9da-9183-471e-83b3-51baa8eb804f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: r+haayAeTfl7g0aUZjZSJaVWTTy3UN0LVfEtw90NE4sNbMUFdJKTqYhcVDL6d9i0MtA0Z0QL7mJmTWP9cChomPzVMyrMfDcVOmPyUIfqHo4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAWPR08MB9783 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 15 Sep 2023 06:47:59 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777155150086104159 X-GMAIL-MSGID: 1777155150086104159 |
Series |
Input: st1232: wakeup in Suspend to idle
|
|
Commit Message
Javier Carrasco
Sept. 15, 2023, 1:47 p.m. UTC
This device driver provides wakeup capabilities but the wakeup events
are not reflected in sysfs. Add pm_wakeup_event to the interrupt handler
in order to do so.
Signed-off-by: Javier Carrasco <javier.carrasco@wolfvision.net>
---
drivers/input/touchscreen/st1232.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/input/touchscreen/st1232.c b/drivers/input/touchscreen/st1232.c index d0ee90abc293..ad18d3944bf2 100644 --- a/drivers/input/touchscreen/st1232.c +++ b/drivers/input/touchscreen/st1232.c @@ -59,6 +59,7 @@ struct st1232_ts_data { const struct st_chip_info *chip_info; int read_buf_len; u8 *read_buf; + bool suspended; }; static int st1232_ts_read_data(struct st1232_ts_data *ts, u8 reg, @@ -173,9 +174,13 @@ static int st1232_ts_parse_and_report(struct st1232_ts_data *ts) static irqreturn_t st1232_ts_irq_handler(int irq, void *dev_id) { struct st1232_ts_data *ts = dev_id; + struct i2c_client *client = ts->client; int count; int error; + if (ts->suspended && device_may_wakeup(&client->dev)) + pm_wakeup_event(&client->dev, 0); + error = st1232_ts_read_data(ts, REG_XY_COORDINATES, ts->read_buf_len); if (error) goto out; @@ -345,6 +350,8 @@ static int st1232_ts_suspend(struct device *dev) struct i2c_client *client = to_i2c_client(dev); struct st1232_ts_data *ts = i2c_get_clientdata(client); + ts->suspended = true; + if (!device_may_wakeup(&client->dev)) { disable_irq(client->irq); st1232_ts_power(ts, false); @@ -358,6 +365,8 @@ static int st1232_ts_resume(struct device *dev) struct i2c_client *client = to_i2c_client(dev); struct st1232_ts_data *ts = i2c_get_clientdata(client); + ts->suspended = false; + if (!device_may_wakeup(&client->dev)) { enable_irq(client->irq); st1232_ts_power(ts, true);