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 733FD3346B0 for ; Wed, 4 Feb 2026 05:42:54 +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=1770183774; cv=none; b=Y1llvZZ4E0s3l0qnATwjd3opgJ8DPibJGDK9idduxEhL1tGhr/lm5RwgjlZgJdabklV+Tvs+SDVwpzBhn3Tjg3vO5cl+QTgUnOGtyxxJiIuTe6NJntq0pazmz+LAXpXwt2QWEkvdiOvLHkZV8bE3twJuB/Gru8mBsd6YnmnzFWM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770183774; c=relaxed/simple; bh=VKk566DJsJRFQWWApNx+fXFkB29f9cIdPS57ACaQtUw=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=rpDYQHjA1z4BihwAsyQsAPVJXXhtgQwGwtLtlodNRk2LXXQ9fvf1aq9rH1pT+5DczN9E4mVNBUJ/kmIvSGwnFlfKCa/0RQVlbFe6SQ2WZTEAKPAzeMAT1sKaFK4BDHyep2V/vy9EuGeo0bc4nXXx7lbkSCSjKPuzbz8ipOhEk5c= 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=nFjONCGY; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=PRYYtE/Z; 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="nFjONCGY"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="PRYYtE/Z" Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 61455Yef3824266 for ; Wed, 4 Feb 2026 05:42:53 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= xgVjf7Y9rnuVQSWYsmXtX7za1suTWFNBUqVZI1G6cCs=; b=nFjONCGYx6W9cAdm X/9uIMbXa5RBv1WCSstKd94U6nniMQ+mkuvs5d8fbfJ2/mK/dvJJFclA/x3H4Etm IYAsD7PsaFsJPFzLwlYlN2Q3JPMe6MMoBTLUQ/n+uH8Tiw8BXjz4wCtksEcchFjb 9eVoVN//CLNv6k/ePCQEDsJ1XDVUrKZW/wgz6Dfc2jXe0CE3JwnKZiYqc7WA1XZv c3w8i1fn0kVvSz0jYYd6si8yclxWEfeYjyXcEGJLSQWgkmctlyGBCA3xXJ2P4kP4 qyP3LhMWlBzh1jHyE+mYZ1HM16ACZ96k1ipzZCt2LAbmN5cC1cDL1uxPxOTucBiy L/GlnQ== Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4c3g33k7qb-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 04 Feb 2026 05:42:53 +0000 (GMT) Received: by mail-pj1-f69.google.com with SMTP id 98e67ed59e1d1-3545dbb7ee6so2755435a91.3 for ; Tue, 03 Feb 2026 21:42:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1770183772; x=1770788572; 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=xgVjf7Y9rnuVQSWYsmXtX7za1suTWFNBUqVZI1G6cCs=; b=PRYYtE/ZoDrW5bc0WFTpQXOoMwXyheBn6TKaKCmyR8eLMze6BhWjw2PpO7DeLYPxHF Z1zeeiHWq04MF3BGA8zYz76H3Nz2gdvRvx/Nb824snfiifBLcUguTXH2Up/JV/dw9dC2 Dt9A2ZrlW8Oed9mSjl/lANrz3QFcOXl08uIzNDep8wJB81HOgar7sffND6YLA6JMF/zb 7sgYyFswsAIfv3fLU2qVyanDZzE+UPyAqO8o9WkxcchTr5VJmQfU59bOGD0BFJc9XYPP 2JeixUrM++56sGreN2iNLTzn9c4PDjA28WFvQz/y3Gsh/8aDBhd9zmvBOhOcozrjUDtD bisA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770183772; x=1770788572; 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=xgVjf7Y9rnuVQSWYsmXtX7za1suTWFNBUqVZI1G6cCs=; b=CVsVNctBi81Uu/V/Zx99Mrs6248X67pcBDDRklGaKLTnHNAZkKXbbOxHmdBB4FubbX L4L8nntnvXSUPKmshjFJ2nsuefsd88OUipn5QHbJ+x3cUIf7cdHea7wq14A1ARMs25Vh RJdxlUunQyyi5ivX5pu9zj4W+4IUhSHyJQtD00svceTVfoTZsFDzqAtxQj0DuOQAhH1B omgRX6W9aZCwYZywIx1saeUGY3AgvEdNqYmcZCPhrhFRAJOAAuHFOuRsYHVikMJb7i1G GhQpJn/5tzUq1L13QyDbQPy4+q/FvXIpJxHxrAmIbfQt3HHPchWWwycq0yzzmlSYapFF /sHA== X-Forwarded-Encrypted: i=1; AJvYcCUBDVKj+28VLSWlOMrjmeSDEtRxfM9dM+rXbhzUOeKPv+7ekai8WXywJW1mvzKJlaMAoYM0HoOzUF39mNg=@vger.kernel.org X-Gm-Message-State: AOJu0Yw0sQ+rORDmI15jLL2eD1pzDIr88UcOE81qiB1ivdv62+yTFPY4 pXLSkFFeU3gSoHYFAJBapAoFXue/fDKUUtiS6Rh08ZQjsqlsZ9AD+LzpvTbAhpXCH1ZKc/W4DTf ECLBbJSuud8FxPXg5whHpRR3tP1P2ZMHjwqbip5n/2OiT+N4jDFLlnI6zKqceArt1iDI= X-Gm-Gg: AZuq6aKQVUic3WvQAllB3sYVawFRNP30OAixYOXO0Sorr+JUFi18eZ9DI9TxGHjY/ll yJytKiDcuHMstI++KUeHL8fQbhkdjcoGQE2I4yLwY/pLyCdaThk0C3m2vUHJrEOkUew0c1VL929 ELZ2BAQHkgwptjvJTW/I9g380e7tyrvEjf8UoGFyShaAlEg2RI3C3UqlHEnwCyZ8HxQw8qCCOYp Z0KmrIdNXbGlPwh1395JZ9NCrNk+/sBtWZi4tMyojNbzbzA0WfscWABYn1lCWrLnfv0K3W1D78s ksMi8yEVo8eH/evxDN0JEK6aVuEwnaCiip6Sb70dXvPZvbOikGN2SyI7siox5VLPIexaErGgkja KBJ+XfeVs9ZEEgxyzhC+vsmMnm/skBSCOHAfEwpfSAg== X-Received: by 2002:a17:90a:d88c:b0:340:bb5c:7dd7 with SMTP id 98e67ed59e1d1-354870cb7fbmr1438081a91.5.1770183772371; Tue, 03 Feb 2026 21:42:52 -0800 (PST) X-Received: by 2002:a17:90a:d88c:b0:340:bb5c:7dd7 with SMTP id 98e67ed59e1d1-354870cb7fbmr1438050a91.5.1770183771831; Tue, 03 Feb 2026 21:42:51 -0800 (PST) Received: from [10.218.32.171] ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3548630df97sm1217006a91.13.2026.02.03.21.42.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 03 Feb 2026 21:42:51 -0800 (PST) Message-ID: <92dc98b7-8047-420b-9743-4bcbc7e30fed@oss.qualcomm.com> Date: Wed, 4 Feb 2026 11:12:44 +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 v3 06/12] 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, bryan.odonoghue@linaro.org, dmitry.baryshkov@oss.qualcomm.com, bjorn.andersson@oss.qualcomm.com Cc: prasad.sodagudi@oss.qualcomm.com, quic_vtanuku@quicinc.com, aniket.randive@oss.qualcomm.com, chandana.chiluveru@oss.qualcomm.com References: <20260112104722.591521-1-praveen.talari@oss.qualcomm.com> <20260112104722.591521-7-praveen.talari@oss.qualcomm.com> <24f967b5-0f15-4aed-a81f-ad54f8e541fa@oss.qualcomm.com> Content-Language: en-US From: Praveen Talari In-Reply-To: <24f967b5-0f15-4aed-a81f-ad54f8e541fa@oss.qualcomm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Authority-Analysis: v=2.4 cv=afVsXBot c=1 sm=1 tr=0 ts=6982dc5d cx=c_pps a=vVfyC5vLCtgYJKYeQD43oA==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=HzLeVaNsDn8A:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=YQ0tCwKMeMYZxcjLr5wA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=rl5im9kqc5Lf4LNbBjHf:22 X-Proofpoint-ORIG-GUID: UuPUtvYv84iMl0Ca0L5fDUBJ4bdQJ_WQ X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMjA0MDAzOSBTYWx0ZWRfX+3QZwGBkJL9a tQdfO4e2YWOY5MtAsyu8n26SMaWd6GfXtV0yDK/m7PuVRbvE/iGi2yu5JXUzH7t746q4VBsaVlc vQGGFK+PI8yhpFUdLf1AegO3Oxytcc+7r1rpLXFJSteBjyZF7WC9UuRmt2vZNsQw77MCOSd+amC xxxIlbmQcl6pFkPvXdoRbca4gg9dJ28yCjd1ONKdQT9Lqj3WAsx/5IS1oOIgt/GW/d9PMMZC9c6 7rr2WnSiCfbfk5TTRT9HcQi77Xb8MFLvKLk+DAzdQ290uxMd06BBI/LuZq+xvZX5ZrpJ3UubvLE Vtw5lG9IUCHzmr2/wlJSyZBr/nJzYQ8y5EON7Sgj79ksGCDNiGb5ibJ2wRKMHbQMsh43BE03nSc p+BLaLGVdnk2CYDSuGsqceEoUPtMWBeEnu7qmc2Gle66Jgq7+CYFXu27WYuWu3aXzGtsfbzsje2 JzsjOYC3r7EZS6NOVdg== X-Proofpoint-GUID: UuPUtvYv84iMl0Ca0L5fDUBJ4bdQJ_WQ 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-03_07,2026-02-03_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 impostorscore=0 phishscore=0 clxscore=1015 lowpriorityscore=0 bulkscore=0 suspectscore=0 priorityscore=1501 malwarescore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2602040039 Hi Konrad, On 2/3/2026 4:44 PM, Konrad Dybcio wrote: > On 1/30/26 5:54 PM, Praveen Talari wrote: >> Hi Konrad >> >> On 1/30/2026 5:53 PM, Konrad Dybcio wrote: >>> On 1/12/26 11:47 AM, 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); >>>> +} >>>> +EXPORT_SYMBOL_GPL(geni_se_set_perf_level); >>> >>> This function is never used >> >> it will be used by UART driver, not for I2C/SPI. > > Adding unused exported symbols is "eeeh".. I keep in mind for UART, i have added this API. > >>> >>>> + >>>> +/** >>>> + * geni_se_set_perf_opp() - Set performance OPP for GENI SE by frequency. >>>> + * @se: Pointer to the struct geni_se instance. >>>> + * @clk_freq: The requested clock frequency. >>>> + * >>>> + * Finds the nearest operating performance point (OPP) for the given >>>> + * clock frequency and applies it to the SE's performance device. >>>> + * >>>> + * Return: 0 on success, or a negative error code on failure. >>>> + */ >>>> +int geni_se_set_perf_opp(struct geni_se *se, unsigned long clk_freq) >>> >>> I think with the SPI driver in mind (which seems to do a simple rateset >> >> APIs were added as generic interfaces shared across I²C/SPI which is specific to firmware control, not Linux control. >> >>> for both backends) we could do: >>> >>>> +{ >>>> +    struct device *perf_dev = se->pd_list->pd_devs[DOMAIN_IDX_PERF]; >>> >>> Then, we can do struct device * perf_dev = se->dev; >> I don't think, it is needed since this is specific to firmware control, not Linux control. > > My point is that it doesn't have to be specific to the auto usecase, > further commonizing the code. This API will not useful for non-auto cases as well. Lets talk on on V4 version patch-set. Thanks, Praveen Talari > > Konrad