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 1FA4A1494C3 for ; Fri, 13 Feb 2026 07:32:17 +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=1770967939; cv=none; b=Znu9HYs3wfOOuSqP0KhCHrXUBei2nx1HQ8A+hY9GGQt10cFh/D9fP6L2/BAb7ymisewqLOzULiVbrWrtR/ZWxuF5bLWAkQY7l/JWOVSjcGKE+BY9HS2lowDJ0oir1jFsyD6Jk6yZQgbLJD0+E4nj1jUuw4rppAOA3/SpHKPS9Iw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770967939; c=relaxed/simple; bh=KxGrcbG7a2AbG1ZzfagulwCjbri6LMG/biCnPE2s2X4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Qb2FE5Xd5KG8VVI39+UrDxZ4Xpm2a0i+c7Eq+hpz69hflryEzRXJpEdrEHrj2kNfzms7ccryDaPZg6cgtWXRRx5A+iexc7rZbw1EA8YREvwDZDUpSh6mmuqMm9/9CgfAg9FHycHdxUE67Pk1D18HXIz/q7Am3k0OYxwkDU5PquE= 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=eyrv8dt+; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=HgrgXNPj; 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="eyrv8dt+"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="HgrgXNPj" Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 61D3CVM63105958 for ; Fri, 13 Feb 2026 07:32:17 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to; s=qcppdkim1; bh=v2kqgpaQTaqY6+39WGQboDU7 g1wqPRchcEVZFWkpBCw=; b=eyrv8dt+nlV9kMvHcXvKRtLeD/dZnh2JrqClaRxR dwhtBjTDxBR4piXkVuTw1or9wW52FhEuEIm+29zfAoOqiadeRlmo6Sgb1/gKleQH AT6TUKFvyukTrmurQEfEK+O0xuMZ/NCzJPNdWghIbYXytpv+rnUoLm2Wx2pubvO8 AwW9+8GMFFWeLtJ6qnZNuxrfnBzJXPzmRv2ElHd3h+R01veG1S3Y8x0/8GVRoQNT A+GPV0RXxqoDbozN5/F/o2fwV8AuHO6ih603PbYqEmMU+kkmmfsyWsad+JN16x/h MfNsMnfOwl67wCRqR3RvNYyMszP+qE17jg1YU+mHOfssBA== Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4c9s6ws9yu-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 13 Feb 2026 07:32:16 +0000 (GMT) Received: by mail-pj1-f70.google.com with SMTP id 98e67ed59e1d1-352e6fcd72dso1760135a91.3 for ; Thu, 12 Feb 2026 23:32:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1770967936; x=1771572736; darn=vger.kernel.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=v2kqgpaQTaqY6+39WGQboDU7g1wqPRchcEVZFWkpBCw=; b=HgrgXNPjNRNqQSgCLUULg/FSXGcOoqiTeO1W35T8NeTtPlcydDlLc0S9/KL2jnhLdv 0hitHtJQPN2tBLmJkd1YJ6qqHfV2rQrTU2rbZqF4/U/cmu7kYEaHiv5PWHlj+eDSvm1k CBGhiKh35KBH9B9Il+LEot2trrZcVShywmoI36J7YzXUeP6RzbxHD3csuufWXUjDAC0A jgk8ESOo13ivhejhvvHJcApNOKgaJsuUBDfygjS0ILa34ViEw1t0Bl2j/VcKKvEAN4vf 1n4JElMcPph+gbL09V0Z885Txlb/nkQDDT/ElXhGmCPz/bzrHu34Z6ay08miFJuA8Kah 8DAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770967936; x=1771572736; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=v2kqgpaQTaqY6+39WGQboDU7g1wqPRchcEVZFWkpBCw=; b=s/uXRXFDQkJ5ml9TyFGQ26NhuCbdTmPqBHmqZnzhWSNM6n0LvOdx0J+CfHAJuN2Wp4 wZX15MXJcnJnzOoQG/lYwIBZB8TNYKA6H/1kpLJDPMcIZA+UIHczq4/jUC/a5CXG99rF JJbcjzs8po4aUO7sYHhd+9zvP6bGaXviDAKdd+dZoNV/nnYCGvpUq58ABeTNdPEtHOOK I/ArHcjkN9JCB3551A7LmPi/tWrvlb7KEEkDXTp4oLZYJhaVQBPo7qDY4EiZhGZTq1Sg gvnQ295cHw8g7UlzmmRFrAdJZuFZuIydl5tO9LH7oX1x3wcNy1ImgFIdKiRDjrC6hp+/ 4inw== X-Forwarded-Encrypted: i=1; AJvYcCWFZTwjMizmTLgjbOUhTy9i2OmvsBhhiTkZu5we8EVUQJUECPt8NhxxiJryEUpxlWnKq12JS3+Vz7KOTGQ=@vger.kernel.org X-Gm-Message-State: AOJu0YwwKIm0Yy/3wljf4tmTwj/iIS66uGNWeX3eFtjKyCtN0Kf+Fo07 UnNxMGZiZnIkdz7/2Sn8e3MQP4w7PYEGkty7BEG9wJfGG/tiipWGzQGZTMtD9zDrr1OG+LKlbWO 9icXuT5Iu68h5gsK8G2BmM1p1xhIU3Gze9cAfJngexpy2oQslkS3Kbm9Q+18addcUl4I= X-Gm-Gg: AZuq6aLEflh6/a+KT0BwdhZ20xWH+yJBBFBxtN+Qcu1ljOAQlZsB21oOVRzZMFTRvbN 0h1sgS1X4a3+nQdsNeEEW+Ib5xddKnD4q+wnkxFwCiv9tpW8tOwOexc4huoYTDwldvnw9N/W+mj ++LJYP2l1ZMcZRrHw92aUEzChpq/2DtYVw9D5TwmXBtEb9tScoGLTODgYiFMVfgBXLikdcary7h CItyiCxzH7pLa47L5VqcXK7UCiMrCgPmN/aNok39B6UTz4tmTuQt31Gcuf+fuuWtKsrQUqPe17W apskESA/oyY4FEgue0kCBMaj0kpytnXB3Zk4Zeu1QTTaYIGRb8hw2ma1ZmV54NY+MkW4e9CM8DJ nZjfJKYgFoZ+WFFII+7WLE1rUrktHKRsPvxn5bQSWFy1YwfdBcnnABFWsmvs= X-Received: by 2002:a17:90b:586f:b0:345:badf:f1b7 with SMTP id 98e67ed59e1d1-356aada1582mr965991a91.28.1770967936246; Thu, 12 Feb 2026 23:32:16 -0800 (PST) X-Received: by 2002:a17:90b:586f:b0:345:badf:f1b7 with SMTP id 98e67ed59e1d1-356aada1582mr965950a91.28.1770967935771; Thu, 12 Feb 2026 23:32:15 -0800 (PST) Received: from hu-arakshit-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-824c6b6a17fsm1831435b3a.34.2026.02.12.23.32.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Feb 2026 23:32:15 -0800 (PST) Date: Fri, 13 Feb 2026 13:02:08 +0530 From: Abhinaba Rakshit To: Konrad Dybcio Cc: Bjorn Andersson , Konrad Dybcio , Manivannan Sadhasivam , "James E.J. Bottomley" , "Martin K. Petersen" , Neeraj Soni , Herbert Xu , "David S. Miller" , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, linux-crypto@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH v5 2/4] soc: qcom: ice: Add OPP-based clock scaling support for ICE Message-ID: References: <20260211-enable-ufs-ice-clock-scaling-v5-0-221c520a1f2e@oss.qualcomm.com> <20260211-enable-ufs-ice-clock-scaling-v5-2-221c520a1f2e@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=us-ascii Content-Disposition: inline In-Reply-To: X-Proofpoint-ORIG-GUID: NwM2wrr8ONVw1RlQs7qBZKqj6EhhrrH5 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMjEzMDA1NyBTYWx0ZWRfX8oTc9/tTn7oo hSaeFenIwUYAHBvt1JVN2zP2mPhFvyT/kG8/ryvfKCoY3oZITW3ojBvEfGlw43eFqN78bTKvOJF 0YCIoFqmyTpue03VbNYYOXu7RBqEPmgrH38vP5caXhmdllIlUD0uPCIu0BPRencfZirps3N4JFa 0vfkkTsoxa+Dm2c06hXkphGi2yZm0Wdd38g5B8T3fz3ELP7QHDOPXE9NJod4lZEgZDqthhWuMZA lxqXExCK9+mE3bEuZ1VTZvsrfFvam03XLCi1eEi2qpZ1DNgu38xeiPVHdd9ujb+oyqeLqvpcGke UO6PkoTUSP5qBvjE6AOiXhKcxA4kzA874NcSdGiCMV+L8mgnNobFZy34+JjJzTxObyENUmbX587 xaoWdmm51KmSfjWzMD3IddzfSOrjEOYGGXKNINLLH7W1gcp3u1MtlPNlOghaFJOOCNZTgbrtZhr BR5CyURME2p67b8fWGA== X-Proofpoint-GUID: NwM2wrr8ONVw1RlQs7qBZKqj6EhhrrH5 X-Authority-Analysis: v=2.4 cv=CLInnBrD c=1 sm=1 tr=0 ts=698ed380 cx=c_pps a=0uOsjrqzRL749jD1oC5vDA==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=kj9zAlcOel0A:10 a=HzLeVaNsDn8A:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=Mpw57Om8IfrbqaoTuvik:22 a=GgsMoib0sEa3-_RKJdDe:22 a=EUspDBNiAAAA:8 a=GuRBVjywOiuAmw1d6-8A:9 a=CjuIK1q_8ugA:10 a=mQ_c8vxmzFEMiUWkPHU9: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-02-13_01,2026-02-12_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 adultscore=0 suspectscore=0 clxscore=1015 lowpriorityscore=0 malwarescore=0 phishscore=0 priorityscore=1501 impostorscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2602130057 On Thu, Feb 12, 2026 at 12:30:00PM +0100, Konrad Dybcio wrote: > On 2/11/26 10:47 AM, Abhinaba Rakshit wrote: > > Register optional operation-points-v2 table for ICE device > > and aquire its minimum and maximum frequency during ICE > > device probe. > > > > Introduce clock scaling API qcom_ice_scale_clk which scale ICE > > core clock based on the target frequency provided and if a valid > > OPP-table is registered. Use flags (if provided) to decide on > > the rounding of the clock freq against OPP-table. Incase no flags > > are provided use default behaviour (CEIL incase of scale_up and FLOOR > > incase of ~scale_up). Disable clock scaling if OPP-table is not > > registered. > > > > When an ICE-device specific OPP table is available, use the PM OPP > > framework to manage frequency scaling and maintain proper power-domain > > constraints. > > > > Also, ensure to drop the votes in suspend to prevent power/thermal > > retention. Subsequently restore the frequency in resume from > > core_clk_freq which stores the last ICE core clock operating frequency. > > > > Signed-off-by: Abhinaba Rakshit > > --- > > [...] > > > + switch (flags) { > > Are you going to use these flags? Currently they're dead code [...] > > + break; > > + case ICE_CLOCK_ROUND_FLOOR: > > + opp = dev_pm_opp_find_freq_floor_indexed(ice->dev, &ice_freq, 0); > > + break; > > + default: > > + if (scale_up) > > + opp = dev_pm_opp_find_freq_ceil_indexed(ice->dev, &ice_freq, 0); > > + else > > + opp = dev_pm_opp_find_freq_floor_indexed(ice->dev, &ice_freq, 0); > > Is this distinction necessary? Just giving it a second thought. Well right, these are not necessary, infact we can completly remove the scele_up from the export API and make use of the rounding flags eventually. The ufs driver can pass the right flag, based on the check against scale_up variable. Ack, will update this in next patchset. Abhinaba Rakshit