From patchwork Thu Mar 23 09:31:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan \(OSS\)" X-Patchwork-Id: 667109 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 D946DC7619A for ; Thu, 23 Mar 2023 09:31:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230343AbjCWJbA (ORCPT ); Thu, 23 Mar 2023 05:31:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59232 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230211AbjCWJad (ORCPT ); Thu, 23 Mar 2023 05:30:33 -0400 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2049.outbound.protection.outlook.com [40.107.104.49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EEFCA3B0DC; Thu, 23 Mar 2023 02:26:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=K0QK2GUhFDXulqDnlUGbXx2IaVpcwn7yAdBK6UjgnzgDFqkZwaXqq7CUoCOITKsJASHQKK+OcI8vFzM+ugbmSnQ5R8I5bsRy08sXmzNlr5H9N7icED+rSxxF0PmhhzbbFn1reByhB7359PHGcdatoaZwVIt3F+BXGwFiSEvzJapfD0JduOodO0YVQpQ8xaUzh0zpK+52Qau03L4sljUPiybRh5Y4FyvSWLKuPrz99ZR66bmb9N30984hBHuH0gaQJVZVQRKhNgJZSA+x4qjbbTgXuSFPaaRVBJonkXFyqr4imfgEjPBaD74/kRJK/+WP88jKeCCVhDg74gRBIWS5FQ== 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=GNqfyKCgdVd66995CTm9Q6VbVxxWeEAGCFI+VWWSogk=; b=R5mjDh8Ao8pnq6cFlpvUArDLoh92Erm5wcgmd/VfwfzeuCGXUE2Hpn+UYfF4MTD+3ITfP2c+bwMsqXECYKlt9xTqNjCwGNM/b6CLL6aAJvS8VGugM6PWg7mXw/bbneEnWI2as3At48bo1lWGdmamyIxT8AfVOJ58HLauUrcyp3A0vz6pTG9Sd1TooNcOWBIPY+Tx8wbeQvZ11Jc3TDN8jhqf/6O3x99m+jy1yBKZT2MPU1o2SwFpXPiTOlYOFkbkxjyGFPT7EgtnzfsTlmNKznpZ3/WzYP4dtSUeeiSvc/IOYX8FG3ISduD7MA1VnXnLD6mlNMn0ArK8hTj6RpknNQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GNqfyKCgdVd66995CTm9Q6VbVxxWeEAGCFI+VWWSogk=; b=E7t6JsJ4/m3GqnEsahMh1S5MONkwSbMMPfUXgSelJdRDG0Y/LOObSadXmbiNxtRoijj+37RniHn219vFt5jGFKt8fhrJ2RLUiQaenGo76hfgfCMzjoq5YhmPQA31KNN4Iz1v0Ew+4m/Vv2Kq7xHZ86LQcLn/at6RkfrG4g7geSk= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) by AM9PR04MB8603.eurprd04.prod.outlook.com (2603:10a6:20b:43a::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.38; Thu, 23 Mar 2023 09:26:43 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::f55a:cf12:da08:6d2a]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::f55a:cf12:da08:6d2a%9]) with mapi id 15.20.6178.038; Thu, 23 Mar 2023 09:26:43 +0000 From: "Peng Fan (OSS)" To: dmitry.torokhov@gmail.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org Cc: shawnguo@kernel.org, aisheng.dong@nxp.com, linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, Peng Fan Subject: [PATCH 2/2] input: imx_sc_key: add wakeup support Date: Thu, 23 Mar 2023 17:31:41 +0800 Message-Id: <20230323093141.4070840-2-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230323093141.4070840-1-peng.fan@oss.nxp.com> References: <20230323093141.4070840-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SGXP274CA0020.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b8::32) To DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR04MB9417:EE_|AM9PR04MB8603:EE_ X-MS-Office365-Filtering-Correlation-Id: d6269582-5155-4955-8302-08db2b80b6fc X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dG5StSBvl+IwP2I6YBRMtZQvToL5qOqQffZNHxMBuSV5jJvYGIF3mRa1eoVBxk703V27rgCrh+UsPLk5VhFsp3LBMoaPDJz9TVWyUy5ReRiWET1xmJHWTUTOx0fOaiJd9LPLlgESd8WODTNSNHJ987rEvR/RMjjGZ6WkpS6luKbVy37RU+7ytJAc2r5yz0iWt4i51Tla9vMTUxaC3wnrXbDooRp29mDuE2gkHmynvsFyRitcNIBm5hiaHJOF6ky0a2ulFv85sg9ZMHnLZEGxyw1hFv/I0Yb2V42Picq+KPbxMcRzVsKaoa9kZMz8dEmyUYMbJGLmEF+h+SvoSRO0MueehPTjcqW4+Cd13eyfXCbktQdagyzkAKu56+kZkaX9CLf8qkpqqu9+X7KMEkcSQMKD4SCl2IAifv07TB2dvKBNqiOsK9MbqZQlNwTWqXbYorS0IkhQ8ZWZpj5IkERv98BR2x0FrX0hk4dxr+VVXUspXa/kplZE9ZfrFnsbShoXbYEF2FKNFHH1Etl+K3XbZhVemsNxFJCEckofTXnxg37qPyCg2SrR2U6FVIlWhTilDV2eRnmIyOZTS7YrAhEPSqYIP1miUzkHrZOsSxby9Yel2axfWTb0EHeVFRjnNnQG8a0GGQopiSXcsRVzhxng4ORqr70hjVnLc+Ya22k7GC/wZmlp4sxtE08BdBR9joGWvFbbNOWgoG8qx02/mvlJiw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DU0PR04MB9417.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(4636009)(39860400002)(366004)(346002)(376002)(136003)(396003)(451199018)(86362001)(38350700002)(38100700002)(2906002)(4744005)(41300700001)(66476007)(8676002)(4326008)(5660300002)(7416002)(8936002)(66556008)(66946007)(2616005)(186003)(6512007)(83380400001)(6506007)(1076003)(478600001)(316002)(26005)(52116002)(6486002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-Anti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bFPWxfk4+zzg9OXBhcIPC+ubW88ImM40n2P4lyQRcfHVxifoNAyPjyU9W9g/hqOPvjyJwbHfn5eGLwX5Ansz3NPDPMCD19rL8Q3XVv1vJBPjTOi585wwyG3rn/MjBe6FthlCI7p/WLfx8X+5/yt+wTUUo/7e+xr0DRMqM02zfrYEWdr5rgXJscLz7nbmo63a/WmwVu5BmYHGq44mx8nfq8dZohIUNcrmcOLHg/GX2JM/HlJnoNjcZXgl/A+eSUuUCvuokYZ9cJVn3wxO6DISvXP+rEpWStaRP8gP1ZYPNwbERoIdW3M+TxRLA9QsX1lx0lrOz8/40kWDaT6U8iK/CBlvl5zTllXtEaHLfQCbgjOYRxlk+3xJE2cWHptjoMTP4uIfEsGc4YPUMEcu/iYDP7mbr7MeD42e+uUVRatpZOcQ6ryH4Huh/FPhPzSUU0BKskxbwwwohIRHDAjrj4qQnp+RLZWieTEp5TVvc2GB8+vgPMuvRRXkHo3z9o1J4wqNeAcjvFdl+k0Ez28+3cIN2YCeja X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d6269582-5155-4955-8302-08db2b80b6fc X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Mar 2023 09:26:43.3085 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: fxDBghMnInHJDvjwHWV6QedlYGzhwH66wbQS91uEF7cagPtmtkPrx1sm30PardpBXXXx0f1HPyI1dF9uYzbayQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8603 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org From: Peng Fan Add support for waking up from system wide suspend. Signed-off-by: Peng Fan --- drivers/input/keyboard/imx_sc_key.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/input/keyboard/imx_sc_key.c b/drivers/input/keyboard/imx_sc_key.c index d18839f1f4f6..234f23cf9990 100644 --- a/drivers/input/keyboard/imx_sc_key.c +++ b/drivers/input/keyboard/imx_sc_key.c @@ -151,6 +151,8 @@ static int imx_sc_key_probe(struct platform_device *pdev) priv->input = input; platform_set_drvdata(pdev, priv); + device_init_wakeup(&pdev->dev, device_property_read_bool(&pdev->dev, "wakeup-source")); + error = imx_scu_irq_group_enable(SC_IRQ_GROUP_WAKE, SC_IRQ_BUTTON, true); if (error) {