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 CABE636C9DB for ; Mon, 2 Mar 2026 12:31:55 +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=1772454717; cv=none; b=E7UIfUcunuuQv8SInGEZxGtXWWi1XlYkk4wUE5m4AR/gfsX6Po13i8yMsYwfgimIKTS5KZCPqXqNLdVHL3wIbBMz4y+kUXIMOKMphJtVfg5nitshTWptC1hjSdrW6auia46DGE6g1lvoCrkIiwEGHO6BL+6aAHiFLvxp3xPE9tg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772454717; c=relaxed/simple; bh=Md5xRA8YEGesOFAjU15qapNqJizqyuaB5pZwTKTaHoM=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=S8L9aEJgHzfnjKFjleoMfEoYBJ4rKNT6VXxLGJJ+m45NeuGzkIE1q02YoY7zmApf03vE+7PXgO2sw8UM9NNRdFbL1bi34pkOUYcd7EqenNRW5LcPuND3rYU/40H1Mh1EKlU2gwPzqZdRT3f9prIpRhLIRDbEAxIMisavImIKPoI= 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=l/2j2UZH; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=CS5lFrfY; 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="l/2j2UZH"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="CS5lFrfY" Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6229Embp3630784 for ; Mon, 2 Mar 2026 12:31:54 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= W4ngh7auUa12FfXGU5s7rRoEdx8wE5chgTwMb2MLbMI=; b=l/2j2UZHcRmn5rbV O+/c6SmQKiAQFuspxc+q4FCvrWT9S6yIzhVa8Y9akmNXjm05hHuCGnhiSszkeE2t Tt9p5y7553HB59PE8K6QFYxgXTCiAET+SJS4XQ/EuIrIfdRaggFXhvkL64DiU74J XuTRyox/KzCVD7zGuMKrBcYaRZm2CY7KMqcMpdCCTjlFzu6WgJQT/nM57oAlL6hs CPdXrCOL5aIW2MSj0Q5+62V6SezL3lTnxlBZBof3gET2+meUmLMhU0DZP9NTlYIb jf/eQU+s+hcL9vPDZAws6ysuIIhX10gQj9KSH8jOtUGKTFxhH5YKEtbSLBDX4XH5 /mYAWA== Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4cn7rhrmv2-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 02 Mar 2026 12:31:54 +0000 (GMT) Received: by mail-pj1-f71.google.com with SMTP id 98e67ed59e1d1-354c0234c1fso3450134a91.2 for ; Mon, 02 Mar 2026 04:31:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1772454714; x=1773059514; 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=W4ngh7auUa12FfXGU5s7rRoEdx8wE5chgTwMb2MLbMI=; b=CS5lFrfYDVvFyjISCYgCzPH6cNDBJAp6CJl8xTWd11XJzNDWiaJEHdLlv2Bq+KXEMQ tRyAO2GNvXOevMRLmPmSGCMwnmXbPKyoAudztYmSjFfR8cMpQfUEzbbzq9+Ok5XeadI4 BhpBFx60gnTMY4lY7UBfzhxhYmyv2N0HZPs1bBV3fWjDpqKfMc7E51ORTf5A59dDEzgJ HRTkFS48aNxRk5L3suwhVJ+3JuscqHtsIJtuqkbiPZ4yWwqNsjTii7GHBNPAr5g9CUda 7iOK79aSr1YLpwqwTTd7EmfBaKu7GXKUSoJWkzUEomteyZot/Twj4Z/Hgjrl2iacVXQg 2m+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772454714; x=1773059514; 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=W4ngh7auUa12FfXGU5s7rRoEdx8wE5chgTwMb2MLbMI=; b=TAm6OEmHJfyK+PbUsbHyEJHEUVgh39WwvGhZBVqrIg8NwghB4QWxIAxoYK9R7RKqKF enhOAH4DiPD4ZyRNPW5AZ9m612teabVxcySgntFVmhQZVZwQs7+e1nty7610vpafr1+Y dMPsiTvGgxrOnAUw5RHzw0a/b+ZibtIrLIOtsEUqnAndwwY/y+bZ+tEGxU386/re6XWw e3h2+M2B9NXdoI82Ld8rf02Iy/2KiD2Rr1h4v0DyQVCO6R2HGJbjnRGU+n/qOwMVQI/p G01wffWpt4qiEqd8/0uC1sBfgMIc3fclHKvo4GteShmkWMPSQKz+Z4JWTIAU8pYmc6sw aHOA== X-Forwarded-Encrypted: i=1; AJvYcCV0nQ2D7oRKIG9fQ7Jg9zXDRdN2xTbVQBPaGWvR6huXX5itA5dA+5YfXcf7Eo3Tc8AyzLCzrBpjuSPsxj0=@vger.kernel.org X-Gm-Message-State: AOJu0Ywoe9ZndLcbeJI12LdeKm6EE7aczk+V5Mp8yJmPgN6jdHp0Ot3V Ql/NFHnsJ0V2Vzy+titOGM95EcYZZEBLllxRahrH3OmhGjsaA84ZW1mDd3En6Gz8vNRKOYmsL+c DHq19fPqeEBF+36M9EFD/0Q3YVDrt3kQwodOPmdmbumRkZCQrm9mW+Cbdj79SUsuDbT4= X-Gm-Gg: ATEYQzydxMZJ3cusnYY8WBsmXuZgutcJAC+X5fAKuqhHrOg9syP08riOIHV/zY7kkC7 M/OnG5EBcThF+RzHCxwU162nD8j1DvA/ALN0k1fWrmjVQOXPtGhL6j/B2KfoIGN7+cP6f1Wc/Y/ WvzQP+gtyuwA0DCoO+wRO8R0Z1S2c6YBpENuWMjJ+RTzoGHbghZH1fZXGSWAiQ2Pop2vt+C0CU2 oDWUR5c6Vrm2a3j4s7H5VIYMW+S++jOXeHladK9MMjg0fDjZ+Jazgw9chOPXJdNxdwai8fYLSsF imwVpeIn+6vcKFBLEUi4zg+Vc2JUjA2hST8dzXfKbph0gfMxE64rUpl3lWxOFSnwpL1YF0iSocd 0mqYjbuW+32z4p7ER94WJVeRzRifZio69o5mlUVLxIhdsclS39zS3BtJR X-Received: by 2002:a17:90b:48ca:b0:356:24f0:af08 with SMTP id 98e67ed59e1d1-35965c17eb7mr9037612a91.1.1772454713730; Mon, 02 Mar 2026 04:31:53 -0800 (PST) X-Received: by 2002:a17:90b:48ca:b0:356:24f0:af08 with SMTP id 98e67ed59e1d1-35965c17eb7mr9037568a91.1.1772454713176; Mon, 02 Mar 2026 04:31:53 -0800 (PST) Received: from [10.218.41.175] ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-35977bf69bcsm4006727a91.7.2026.03.02.04.31.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 02 Mar 2026 04:31:52 -0800 (PST) Message-ID: Date: Mon, 2 Mar 2026 18:00:52 +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 v19 06/10] power: reset: Add psci-reboot-mode driver To: Bartosz Golaszewski Cc: Lorenzo Pieralisi , Arnd Bergmann , Bjorn Andersson , Sebastian Reichel , Rob Herring , Sudeep Holla , Souvik Chakravarty , Krzysztof Kozlowski , Andy Yan , John Stultz , Matthias Brugger , Moritz Fischer , Mark Rutland , Conor Dooley , Konrad Dybcio , Florian Fainelli , Krzysztof Kozlowski , Dmitry Baryshkov , Mukesh Ojha , Andre Draszik , Kathiravan Thirumoorthy , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Srinivas Kandagatla References: <20251228-arm-psci-system_reset2-vendor-reboots-v19-0-ebb956053098@oss.qualcomm.com> <20251228-arm-psci-system_reset2-vendor-reboots-v19-6-ebb956053098@oss.qualcomm.com> Content-Language: en-US From: Shivendra Pratap In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Proofpoint-ORIG-GUID: aYsLqrA0l05yI7rIUUYgEAkUDZn2L2BH X-Proofpoint-GUID: aYsLqrA0l05yI7rIUUYgEAkUDZn2L2BH X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMzAyMDEwNSBTYWx0ZWRfX7KGNrUAR9V35 UZe8Hh9abtUueeUVjqSHu7UgvbQIUuTOhwJqi1BMnD5zgFUvWpgFQsYIj+q8Jy4FneYLuSBC5X8 69dj2Gw6FiUU3yoUsxU61+D0XyTzg8qtFko/riGwdRObMFzfYtVW3yhfJCM3SdQ0c2HlC+M3dc5 CbkfxIlQk8LwxWiqGyGdi5VP1p1VqMyynny5jHwTTq/mfoAuqas5rUpBukxMYmoDt1b6nmNlrsT p6kOdS4uRPsHFQI1eeOcRwgYHnoNd70IHg5QIlnp/UQ/AyjOxzyoFxuORGviVWs6TdoSdPNgxiV KwknqQHaT9N1njmEhm8ggsijMEob0Lb0cwhgg590BI6ui5RYtuaXmK99Rcs92ECtwZkKJ5fRGA0 nDSi3v1NGcJd0TLrKcgYAWFQn8Q9HZ2N9Q7jfEFL6AdZEW/aIwkR0dF4dKcoIiT9zasS89EiR3F NpvryIK9X6kuGNOp2tw== X-Authority-Analysis: v=2.4 cv=cLntc1eN c=1 sm=1 tr=0 ts=69a5833a cx=c_pps a=UNFcQwm+pnOIJct1K4W+Mw==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=Yq5XynenixoA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=ZpdpYltYx_vBUK5n70dp:22 a=EUspDBNiAAAA:8 a=UGKnsmkkt59Ar6B41U8A:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=uKXjsCUrEbL0IQVhDsJ9:22 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-03-02_03,2026-02-27_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 malwarescore=0 bulkscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 phishscore=0 spamscore=0 suspectscore=0 priorityscore=1501 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2602130000 definitions=main-2603020105 On 02-01-2026 17:27, Bartosz Golaszewski wrote: > On Sun, Dec 28, 2025 at 6:21 PM Shivendra Pratap > wrote: >> > > [snip] > >> + >> +static int psci_reboot_mode_probe(struct faux_device *fdev) >> +{ >> + struct reboot_mode_driver *reboot; >> + struct device_node *psci_np; >> + struct device_node *np; >> + int ret; >> + >> + psci_np = of_find_compatible_node(NULL, NULL, "arm,psci-1.0"); >> + if (!psci_np) >> + return -ENODEV; >> + >> + /* >> + * Find the psci:reboot-mode node. >> + * If NULL, continue to register predefined modes. >> + * np refcount to be handled by dev; >> + * psci_np refcount is decremented by of_find_node_by_name; >> + */ > > Can you make this comment into full sentences, I had trouble parsing > the meaning for a minute. > >> + np = of_find_node_by_name(psci_np, "reboot-mode"); >> + fdev->dev.of_node = np; > > The logic of the device assigning its own node is a bit sketchy, > ideally this should be done before the device probes. Got one doubt while trying to move it to init. We used a faux_device_create() in init. faux_device_create() calls the probe function from within its implementation, so do not find a way to set the node "fdev->dev.of_node = np" before the probe call when using faux device. thanks, Shivendra