From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795909326; b=SinTmsqbsKjahyCY/+Mej/3LZMYTgKfK2lAnmdqpnJxOR/W95OIKo8XbgXOs8REYBi8n dy3sQhkQ6oiM5t+FrYtz4j2w+lqR8I19tPQ9/tB7kT1OLOgZSDKOj0z36ZV+yNB92ps68 2RSIuCzVUXEcIbkv06ju5+SUtGQ6+4RLhuAGEqvXeu4A4nEkiFXQF7wadew8gMBpRJPQg AB/2pPUVeGky6JOitzXrGtMt4oF8ohecKO8/NcghGzGwz8SpZnz5vhO0Z6h/idZOOKIyB Qozmt+2ylLNL8t+lsbB1ZDdN0voe6Jcok8wsPWAwH+uqK6xyAZV83t8XRKeN0vGxtBQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795909326; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=VL2SFXb5o9TOsLS+9+gcNuJjr0ML6QmhTbOP04LIImo=; b=tgmOZYqpjVvwa+lkZx7BYQGwNsTYbNunOOgNIDI1YsLPxx8aJxZeqKsvH1qeYSCTbo/T aLuxckt8Ct40GCoK6LWVipwrPsr4HbdExgUowNRnCiY2LcTNMEZd0wJowKbGLIYW/uH3X +XVzf/37EY4SD8VWxnPXeDivPSuZhktzqnvLDul3rmT6hFGmC/mlI2YOBJSaj6tEaBaEM mD6W9z6V3j8INa1THUy5eNTyU0fg6vM80eLE8nM4fmwxA8MhTR0TTVOMu90cEHs8NTpY0 tmQ/RMrigB/RVP7QcA44jxQNaKXVIfebPq0/CKFplQ1LqLvK9Q6ykqt+eddSd9rKzEQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=LbipKlrR; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 38FF5606A31C for ; Sat, 28 Nov 2026 23:42:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=LbipKlrR Received: by smtp.kernel.org (Postfix) with ESMTPSA id EA42D1F000C1; Sat, 28 Nov 2026 23:42:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795909326; bh=VL2SFXb5o9TOsLS+9+gcNuJjr0ML6QmhTbOP04LIImo=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=LbipKlrR+hTXJsuUSqSG0XuyiWR6aGPQonE3QA7iEVaEcU90mPE0KnnwDkQcmZ6mC c9v1g5rO7qroONwweK+2iZOCxVv88KFOwUcQ33itAnwx289TZ7gPq3NSEG5g4jA3/H p9FSA7TgnJY7c0BNhNJ9Cyx3/GrVLcADBkAMgUbOyg1Ry0FlLIiRlnDUUSPa2gmEwP EltNct86YaS2bY34hsxpqdW1DPPTQe6KH1RDFl/oqRyDFVPeueVT1TuckoP+BkriK/ 1ikBhXtcYYmtiX45QQOdbZluuC67CwwCc1XeazGIeAVtR4620181ctVAs4yN8GN0e4 1/R/ZcRgii9bg== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH] PM: wakeirq: Clear driver wake IRQs on unbind Reply-To: sashiko-reviews@lists.linux.dev To: "Prasanth R" Cc: linux-rtc@vger.kernel.org, "Alexandre Belloni" In-Reply-To: <20261128232509.3175087-1-ragaprasanth@gmail.com> References: <8497d7101dc7524be91edbaa5a9face5@gmail.com> <20261128232509.3175087-1-ragaprasanth@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Sat, 28 Nov 2026 23:42:04 +0000 X-Mailing-List: linux-rtc@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list > A wake IRQ set up by a driver with dev_pm_set_wake_irq() or > dev_pm_set_dedicated_wake_irq() stays attached to the device after the > driver is unbound, unless the driver or its bus clears it. Many drivers > don't, and unlike the I2C core, the platform and SPI buses don't either. > When the driver is bound again, dev_pm_set_wake_irq() warns "wake irq > already initialized" and returns -EEXIST. The same happens when probe > fails after setting the wake IRQ, for example with -EPROBE_DEFER. >=20 > Mark a wake IRQ that is set while a driver is bound, and clear it in > device_unbind_cleanup(), which runs on unbind and after a failed probe. > Wake IRQs set up without a driver, like the PCI WAKE# IRQ set when the > device is registered, stay in place. >=20 > Drivers and buses that already clear the wake IRQ, directly or with > devm_pm_set_wake_irq(), are not affected: it is gone by then. >=20 > Tested on an i.MX6Q SABRE-SD: the snvs RTC and power key drivers can be > unbound and bound again through sysfs without changes to the drivers. >=20 > Suggested-by: Dmitry Torokhov > Link: https://lore.kernel.org/r/20261125072026.2997493-1-prasanth.r@lineo= .co.jp > Signed-off-by: Prasanth R Sashiko has reviewed this patch and found no issues. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261128232509.3175= 087-1-ragaprasanth@gmail.com?part=3D1