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 11B943876CF for ; Thu, 26 Feb 2026 03:53:06 +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=1772077989; cv=none; b=i2lJcAORijdJ8ADAAK0CgUp8VeaVnp5SKQGN3rPRVAMBVdZTS69jTouhh1MaM/H5JpoHqbt7lwYlra1gjq9cL90CMdjoNdnQcIHFx60W5e/zTaCyEvEF07nI5EbQIaTZuCPsPPGdRXkQTJr8IPXM2mmhxFW8s/OYqo+zVv3NTiE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772077989; c=relaxed/simple; bh=HWKsFl4MnTZYIIfzagaQmPY9LE3X3hHNz1H5NLijfLo=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=H4XnqSb6Ou4H6RSL4Spu8WjJfnzZzbpPo/2BPVeYjStBXG262yoF83vHH10CisroG4hMbz1HVph8CxyCZfGZzUzh7k9qCFwXzYwG5lVcQ7+zOo4axtR1kC4BXL+8skSCeFnKPZaFoOkI5lkEwL32942a+zECAzTg8wYnu0vnD/0= 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=QSpIozLg; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=i38hVd+H; 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="QSpIozLg"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="i38hVd+H" Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 61PJd5G7788846 for ; Thu, 26 Feb 2026 03:53:06 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= eFGV6PObFQPlq8Zm7sCD2brL4Y1z+9apzS4m7uWhVws=; b=QSpIozLgEQAKF63R oW0IPMMSeIHMhhsNq5Kth7IOcVJ+HNrW8oWjmOre595up+4k3aAjOGGSvoxCPcIl /HG82mn+CIOV8Fyrg3ioxfmRTQwDrQyAPlyZJpoeHHC6D6KK0ObkoxVKcknZRJVz o6S2rmFzrMU4T/Y77U2kuyTA8OwgJuYZWsFhcBqf8CT1LYRujP2CigmE/tUJyiyR CTe7edtGSC0yGCqGkle8D1V7Ry2Z+z+FzVhLjCwZWoF3ZQnMZ6t/mZ2cR85rFtiL rrqS7UhwLu2vAy43Kj92+vUauJkyjYjbi518Hx/2n8UE973NA9WKu/d5pCajJgK6 yO6dNw== Received: from mail-pl1-f198.google.com (mail-pl1-f198.google.com [209.85.214.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4chyv9jrpp-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 26 Feb 2026 03:53:05 +0000 (GMT) Received: by mail-pl1-f198.google.com with SMTP id d9443c01a7336-2adae3b2135so17145605ad.1 for ; Wed, 25 Feb 2026 19:53:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1772077985; x=1772682785; 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=eFGV6PObFQPlq8Zm7sCD2brL4Y1z+9apzS4m7uWhVws=; b=i38hVd+HCvhFG0pF6tRe00zyiJYBh9IEJ+M9rAlpTxN1wnGI6udSu9WGzoC0WdLHty QTV2zWG3OOHQunkO5aY5RIkAtQSx2VI6xPuI5bR21kp7OfDw4SX8gx+LVwKLLCh6GTRl +O8vo6Tubg6yVx/uEwr0hQfNn8vX9zLFs6To/AWP3vq4UufavKlRJby+78fZWcBs6lYC ViPg6wBPmDtvuVslusu3gWg6wL7jKgPD1DVVI8DciZpJFWmKSa/nRc+SAkhQZbSxyO2y wep7PwXbO6klhdB9xG77OzTZ6naRnAJGl1EmGp5NII6ZzbGg6ZeGwqYe+HR/mlIyUkVp 7QYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772077985; x=1772682785; 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=eFGV6PObFQPlq8Zm7sCD2brL4Y1z+9apzS4m7uWhVws=; b=dF0p7OuoXdpfg4EOnmlHPG4SlWJCk3gPt0IBuk3+jCtT1svyJwBHq+UtI9Uo3ipuSl FlVIh/uKgrmzW76h9vXXt11soATR6veGVmLvrXVZFmVN7aKwCaZqqOqCDuHBkNfXa4qE PyEhQOcFgWbg1vNQWwCrbbArAjb9FqxkhHgZehhcgETX5g4OBLpRkEEKQawa/jMFd9aZ SmgZmSjJJwc4941eSzl5WulFwBRMDV3aFJbyepxIA9tHlR16j5bZH2ZjLG3bpdJ5SJJ4 x3J9KMv7+wS0SqB7j2hbv810uqC0JVRe2UxPQj5daDgflZnf2Q2Ur69255ycZB2X4CLK SIJg== X-Forwarded-Encrypted: i=1; AJvYcCVmAnyfwERvRDnbH/roGzvueBBn0z0YVo+siMwkX8OozryWuiKT3w9gf87vx6Cq5uiNDNzyhDsKc7zmeDw=@vger.kernel.org X-Gm-Message-State: AOJu0YzZ/sGHs3aSM8dSl411C4LTmzzkDn8tWE+tUMKlhigjZzDwCsM9 cIQC00kPXr3+ckuY+8hDZENAVYf9Hwon4lMN7cYEJ3MNML2940l4nZAJETvrpIsy1MfMpZd+HU2 ILKIagLqvvWC3FDTZ2SQ5z/QvX+XJSv1L736+0eir9M538VHTQgCHGb63RklrT/aSxWE= X-Gm-Gg: ATEYQzy6IZFrbjCglLUltej0OXQnREeYYou70i2s5vaKVF2gyobcioezQQnOIuc5+Bt DdUtKodshCMZX9UapsjLFvegnZ84GeytrxQRkFu3u7CQR5bbSB8uM17dG4JX8xzqsjacj3uJ7JA Ji94clO5KyeaBjGFM9raZyPvs85BwMYhduoCEHQr7ocLmiUylvj1534/ah8ZrZCNwhrf8ndWTSW g6pK9G7w00s3FWe490hlVd+/fkyWo2SOVjaGg0N6l49tS2fapKk1VIcqwg9gDFLYLH5lW5bIPzi lgPhCFLkpRlr69Dzr3xljWDI09bPIXjXB1YFV9y72cGFbp5vMY5BJ9ja9hbIpgpvQF64KviWeCR E+enaPshCpg+jZutxRxs2jRVCRUtH+t8qm5tctQjtr4+1zMzT/ZxsuQ== X-Received: by 2002:a17:903:22d2:b0:2aa:d6a1:e18b with SMTP id d9443c01a7336-2ade998e04dmr30034315ad.18.1772077984866; Wed, 25 Feb 2026 19:53:04 -0800 (PST) X-Received: by 2002:a17:903:22d2:b0:2aa:d6a1:e18b with SMTP id d9443c01a7336-2ade998e04dmr30034055ad.18.1772077984304; Wed, 25 Feb 2026 19:53:04 -0800 (PST) Received: from [10.218.32.171] ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2adfb6d1ba9sm8262105ad.76.2026.02.25.19.52.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 25 Feb 2026 19:53:04 -0800 (PST) Message-ID: Date: Thu, 26 Feb 2026 09:22:56 +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 v5 07/13] soc: qcom: geni-se: Introduce helper APIs for performance control To: Konrad Dybcio , Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Mukesh Kumar Savaliya , Viken Dadhaniya , Bjorn Andersson , Konrad Dybcio , linux-arm-msm@vger.kernel.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, bjorn.andersson@oss.qualcomm.com, dmitry.baryshkov@oss.qualcomm.com Cc: prasad.sodagudi@oss.qualcomm.com, quic_vtanuku@quicinc.com, aniket.randive@oss.qualcomm.com, chandana.chiluveru@oss.qualcomm.com, jyothi.seerapu@oss.qualcomm.com, chiluka.harish@oss.qualcomm.com References: <20260206174112.4149893-1-praveen.talari@oss.qualcomm.com> <20260206174112.4149893-8-praveen.talari@oss.qualcomm.com> <0b969abe-d9ce-4a87-be61-212a1b8cc8a9@oss.qualcomm.com> Content-Language: en-US From: Praveen Talari In-Reply-To: <0b969abe-d9ce-4a87-be61-212a1b8cc8a9@oss.qualcomm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Proofpoint-ORIG-GUID: 73XHsDcrToPF5cTS1PzxL5lBlIQyd6GW X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMjI2MDAzMCBTYWx0ZWRfXwOi6Meir1vVn aBjXB20y2OtlJ+LUQekmBbarUvigzyVwR5ummG6Uvc+stXJ9bCBg7mGXA6ANTMpHO6gM6Uw41/4 zjo3w+egRy5g+bzE4qLmUmrS/Bf9LZfcM+aSjX3gFb2qi1q0IoS2tWzjxzVgbfesM3Y1A0+ERyk CsQiB5cVhEtBk5SJKc2g52JuvFB288vOR3Q/Jb5gRq3QFyW4MHF26xUkoCDjjoPLvTAqodl2L+g TfN38dn39g/vARKXxcAAqiiLQ2/UCUNTvJ3pJfswC1N8xUELbgfSRAn24SsB4TSyuP5a+v1XM37 LmVHkWXA7xdSAg4F6Jy6x3mk4DjGjHJcdutT6i7kLzwddcAqKpKarXObYa1F0NxLaeQrFp2xy0k 3R+ZuGVGYrK9LkrBoAUC6XEaAYV1e6vzjeO3m5QC4+XYndRl18Q7Eq1K92TaIAnN5sCZRNvp9Pp 3WYDmMahN8/xycnlOXA== X-Authority-Analysis: v=2.4 cv=GZwaXAXL c=1 sm=1 tr=0 ts=699fc3a1 cx=c_pps a=MTSHoo12Qbhz2p7MsH1ifg==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=HzLeVaNsDn8A:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=rJkE3RaqiGZ5pbrm-msn:22 a=EUspDBNiAAAA:8 a=anB5c4ZMOrDm_4fku6gA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=GvdueXVYPmCkWapjIL-Q:22 X-Proofpoint-GUID: 73XHsDcrToPF5cTS1PzxL5lBlIQyd6GW 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-25_04,2026-02-25_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 priorityscore=1501 bulkscore=0 impostorscore=0 lowpriorityscore=0 malwarescore=0 phishscore=0 suspectscore=0 adultscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2602130000 definitions=main-2602260030 Hi Konrad, On 2/25/2026 7:58 PM, Konrad Dybcio wrote: > On 2/6/26 6:41 PM, Praveen Talari wrote: >> The GENI Serial Engine (SE) drivers (I2C, SPI, and SERIAL) currently >> manage performance levels and operating points directly. This resulting >> in code duplication across drivers. such as configuring a specific level >> or find and apply an OPP based on a clock frequency. >> >> Introduce two new helper APIs, geni_se_set_perf_level() and >> geni_se_set_perf_opp(), addresses this issue by providing a streamlined >> method for the GENI Serial Engine (SE) drivers to find and set the OPP >> based on the desired performance level, thereby eliminating redundancy. >> >> Signed-off-by: Praveen Talari >> --- > > [...] > >> +/** >> + * geni_se_set_perf_level() - Set performance level for GENI SE. >> + * @se: Pointer to the struct geni_se instance. >> + * @level: The desired performance level. >> + * >> + * Sets the performance level by directly calling dev_pm_opp_set_level >> + * on the performance device associated with the SE. >> + * >> + * Return: 0 on success, or a negative error code on failure. >> + */ >> +int geni_se_set_perf_level(struct geni_se *se, unsigned long level) >> +{ >> + return dev_pm_opp_set_level(se->pd_list->pd_devs[DOMAIN_IDX_PERF], level); >> +} > > My only remaining concern with this patch is this export - on v3 you > mentioned that it'd be used in the UART driver (which currently does > more or less the same thing, open-coded) - are we unable to leverage > dev_pm_opp_set_rate there too? i.e. are the OPP tables produced by the > SCMI servers not populating the rate field for UART specifically? Yes, it is populated, and we directly pass the baud rate value as the performance level. Therefore, there is no need to convert it to a frequency. Since we already have the performance level value, we do not use dev_pm_opp_set_rate. The rate_hz (frequency) value is equal to level × 1000. Thanks, Praveen Talari > > Konrad