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 4406CC3DA4A for ; Sat, 3 Aug 2024 06:14:39 +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=hXMFhCUn5D/KqrMjKOKnbi8o/0EVbx6C+turhkcsq08=; b=l3pIMZGA41CMjcRd03hApVCrkB DDm71R0l8G/DpUFLX2tkhLiqlpX0Hi7LJqm9wV/sE5VvyNfHVoD4WVpHcE++dnrUCLSDRkNC+9rss W5eJ7jXfIMK3ZSgrSOAaAKRX5pstVS4L5W6tlwER5sHMNwmXTPvlSpsHz7FZASkb43StuYcemUaQX /FrLQXjmMlfRspBCS/fVvZ/FVj6GkwW8UVks3uiLp3o9mXSaUu8SzesbTb0u8YygbG4XjoLkndAJH kNBMp/+Of0LvIv155yWc+quMCzYeX5Fg1uLxmuTQbKyDu7tZqPtnYxqZtxcKBR05zdncA/2XgMdu5 KleBxrVQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sa81w-0000000As4g-1ZTr; Sat, 03 Aug 2024 06:14:16 +0000 Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sa81Q-0000000ArzI-09Ez for linux-arm-kernel@lists.infradead.org; Sat, 03 Aug 2024 06:13:45 +0000 Received: by mail-pg1-x532.google.com with SMTP id 41be03b00d2f7-7a1be7b7bb5so6623315a12.0 for ; Fri, 02 Aug 2024 23:13:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722665623; x=1723270423; 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=hXMFhCUn5D/KqrMjKOKnbi8o/0EVbx6C+turhkcsq08=; b=hd0IjvdFQS2x2haKEVdtcujl1I5GxdQOhjjFTGKcHW+szdLVIUq93vklQb2jNh2gMb UNu0S8wl5v85wRqI0P6klS7IvXUHzucF8Kx0UWj7IYQn60BZp3vuPt6+NDWkS48OWyOu t2r3hj7hYbmbOFQZytksY48leScIiJYeY/psV+vwS/g13v6VEQaFsakvr1e3o5NB7kmk eEdmMa6axfbpbgjE7JDensHaj1zY724MwNVdcibQU9/fHYngC/lIvWcUbelRi5t3Qw0D B8UFZfUEVjy1sOn2qhMiJeqHEjiCy2W/HJEuFlScAZ0jj9tYNrE8eAaJqN9aIoKZsni9 jnwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722665623; x=1723270423; 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=hXMFhCUn5D/KqrMjKOKnbi8o/0EVbx6C+turhkcsq08=; b=XqLcQtQTlJP0jeoDzmaEDZzM54VRjGg/q1lhl+Q1cxzXTIKiwQRPl84NEK2OsGqxoQ NlIn0XzlEj6f36wnskQwbN1YvyXXeX2IfsO/AmjScDsQFs6byRAmtajIf1kKSq8geZuc KJEL0Py59jl3gqsmLPjM/9s3SmPZj7itoRRyyEpkRXh2Fycmbf9qBZgC+mGOyDfPSwSu eh1sN6KrJ0Nqnh/w77AYj58etiO42NGtqgHZxPtphNf6erb96+O5pMLvTgeua93UPQNc l06Qn2nsEqnbU8EkZOwg4su3GhL8yzZcnEF9gXElumph89UrElDu7CXyFCj2Pfqdr2bQ wC7A== X-Forwarded-Encrypted: i=1; AJvYcCUxodyZOu/0DUUlWgXbdherTTzx601OUslbRyFDA2wG1ARBC4V8K4GJ7a6GGrWEvvJZAD/F9p1kJZpVkSuT95RToUn4owoWzLKlCsCuVsxtZUml16Y= X-Gm-Message-State: AOJu0YwiUfS46CHk2c198Gf++fgrDE7G127HVbzSCFVeG2qu+vh+D6Au z75+23fuEh4NeRfoE7woMyw9EwDIkKrxqarGIxO9J9Jx8mM2L5kxUW57qg== X-Google-Smtp-Source: AGHT+IGgAjO3iklC0xXjAakpcmHNCbSd220ilCOUTPiEuu5dLNSN0mr4009Uq6sYz/UQhR1i8+qevw== X-Received: by 2002:a05:6a21:8cc5:b0:1c0:f323:1b9d with SMTP id adf61e73a8af0-1c6995a1a4fmr7777869637.20.1722665622623; Fri, 02 Aug 2024 23:13:42 -0700 (PDT) Received: from google.com ([2620:15c:9d:2:47be:b3e2:7c00:141c]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7106ece0895sm2164970b3a.125.2024.08.02.23.13.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Aug 2024 23:13:42 -0700 (PDT) Date: Fri, 2 Aug 2024 23:13:39 -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-20240802_231344_098512_36259815 X-CRM114-Status: GOOD ( 43.34 ) 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 On Thu, Aug 01, 2024 at 01:36:10AM +0000, Peng Fan wrote: > Hi Dmitry, > > > Subject: Re: [PATCH v7 7/7] input: keyboard: support i.MX95 BBM > > module > > > > 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?). > > I just check the driver core code, you are right, there is > no need do this. > > DevAttrError: > device_pm_remove-> device_wakeup_disable(dev); > dpm_sysfs_remove > > > > > > > > + > > > > > + 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 for your Ack. But I think patch 1-4 needs go to arm-scmi tree, > Patch 5 to arm imx tree, patch 6 to rtc tree, patch 7 to input tree. > > I put the patches together in a patchset is to let reviewers could > get a full picture how the whole stuff work. > > For patch 7, I will send out it as a separate patch with fix and tag > after patch 1-4 is ready in arm-scmi tree. Right, but to accelerate getting support for your part into the mainline I am OK with input piece not going through the input tree but together with the rest of the patches through some other tree, probably through arm-scmi. If they are not willing to take it then we will have to wait till core support lands in mainline and then I can pick up the input piece and move it through my tree. Thanks. -- Dmitry