From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3E350C3DA64 for ; Wed, 31 Jul 2024 17:28:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=DRt+wirySSP/0rxSfCYSdxmXJCuEIe74VBuQeagotrY=; b=Rn7z7Iq7GLqZKN2Qy0/2xicRZY As2gSBGmKPfZTP4kY8qdzK/CV6n6oP3IarBcwa7T0yfRP07WyWUYV+KEEFskLUKLeQKfW53x7fgtI OuI4GdRFCu1Sn3T9GOb2/eiFjy9YMDRt8mb9LUWDfvpn2uemdDM19xrA27afYKMCTn56kiHDICR92 s/cPouQjX8SWC7lfnqCfKNaX6tpSYVG9MFnaA8KbPzVh/4NH00QeHjmncLCfMUKzbAG2n6VAysEGw T+ByWpchpmWqmUyPC3vSXOMqS6CQtKFpI9ZyW3K7/p73AV1699qr2hFue65oRqss06nHPBUwfbbGn gOEeZwcQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sZD7s-000000021P8-0d6u; Wed, 31 Jul 2024 17:28:36 +0000 Received: from mail-oi1-x22b.google.com ([2607:f8b0:4864:20::22b]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sZD7O-000000021JT-2hJW for linux-arm-kernel@lists.infradead.org; Wed, 31 Jul 2024 17:28:07 +0000 Received: by mail-oi1-x22b.google.com with SMTP id 5614622812f47-3db157cb959so3831010b6e.0 for ; Wed, 31 Jul 2024 10:28:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722446885; x=1723051685; darn=lists.infradead.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=DRt+wirySSP/0rxSfCYSdxmXJCuEIe74VBuQeagotrY=; b=WgSPj3a9ar1dc6UXs8I6hRZ/EsZ+VF8rd4UUAj05pXLCQqyoevhj9f+K02CSypdMhf A1at327vAWPGG1/diAC4IoPlwkCx8MFuEJgKifSaB8Hw3EXh0frNISjxlPecfrzk7Y9U 4Ypopu+ihxr3GBdnfIjLfOiAvppOhe6h5d9Ly5r4xmr5n6XmJ0VqsSOzYx0+D+sWqxgV 9Fe/M4tcU+kI79fSopK1KY0BNbF9CTruEj0sUT1MVixqcZ2KgVFvgVGhz89lC+PU0GlU SkXMpzL6MRpWrV0LqnOPwGxN6Qe/s+oN/N7nQ4dxltrQ8/bdtN400sShgscN3ORozID3 s+kQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722446885; x=1723051685; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=DRt+wirySSP/0rxSfCYSdxmXJCuEIe74VBuQeagotrY=; b=YT+U4tBFMsAmXOOtAGVOU8tumYHqvNqbZv1YO+cpHgBee64hCWrR5efsKW7vErZ0am hzHdn/xzh3NjwglBDueby0HFC6NJ1/gaoS+33YelqvGiXeMwYyUdGv93allMOc4xtJk5 HYc+NKE3ZzwiXZQtdPvxeaSRgcyuLAmO42qiGoRE0VYN6vNbUaBMu+7AC0BwaBbZkRO1 NP1abO3MNyXVlT0A4p+GA0VrLsB86OU30WDXiakcCq4XCF248FMtyK0vFXyBtXv+EDgt BpTKJ7TqKhcn4PNNxA+dl2HQ0Y2UM9PfckfeeJDe5r5Fc2ZkjD8W/7vb2j/twnem2tF5 ds6g== X-Forwarded-Encrypted: i=1; AJvYcCUlDRs1o2z8b7C4eyePNV49Z2flhz+66c7v8FkQ7+3Yhqtb0PppabFoNsWi9pcg6ruIqbhpXVzXHNr97sYW51ekkaapR3MzTCD3Iyda2D3dWOCfYUo= X-Gm-Message-State: AOJu0Yy/Eajtx6hWSDeu3UTw3qo4iXwDw4Mq7NYZVvA6DDIwBX6A8dCH DYvn+E7hhqhlCQmqDJB/UoUMquMtBA+fWZaVjX6Mz1g7HSuA0zdutzBFgQ== X-Google-Smtp-Source: AGHT+IFJbEbhXaPmjuoxCmR+/hmNt9JvEc6afSJEmUV9Ud116y5IbhnecHFxJGgYOSL+laQhmm8OlQ== X-Received: by 2002:a05:6808:30aa:b0:3d9:4147:4e38 with SMTP id 5614622812f47-3db23cb417fmr16579228b6e.36.1722446884744; Wed, 31 Jul 2024 10:28:04 -0700 (PDT) Received: from google.com ([2620:15c:9d:2:1da7:72de:e91f:aa85]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7a9f8273af7sm9200866a12.30.2024.07.31.10.28.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jul 2024 10:28:04 -0700 (PDT) Date: Wed, 31 Jul 2024 10:28:01 -0700 From: Dmitry Torokhov To: Peng Fan Cc: Cristian Marussi , "Peng Fan (OSS)" , Sudeep Holla , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Alexandre Belloni , "arm-scmi@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "imx@lists.linux.dev" , "linux-rtc@vger.kernel.org" , "linux-input@vger.kernel.org" Subject: Re: [PATCH v7 7/7] input: keyboard: support i.MX95 BBM module Message-ID: References: <20240731-imx95-bbm-misc-v2-v7-0-a41394365602@nxp.com> <20240731-imx95-bbm-misc-v2-v7-7-a41394365602@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240731_102806_708725_67391CB9 X-CRM114-Status: GOOD ( 28.28 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Peng, On Wed, Jul 31, 2024 at 03:37:18PM +0000, Peng Fan wrote: > Hi Cristian, > > > Subject: Re: [PATCH v7 7/7] input: keyboard: support i.MX95 BBM > > module > > > > On Wed, Jul 31, 2024 at 08:56:11PM +0800, Peng Fan (OSS) wrote: > > > From: Peng Fan > > > > > > The BBM module provides BUTTON feature. To i.MX95, this module is > > > managed by System Manager and exported using System > > Management Control > > > Interface(SCMI). Linux could use i.MX SCMI BBM Extension protocol > > to > > > use BUTTON feature. > > > > > > This driver is to use SCMI interface to enable pwrkey. > > > > > > +} > > > + > > > +static void scmi_imx_bbm_key_remove(struct scmi_device *sdev) { > > > + struct device *dev = &sdev->dev; > > > + struct scmi_imx_bbm *bbnsm = dev_get_drvdata(dev); > > > + > > > + device_init_wakeup(dev, false); I do not believe you need to reset the wakeup flag on driver unbind, as well as in the error handling path of probe(). If this is needed then driver core should do this cleanup (maybe it already does?). > > > + > > > + cancel_delayed_work_sync(&bbnsm->check_work); > > > +} > > > + > > > > ..so in v6 I asked you to add a cancel_delayed_work_sync() on the > > removal path, BUT I missed, my bad, that indeed above there was > > already a call to cancel_delayed_work_sync() associated to a > > devm_add_action_or_reset....so now we have 2....also you should try > > not to mix devm_add_action_or_reset and plain .remove methods..use > > one or the other. > > Thanks for your detailed reviewing on this. I will wait to see if Sudeep > has any comments to patch 1-4. If no comments, I will not do a new > version to this patchset. > > If v7 patch 1-4 are good for Sudeep to pick up, I will separate this patch > out as a standalone one for input subsystem maintainer. If you remove the duplicated cancel_delayed_work_sync() in remove() and unneded device_init_wakeup(dev, false); then you can merge the input patch with the rest of them with my: Acked-by: Dmitry Torokhov Thanks. -- Dmitry