Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp5080838rwe; Tue, 18 Apr 2023 01:35:49 -0700 (PDT) X-Google-Smtp-Source: AKy350Yd0TU/xyK4JJXCuGIPqBK9j0FsAeC220AQurmN093dKJNFUB5n/vyjG2o7mqarY40gKYEv X-Received: by 2002:a17:903:32ce:b0:1a6:3c64:512e with SMTP id i14-20020a17090332ce00b001a63c64512emr1574498plr.18.1681806949226; Tue, 18 Apr 2023 01:35:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681806949; cv=none; d=google.com; s=arc-20160816; b=v1lGyJsEQPKOhuzwE+0HmfbtjDlaCt0kO5yBU6zFW+4jDBgVg3TC7/dYB8uyyhYAoY FfoDaRRNBKg4eLB4vzR5Xe9kuS/+Guk4hclGz3fRu+SQF/OLVluKtG7NdVTmcuwt60ew iZJrdLr7hG8ji9siXz2I+IBUD8X6O3MA3YDrMKGWBL9tBl/CBwNrb/xFAay5+qtYY839 nxWi15aSDsbDL7cK/O+yXjyqNoU1LrGHt4fk0vs4gQeHWGUYPNCnLcMqrjtdppKTT107 0tvllMsCzSjXhkfgrp4FpZ66bvtkk/Lpb2cVT6tAg/dru8boKFid6CHV5yZdD1H8ZV5i kS9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Zx9sLlnqlOZjd6yEIsiTu/BBjp44dTQyzvDnp70eYm8=; b=ijirMTdW3lCCfqV5m3orD+zA5cjUAwU9X8UmQ5iuVHkRVCqqDe5dZkLmaiBj70aIwJ tTet01xKcglpVtG4BeYS9tuFezz1BDuR71WURAidlu9VB2ddoSGbagOpWwp1YiRF7c6F eAObxa2PKBd3CF7cs6IQi94CKbMO5knkrIVGVU5KAQAB+AqBOHwD3q+rKt5gN+skZV+p CKNQ/TQlYqVz1Lm4aNtMC4/fm7UtSQjv59Pwef7lMTh0ABnuXi9O7Y82+BWb0NTIW55u M0cNIpj41/31xnn5vHwhxiHM1qDh+srBqVvAFrjAHsLugVWVY+BJmailzJPMqD67nrG1 ByLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=swjKzcvA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n12-20020a1709026a8c00b001a527a498fcsi12905832plk.169.2023.04.18.01.35.37; Tue, 18 Apr 2023 01:35:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=swjKzcvA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230181AbjDRIdY (ORCPT + 99 others); Tue, 18 Apr 2023 04:33:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229838AbjDRIdU (ORCPT ); Tue, 18 Apr 2023 04:33:20 -0400 Received: from mail-yw1-x112c.google.com (mail-yw1-x112c.google.com [IPv6:2607:f8b0:4864:20::112c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2095C6A76 for ; Tue, 18 Apr 2023 01:32:48 -0700 (PDT) Received: by mail-yw1-x112c.google.com with SMTP id 00721157ae682-54fbb713301so205852287b3.11 for ; Tue, 18 Apr 2023 01:32:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1681806765; x=1684398765; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Zx9sLlnqlOZjd6yEIsiTu/BBjp44dTQyzvDnp70eYm8=; b=swjKzcvAN32jeZvEshQ/vtH2R7c9QJ9Qfmsht67lFgv03sJxnJhaKEnkpdHBEVNBnQ 4yLX7RWjJzuwtHymyFpVjJ+78xIbyNiRSaVHkhR1yvyLx57kxI14O/PPUoQo2ERHIIPJ yCv00TYeR7wIuh987ftdTaxA6gf8RLQ1V9ehc7/GsNPzq5VnMKSeiHIANeDuwMfhf1ER zh8vu0VDWzAjRWFcfe9zuNs8GTqFHMcEO+qm54UN6vqUm1W8XqE+44cwdIt8BNpjW+HU p47x5+11IUOYFbfgf5lBdICuLE6/5rtPqruSjvbw4DNwIHnw3IJ2HQZ+rPlMMgp4P3lT 4sww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681806765; x=1684398765; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Zx9sLlnqlOZjd6yEIsiTu/BBjp44dTQyzvDnp70eYm8=; b=EfqDbiBD2SPR8Pkbf4tfTk9k8TmEjc+pfNhSyACZrxZdTL4mEi2fNq2bZHsINqHllm IMxQDq0Ix7t8TpvYtQ/ABX0uUbOKFRfgL5lk7iESYj4sjw7N3kpve1OfKH/FhPbfKTCz WOR9RlE1F2hMAVijTmfn85oNrOueO49dCfKQvD9pJnbIwFXAuFWhztftDrOvZ+TUcm97 BtYVVve0X4S5VBX7Cnl6M6dplypOgmHSpsdMM6CVZzgJogwqoQDSdKyfd8af4laHtN53 c1CdIKqo1/W5R5HK6SkfvFRkL6fTbHLQvg6vOGUa1oZwudSKFHRUj0bkaN2MvKTOQF7w iySg== X-Gm-Message-State: AAQBX9db6Bu9cjWoIttA15ppeFNcuPoFhk4ru3sX+JFLM8H6fHWUZbMG vaZNSNj8z3ycJ39uVOtG8HeZN9WFDeH8yHXQ/PTGGA== X-Received: by 2002:a81:4896:0:b0:552:a840:9da8 with SMTP id v144-20020a814896000000b00552a8409da8mr9009367ywa.52.1681806765312; Tue, 18 Apr 2023 01:32:45 -0700 (PDT) MIME-Version: 1.0 References: <20230323093141.4070840-1-peng.fan@oss.nxp.com> <20230323093141.4070840-2-peng.fan@oss.nxp.com> In-Reply-To: From: Ulf Hansson Date: Tue, 18 Apr 2023 10:32:09 +0200 Message-ID: Subject: Re: [PATCH 2/2] input: imx_sc_key: add wakeup support To: Peng Fan Cc: Dmitry Torokhov , "robh+dt@kernel.org" , "krzysztof.kozlowski+dt@linaro.org" , "shawnguo@kernel.org" , Aisheng Dong , "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" , dl-linux-imx Content-Type: text/plain; charset="UTF-8" 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_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 12 Apr 2023 at 17:58, Peng Fan wrote: > > +Ulf > > > Subject: RE: [PATCH 2/2] input: imx_sc_key: add wakeup support > > > > > Subject: Re: [PATCH 2/2] input: imx_sc_key: add wakeup support > > > > > > On Thu, Mar 23, 2023 at 05:31:41PM +0800, Peng Fan (OSS) wrote: > > > > 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")); > > > > + > > > > > > I wonder - could we move this to the device core? > > > > I see lots device drivers parse wakeup-source, so I also follow That. Not sure > > whether could move this feature to device core, but anyway I could give a > > try. > > Do you think it is feasible to move device_init_wakeup into device core > part? Not sure it would really improve things that much. Subsystems/drivers need to make additional configurations based upon whether this DT property is set anyway. Perhaps an option is to make this a part of the common input subsystem helper functions instead? Other subsystems do this, but I am not sure how feasible that would be in the input case. Kind regards Uffe