From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.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 404BB1624C5 for ; Tue, 17 Feb 2026 11:18:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771327090; cv=none; b=aaoQ9lLbeJecXdeJulMHg24FgC/Ll8xMkDLAjhgNhhFtJLGnh/p6rOzZiTkksBvakF8WRRBoiVqwy4w3euRBRqxCBx91J3mtTi3/Ew1r3oskzpoi27biqaFwyxkJnmjeeUXy8P0hjXYV6F3J7BZRfU8qCIY88c84TBkwyY/t0iw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771327090; c=relaxed/simple; bh=t9oh+Sa421FrI7gr/9zr3dr/y6MWYscKinpyhzwl1KQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=k8jgLyBI8hAvKdmviSuvXDqSaOSQiRVDoP1KRV4iHtgNVX6P7l8oGZ9mECcEbirsOrnheQJPj8W05SY6bm4wcPY+5A9dmxVvVa3P5F3e93fhiILj+yPKqO/WSDWIITeEO0pxY10Gi0XLbZ7W0qSnGOEslzVfBjgQ+oafZRxQzxQ= 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=jsBJMylz; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=LKi7SP4J; arc=none smtp.client-ip=205.220.168.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="jsBJMylz"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="LKi7SP4J" Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 61H7SDWk3394685 for ; Tue, 17 Feb 2026 11:18:08 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= pIaS+hQLm7+y11f5MKTxeeaP/JI+qNjznY22YGxiYic=; b=jsBJMylzpnBPIIKe cq4jMWxcDY/KqifNInw4gg6VRISyJrBUCnRXG4QxhIN6GsjChLwHUIln3KhRdNub SsZdfZl4bpwzTvAa3BaVUyQ599TBqfYHrO+3oSbdsSPYtj+ujccbyT8M7hONRLfo 2O8/xhN/rqQ/ZCpwfH+pDgNIcK0O9P5plR308IqmBhV4BeCMOUS6LcLG6pghniLv 6/IFlaelIJq0BM3bpK9cFmLnEpSbZRbUOASaFztbwCOjpl6O5DDTWXZeGlrWoktK H2Rb5MOg2yqrX9WH39d6wIYYvqcJA1hmjZF4s9scKIIjJ47u4WFfkfjHaJ5OU2a5 wbgEDQ== Received: from mail-pg1-f199.google.com (mail-pg1-f199.google.com [209.85.215.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4cc5kha981-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 17 Feb 2026 11:18:08 +0000 (GMT) Received: by mail-pg1-f199.google.com with SMTP id 41be03b00d2f7-c6e24ee93a6so3384274a12.0 for ; Tue, 17 Feb 2026 03:18:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1771327087; x=1771931887; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=pIaS+hQLm7+y11f5MKTxeeaP/JI+qNjznY22YGxiYic=; b=LKi7SP4JhuhyknRqHgouhJcbsjkJapPULgywqhuYzVXhQ2fCQ67j6dOJR45xrds9pv aHTsceALUZ6RHlKQT4jy6Sw94c3gisHPhU1c+3lFo4F50iHMSZ7dDojzh2R/EwUchqEa kNgKMpU/b6XAoG5jw4IC/Dv3eR2PfPVshrPK4uBsYBIRaIP5geOuObhMOcX6vnjfyKk7 b3xHSHDGRzt9SNzOC1Lq052jUBk6SmL2UQMV+1Per5/+ebxHTgh2EVuYh1HH4SKtnJAo FlAxt4AsLK3RfklIr1h0XnwNqErXFa4BVRK8lkruFb4JWv317v1kEIa2a7fmhfOGZgAJ DHXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771327087; x=1771931887; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=pIaS+hQLm7+y11f5MKTxeeaP/JI+qNjznY22YGxiYic=; b=rxlC1sHal6fKo6dyUg96b78yaz9Q+TNYtm46iczv6VvoA+KEIGmz5jUWQk6bnOthXE 6rJxPTV+JALEFoUGT9asDV+kkl6yZKjyYMS1+8iPtYdFO3S7Tt7s2qw7DAWeJ2iWW1v3 m181td1tbPkq1mfsGse+ptwaHHqJ5M2ruFY7VBKpV/D89tSqzV8q6ochd3+rzaTHO77K gZOYxRllTPXhj1VvJBXd7PFgiqvHOWmkvmeAan8Dd27p/1aTYiv3neoB9vpa1zuYnUF1 sd/d5CrKF0SR5qx9Zw4gca8IQoZa16pwdQjKU9IaR/3yIjOFMag23Am+j4c+TreFCU5R 29Rw== X-Forwarded-Encrypted: i=1; AJvYcCURn15jUcYCOYnmkKfnYs05Jsec4Na/0OmWq3wKyzM669T+aIeg6CymulUEnr9639J6e4d9lL1wqJSJv5Y=@vger.kernel.org X-Gm-Message-State: AOJu0YzM8uLm4YT/MRcpJ3l91ZIP51JfmMBx6A8X0oj9y8Y8Mql5ArHx HqBzeZy/Cyn1BKB8LYbZQFqGiZgD6LU6+u0AgujH/OhKVJSZngN+9nkrSV2Spk1nSuTiEsRLNx4 l5+/nlLLtjz5CqKtq/h8uE1iXkFlupTh3Wkz4f/DNU37jpV9GenFJAqz+gmNtDuuEQ1o= X-Gm-Gg: AZuq6aJ21AYbEx80QSrx4LRRtlt+slBHd2MbA1L4J+WSiyQz5gqzeWEBO2XarMBSdPg q1VAoiI82Pm/oQcBzyopUiqGyGu6P1nbs6V6RuVeyOEFWUggOMAO+XToIT7Fn+HzxJwsPxsh/ED HGshw3yqKaVTXlLz8/pd9i6syvw50qmY+a3uTlSGvzYso3WaPg8aZzYo9/QI3qQ4ULuJIY+m+J4 j1YlUudSPT91qW/3bDk0kPyAlv2YDEm1heAbPHvy88OmW0/T8vUHCZkXsQBPwuaIhQGGSmQ0Pui 3UGC2QCzrAQhiDulsUI2+QNI65ybgy7VulelQ+/ichSJ/8yY4C4xxKfWW5kMUVerhgg5H4Ug4Qb jnpH4WQaewO1QuNxNXlVlBzqjziDphrFtE+zOa0T+aOfgfGjdIhzEVQ== X-Received: by 2002:a17:903:187:b0:2a0:fb1c:144e with SMTP id d9443c01a7336-2ac97431043mr126508635ad.7.1771327087264; Tue, 17 Feb 2026 03:18:07 -0800 (PST) X-Received: by 2002:a17:903:187:b0:2a0:fb1c:144e with SMTP id d9443c01a7336-2ac97431043mr126508355ad.7.1771327086758; Tue, 17 Feb 2026 03:18:06 -0800 (PST) Received: from [10.218.35.45] ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2ad1a743570sm100967905ad.41.2026.02.17.03.18.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 17 Feb 2026 03:18:06 -0800 (PST) Message-ID: <16a5b370-3f73-40ec-9311-1bc04ecd0825@oss.qualcomm.com> Date: Tue, 17 Feb 2026 16:48:02 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/2] PCI/pwrctrl: Only create pwrctrl device if the device node is of type "pci" To: manivannan.sadhasivam@oss.qualcomm.com, Bartosz Golaszewski , Manivannan Sadhasivam , Bjorn Helgaas Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski , Bjorn Andersson References: <20260217-pwrctrl-fixes-7-0-v1-0-b5671e58934f@oss.qualcomm.com> <20260217-pwrctrl-fixes-7-0-v1-2-b5671e58934f@oss.qualcomm.com> Content-Language: en-US From: Krishna Chaitanya Chundru In-Reply-To: <20260217-pwrctrl-fixes-7-0-v1-2-b5671e58934f@oss.qualcomm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Authority-Analysis: v=2.4 cv=Coyys34D c=1 sm=1 tr=0 ts=69944e70 cx=c_pps a=Oh5Dbbf/trHjhBongsHeRQ==:117 a=fChuTYTh2wq5r3m49p7fHw==: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=OOr1FIuhMF5WfzrawtgA:9 a=QEXdDO2ut3YA:10 a=_Vgx9l1VpLgwpw_dHYaR:22 X-Proofpoint-GUID: PS77OYTzlkXWaoCVIGI6YUcXZEDDXHoI X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMjE3MDA5NCBTYWx0ZWRfX9OXNwF3et9pI 8MFhc5MiQAMGzE1iPlbi6QSLcDtV+drTPKoIwpKxvLJWsCyqk9odJ9rLSe0SlowhPimZnjLeC2d NdsslkJPR+UuZK7cl8+yWOyUez0P2jRe0DMd76bxbrGz8+pEgPV8FSsbTBpVWHnYQp+TwAwqTuT JC6S8C2cwb8Lz02d4piikGiOiyVJSmPQk83DprxbbFdGyKWRZyIfNL/3R46jbpY5g0ft8rh5uCl SAumz112s9tKwobQzg5EoB4MZ90F320kyWef8eNrHoap+aCNGvJ8e3tj6xSDtcgkNt4GkdbH++4 Ric5tNIe1+QPW6tGRQcpwkQKvhMlk8WinzVaQSRo3QK+TqLkNUWnpWB4zvPhBffNKBec/9CEzqR /meOz1yiG3q1XKOzd4cNVD/i2u1u8tnuqapqA5jdZDKVfNtirnPj3q4tpwLjqAL/HKAAf0TI2Sw 6i0Ba0QNuqkcHFcEOiQ== X-Proofpoint-ORIG-GUID: PS77OYTzlkXWaoCVIGI6YUcXZEDDXHoI 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_01,2026-02-16_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 lowpriorityscore=0 spamscore=0 bulkscore=0 impostorscore=0 priorityscore=1501 clxscore=1015 phishscore=0 adultscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2602170094 On 2/17/2026 3:48 PM, Manivannan Sadhasivam via B4 Relay wrote: > From: Manivannan Sadhasivam > > The PCI host bridge node can have non-PCI child nodes as well, like OPP > tables, USB controller node etc... So the pwrctrl core must check for the > presence of 'device_type' property with value of "pci" to ensure that the > pwrctrl device is only created for PCI device nodes. > > Fixes: 4c4132489201 ("PCI/pwrctrl: Add APIs to create, destroy pwrctrl devices") > Reported-by: Bjorn Andersson > Closes: https://lore.kernel.org/all/20260212-rb3gen2-upd-gl3590-v1-1-18fb04bb32b0@oss.qualcomm.com > Signed-off-by: Manivannan Sadhasivam Reviewed-by: Krishna Chaitanya Chundru - Krishna Chaitanya. > --- > drivers/pci/pwrctrl/core.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/drivers/pci/pwrctrl/core.c b/drivers/pci/pwrctrl/core.c > index 8325858cc379..7404d48427ce 100644 > --- a/drivers/pci/pwrctrl/core.c > +++ b/drivers/pci/pwrctrl/core.c > @@ -272,8 +272,9 @@ EXPORT_SYMBOL_GPL(pci_pwrctrl_power_on_devices); > * Check whether the pwrctrl device really needs to be created or not. The > * pwrctrl device will only be created if the node satisfies below requirements: > * > - * 1. Presence of compatible property to match against the pwrctrl driver (AND) > - * 2. At least one of the power supplies defined in the devicetree node of the > + * 1. Presence of 'device_type = "pci"' property to identify PCI node (AND) > + * 2. Presence of compatible property to match against the pwrctrl driver (AND) > + * 3. At least one of the power supplies defined in the devicetree node of the > * device (OR) in the remote endpoint parent node to indicate pwrctrl > * requirement. > */ > @@ -281,6 +282,9 @@ static bool pci_pwrctrl_is_required(struct device_node *np) > { > struct device_node *endpoint; > > + if (!of_node_is_type(np, "pci")) > + return false; > + > if (!of_property_present(np, "compatible")) > return false; > >