From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E61A33148B3 for ; Wed, 18 Feb 2026 08:12:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771402357; cv=none; b=qxQhUi/34nb4dzraOuypmhmesK4Dzbepb4jw2DGZWeC0FHS25WJ9ew1dsgbmg5V/U2DaC7gcEeDkvdWvnX00rc2Nt0N8Mzx0N8zZg9nYvN5qhqCffG6JurVs4BpsWjwoS09Nb6sd4H94xDtI8i1KQgM2/dwbkK4PPNICRAu5jV4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771402357; c=relaxed/simple; bh=cn9bRtPL63s+L/kliS2QPtYEnu9wEkOpMMxQLo4/E2w=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=a+Axe4CqPwdPIlG5Xz/BviwRYI3RRi8+H1Yc6T8J82UcFvy+pLvrOL4qC7GJxeEKgOC0wsbYtfSYQ2VRXNvfB38fcm6xcP6RS4lLxlBm1/9rCI/NMumRDFjIcBSkq57iYITf7BgMFQPLjmQCOo0phseQRundJHaU3alXXuX7nLk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=SoudCh3i; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=GOitX+81; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="SoudCh3i"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="GOitX+81" Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 61HLnQfv420204 for ; Wed, 18 Feb 2026 08:12:35 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=qcppdkim1; bh=hKZlV/zjE2Jec2OpeZ2fnA tbU0O5jNpjC5Zzj54JMio=; b=SoudCh3imLq2oU6ZjxDWGq5hV9LuNb8hMdba9z ojq/3g7mEHZFFRrl7y4UDbtNPY/XiG64lwQ2k9BtGNwW5OYYBkE5QN1otE5j5jZT BkRYQsdXmEH4MOvyGcvN62/T5T3HXp4PiqY9bF1nyek6QB4wBNL2Hf/57/G+wmtz 8yKPlODlzOCYDEU194hbfNTMPAPwpEWB5ISxRLg+4aDuhxBGneql9PnIiPd2xPYx flTG5nDtiJ27GB4oe1E5m+ksN+faIlKBEMnTNpVRKP+s7fgKZlBA2kBrO5XMuaG2 KzvcyLTjUIiRrOgHtXNVqTPgrO+46Cvl6WDrKOWI7nnOIMkA== Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4cd0k5h86b-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 18 Feb 2026 08:12:34 +0000 (GMT) Received: by mail-pl1-f200.google.com with SMTP id d9443c01a7336-2a784b2234dso282942445ad.1 for ; Wed, 18 Feb 2026 00:12:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1771402354; x=1772007154; darn=vger.kernel.org; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=hKZlV/zjE2Jec2OpeZ2fnAtbU0O5jNpjC5Zzj54JMio=; b=GOitX+81H93knGYFn+IPnoHSc77dudhUXucU7w2N2mbNtfEr5HkRiSaHlDfwcNOVfV ITfEdU2KdruU2k7KTBU/60KqKL5KkWE2G6EtqH4wKR34WyD+a66mgPlZQQygA8y0c426 evweFfpyN1nigRxh8W+B/azn0plwiZ15+1kS1jshRpDYeCD+ro57mTg3rN95frLz1DvW nij/kgT/cr8RfxtOZ3VepBXh7Gh/3j0QPCpF98Ott8/RhnaQF8L1YoCXraJlM0BjNfzn hSQ2tPmLRr5UWlbh2aYpUhjifKJu+PEjqphxbw23D4JaH9EQqrrp4IK+pLAMoRV/OtnZ CzEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771402354; x=1772007154; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=hKZlV/zjE2Jec2OpeZ2fnAtbU0O5jNpjC5Zzj54JMio=; b=AXvM51uMJPvL5uhzzxVKd9YgNdtvNZ5AO9F1K1jJ33TeWgcC7O75nB6h2ObtV58+xx IhYAWsGnhwWIjRNFdYBulhW3BAOCY52QSiyUj5oO/J4xOUDF1WJTW0BStcvwdMS786dd 0Wr3m5Ah4K6rfYGIzTUYxF0Am2LpKqAOIS+Pz5//KN7h/LH2GcCDjjKljprIUE2X++P3 emQsZVIvLakOXNAgdC6HMCoadc4ggQlsxTTL0xe/1yW6vnrbXxnGiYVyfSCRD5uoRuYK sLZx8NK8/jPiEfcwNOwStuKzPIGf/+ytqulUnfIGN2zKpxS4e3fngeSpiIVY8LJm2t8e Mvng== X-Forwarded-Encrypted: i=1; AJvYcCUIzoiIcqzuMsn26Z7XxKasRZQmH6iRmw5OwL0aZA4xerIXzbwHT8S2N5VdoTywtPdFkrvSGaOUQegJ6tY=@vger.kernel.org X-Gm-Message-State: AOJu0Yw6dMpPNjWXDyIGLA+wwgSeawuz6oELLs25AIfqirvMQTGLsZoU aFUJnk28GmIiPJQGywEGmcrIllhJ3k5Mj6b7pwn3UbusH5qm3ZXkwnjJU8YUOeXjzpEx9Jy79te NM9dvq5ORQ+PnfhF4K6QI40aLBInw6WZUQq9QYkFTtyrGHCDbg/E4GQjF+8cTnTTY5Ls= X-Gm-Gg: AZuq6aJ4mxTOWDtQ0KXS9fyFufuXjr686+agVY8OfHDy5q6NVDYi/oN509mipOkKilT vErZRShk9buDQyTiDxlDMx2nSTL696rd984v5aYMfQSbNCTcZfGFYNKISmf9wrECpI5Z0ZSPQUy cT0V7vcPiTBE/zXFIyX8GJzpCRMvaGH/281RDWwo+pp4lEcFRKoFn7xIVddE5j8DGmYFURyfbyd XP2kS3chnZ+minQf/Dv7rERlJNENyHA8XFhF+P1LTs8UHoNxmkQeJvc6Wrl3ik+M04cPJmUtSKK I9vRYb7S86aIcHVE3xI9u9PwIa2uP5RazuUMrTBmiZmb2s3wnBEQiy8afzmmoP1koEEFLfBbVLT OUhred7D3mBu+i2mdcwTEwdgPiebRt5rs89rHSXfzznaA+sTHqXRT27qk X-Received: by 2002:a17:903:2b05:b0:2aa:3b3:d633 with SMTP id d9443c01a7336-2ad50ff1164mr12524705ad.61.1771402353744; Wed, 18 Feb 2026 00:12:33 -0800 (PST) X-Received: by 2002:a17:903:2b05:b0:2aa:3b3:d633 with SMTP id d9443c01a7336-2ad50ff1164mr12524395ad.61.1771402353204; Wed, 18 Feb 2026 00:12:33 -0800 (PST) Received: from hu-krichai-hyd.qualcomm.com ([202.46.23.25]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2ad1a9d624esm118123685ad.49.2026.02.18.00.12.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Feb 2026 00:12:32 -0800 (PST) From: Krishna Chaitanya Chundru Subject: [PATCH v7 0/3] PCI: Add support for PCIe WAKE# interrupt Date: Wed, 18 Feb 2026 13:42:22 +0530 Message-Id: <20260218-wakeirq_support-v7-0-0d4689830207@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAGZ0lWkC/23N0QrCIBSA4VcZXudQUbe62ntEhJm2Q21uulkx9 u65QRC0mwP/gfOdCQXjwQR0yCbkTYQArk1R7DKka9XeDIZrasQIE5QSjp/qbsD35zB2nfMDtoJ rflGKllqgdNV5Y+G1isdT6hrC4Px7fRDFsv1axZ8VBSaYS25oYZlmRFcuhLwf1UO7psnTQAsZ5 Q/DNhiZGEmsKKndc0bEBjPP8wdTuRzb/AAAAA== X-Change-ID: 20251104-wakeirq_support-f54c4baa18c5 To: "Rafael J. Wysocki" , Len Brown , Pavel Machek , Greg Kroah-Hartman , Danilo Krummrich , Bjorn Helgaas , Bartosz Golaszewski , Linus Walleij , Bartosz Golaszewski , Linus Walleij Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-gpio@vger.kernel.org, quic_vbadigan@quicinc.com, quic_mrana@quicinc.com, sherry.sun@nxp.com, driver-core@lists.linux.dev, Krishna Chaitanya Chundru X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1771402347; l=3933; i=krishna.chundru@oss.qualcomm.com; s=20230907; h=from:subject:message-id; bh=cn9bRtPL63s+L/kliS2QPtYEnu9wEkOpMMxQLo4/E2w=; b=1NrTUTrlOuXkM10nOweTJb+5me+RqaT/bCS5HXsMXfsEdvuIFx663a7YJjaz1VTUelwNaOP1Q nggN0JcfMQ3DKk5PZt6fd2/sIATbUJC/GcjnDkQjc++4i37OtQ/mhLg X-Developer-Key: i=krishna.chundru@oss.qualcomm.com; a=ed25519; pk=10CL2pdAKFyzyOHbfSWHCD0X0my7CXxj8gJScmn1FAg= X-Authority-Analysis: v=2.4 cv=JqX8bc4C c=1 sm=1 tr=0 ts=69957472 cx=c_pps a=IZJwPbhc+fLeJZngyXXI0A==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17 a=IkcTkHD0fZMA:10 a=HzLeVaNsDn8A:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=Mpw57Om8IfrbqaoTuvik:22 a=GgsMoib0sEa3-_RKJdDe:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=Ikd4Dj_1AAAA:8 a=s8YR1HE3AAAA:8 a=7FPx-eIICnbx9kjoaAIA:9 a=QEXdDO2ut3YA:10 a=uG9DUKGECoFWVXl0Dc02:22 a=jGH_LyMDp9YhSvY-UuyI:22 X-Proofpoint-GUID: 2m6xCXD4u3AlCGKE6KEa9k6SlRWcTGlO X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMjE4MDA3MSBTYWx0ZWRfXwplcN6HtsJPl hNv6OwKnkCdf/5fEe9mix+hdDZIUbX7hFdni5dc58FvHa6KKPG9Z294+Kk60rjFZBtnrOZnsyuY CMXj8Rfw2Cit7Tvlf7hKqK560jGDR49G2INowXPp8FCtVdgcPFg1PXbMGZqupOJUptH40kWeG8N kEkglVm+n8XSov4vpwFTpM6pCvVKvyXBBkeO4vui3YyZpF0p6Gn4KgmgOD3VCIbbYM3fP1xR+lX WWwNvi1azdgWXefmaZnNzc7E4XlaWips9K8llhapBCtugMA97jW1a1d+l2NpKycp4G7q9jyoQaC riKjaVOCYU6plD9PNN5MvNY39b/bEKZsJqhV2eEtdU6sn2ebqyKHxyD4oaF/gGkoq72jX1m6c8g 9jRRsXC1didMugzCgzOf2A8JzCANdUA8+ysZ7WGstkfzmOLt3FhUr1mq02krwzk6FOFir5nqxiX 3jG3MPpZ0jWTGn51XRw== X-Proofpoint-ORIG-GUID: 2m6xCXD4u3AlCGKE6KEa9k6SlRWcTGlO X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-02-17_04,2026-02-16_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 priorityscore=1501 phishscore=0 adultscore=0 clxscore=1015 bulkscore=0 suspectscore=0 malwarescore=0 lowpriorityscore=0 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2602180071 PCIe WAKE# interrupt is needed for bringing back PCIe device state from D3cold to D0. This is pending from long time, there was two attempts done previously to add WAKE# support[1], [2]. Those series tried to add support for legacy interrupts along with WAKE#. Legacy interrupts are already available in the latest kernel and we can ignore them. For the wake IRQ the series is trying to use interrupts property define in the device tree. This series is using gpio property instead of interrupts, from gpio desc driver will allocate the dedicate IRQ. WAKE# is added in dts schema and merged based on this patch. https://lore.kernel.org/all/20250515090517.3506772-1-krishna.chundru@oss.qualcomm.com/ [1]: https://lore.kernel.org/all/b2b91240-95fe-145d-502c-d52225497a34@nvidia.com/T/ [2]: https://lore.kernel.org/all/20171226023646.17722-1-jeffy.chen@rock-chips.com/ Signed-off-by: Krishna Chaitanya Chundru --- Changes in v7: - Updated the commit text (Mani). - Couple of nits like using pci_err instead of dev_err, use platform_pci_configure_wake(), platform_pci_remove_wake() instead of calling directly calling pci_configure_of_wake_gpio() & pci_remove_of_wake_gpio() etc (Mani). - Add a new fwnode_gpiod_get() API that wraps fwnode_gpiod_get_index(..0..), similar to devm_fwnode_gpiod_get() (Mani). - Link to v6: https://lore.kernel.org/r/20251127-wakeirq_support-v6-0-60f581f94205@oss.qualcomm.com Changes in v6: - Change the name to dev_pm_set_dedicated_shared_wake_irq() and make the changes pointed by (Rafael). - Link to v5: https://lore.kernel.org/r/20251107-wakeirq_support-v5-0-464e17f2c20c@oss.qualcomm.com Changes in v5: - Enable WAKE# irq only when there is wake -gpios defined in its device tree node (Bjorn). - For legacy bindings for direct atach check in root port if we haven't find the wake in the endpoint node. - Instead of hooking wake in driver bound case, do it in the framework irrespective of the driver state (Bjorn). - Link to v4: https://lore.kernel.org/r/20250801-wake_irq_support-v4-0-6b6639013a1a@oss.qualcomm.com Changes in v4: - Move wake from portdrv to core framework to endpoint (Bjorn). - Added support for multiple WAKE# case (Bjorn). But traverse from endpoint upstream port to root port till you get WAKE#. And use IRQF_SHARED flag for requesting interrupts. - Link to v3: https://lore.kernel.org/r/20250605-wake_irq_support-v3-0-7ba56dc909a5@oss.qualcomm.com Changes in v3: - Update the commit messages, function names etc as suggested by Mani. - return wake_irq if returns error (Neil). - Link to v2: https://lore.kernel.org/r/20250419-wake_irq_support-v2-0-06baed9a87a1@oss.qualcomm.com Changes in v2: - Move the wake irq teardown after pcie_port_device_remove and move of_pci_setup_wake_irq before pcie_link_rcec (Lukas) - teardown wake irq in shutdown also. - Link to v1: https://lore.kernel.org/r/20250401-wake_irq_support-v1-0-d2e22f4a0efd@oss.qualcomm.com --- Krishna Chaitanya Chundru (3): PM: sleep: wakeirq: Add support for dedicated shared wake IRQ setup gpio: Add fwnode_gpiod_get() helper PCI: Add support for PCIe WAKE# interrupt drivers/base/power/wakeirq.c | 39 ++++++++++++++++++++++++++---- drivers/pci/of.c | 55 +++++++++++++++++++++++++++++++++++++++++++ drivers/pci/pci.c | 9 +++++++ drivers/pci/pci.h | 8 +++++++ drivers/pci/probe.c | 2 ++ drivers/pci/remove.c | 1 + include/linux/gpio/consumer.h | 9 +++++++ include/linux/pci.h | 2 ++ include/linux/pm_wakeirq.h | 6 +++++ 9 files changed, 126 insertions(+), 5 deletions(-) --- base-commit: cee73b1e840c154f64ace682cb477c1ae2e29cc4 change-id: 20251104-wakeirq_support-f54c4baa18c5 Best regards, -- Krishna Chaitanya Chundru