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 641DE3563F2 for ; Fri, 30 Jan 2026 17:00:16 +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=1769792418; cv=none; b=n9ZO7jp9ApTUvdCnmkRTLOCZsepdJyRcW153al6gCTdTe71/SfxHPm9JMaykGg49uuGkx7uR5gpALoeSQd4mJb9OVxzp/bEWMOBQyvfb/3kHV4qRyhPwpX3qQSrooyps7NrFuU9NMrCh6DZC40emHwuSSnarzZZkLUlIg5lu7YA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769792418; c=relaxed/simple; bh=ds9FPB/5pM/kv71BElJIzPABzsNvdIriGuFb8MtF9aA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Ac/J8hsk3HgWlrIXMYWBRb27+FRGyUM2bWYdTfaQ9p6O51av1htfWtloTUK1iG/+OZ8ec7u5nDjyxzBZv/oggkZdFumWqkz0GVrAKYJs7j8ytMFhf5vbWp1q5nrY1FyVCcSEQpIW0Qw7BtlgmOpdzTNkReB3kOVAYxsdlOyihpQ= 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=ETVG4Gog; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=S3cTXhfP; 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="ETVG4Gog"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="S3cTXhfP" 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 60U9VFeP2675693 for ; Fri, 30 Jan 2026 17:00:15 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= Zb3wuqHKR/ACis16psjpt8hkng4oZUPBMQt0TeF/IN8=; b=ETVG4GoggPSEaYNk 6YHAzRnjxRiZh7Xx4dz9GvBUz7xr1SdT49lC3wM/p+UWgbGZIERkm9wBRnb18OBX /CdEwng+GjYziTZMu5ut41hKvOJfV0BFeNy8vFpOlctpICRlhaPD+ZjnvhA1GDgN x1jqq+BjuV6/3GmAPBNTHaGIzEg6g3Fu6aX1baiN71EVT4nAKOY6hrOZXtf8ydui nFEXwsIGX7nFfpIlz/VEunlKcyqVOp/6f7ax4DXwKKXxVY4u0jTWBQAUjkd+iWg5 R9gaM5y6JNnC15HIbSR4gxCmR23Sxt6Op7sTJbeLXcIKC7oii/2kolwnecNEGzAM Xi+JoA== Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4c0t341bee-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 30 Jan 2026 17:00:15 +0000 (GMT) Received: by mail-pl1-f197.google.com with SMTP id d9443c01a7336-2a7701b6353so24768385ad.3 for ; Fri, 30 Jan 2026 09:00:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1769792415; x=1770397215; 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=Zb3wuqHKR/ACis16psjpt8hkng4oZUPBMQt0TeF/IN8=; b=S3cTXhfPTGRmaBD+fz02CBBWBYddwLelBOLA0vDTeaBskGqF7jK3SeW1nJ4S2j+1Nx OwiOQhYKIuU5SNhIJuzjGFppQMI75LTgSvYAkwejMUIaUM66HchGCcYcCRTg3k8u0VdS Y77zdCtI9E0hIEJNAPishZ6/99k5uBCtblYdq7BiuuOCuGInB7EYrFag4DtohQ+GJmYW H79sll9AAIFBfq0/+SpdN/kExTimmlzqGi6WTUdsmSOI5V5A2fvFIZ2yHZzcCnLtVesi xNr2eACgb3jLXPSXjtV/WhRqRrG6RtCJ5U8fsptQ70JUz/kbxyFWOIaOUWUtsGVoziZX 5ugg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769792415; x=1770397215; 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=Zb3wuqHKR/ACis16psjpt8hkng4oZUPBMQt0TeF/IN8=; b=tEtcU+UXnK+4+tzUBS9+tXa+ZMlTv+5nwd9JvkZ1Ns1QNzJ128LzF85rzGzoJQejcg Ugp/mNZV4//NEGfyDD9WB9YlsJFzu0TSU3BNkvpPDDs323yK85pqmHWjbD0OeF/WTfLY 0uI/aADs0mtN6t/5uNHueAkdGED7pKSEWt6u9OYUHdECxeCd+yr25EO4ygYoc7x1v5Ag Ox6W80Zxw1MGWaYgxjUoHmuxDWEeE1AUN6KZYFVBx1qRcy9GKIJlYNZDi6YQYJubr3T/ a9RofcKfERSgSNuUXODcjThdO08sP/I3zGu80EqCYma9SxnQDfr6d1toI1mtcorGDNxe BsyA== X-Forwarded-Encrypted: i=1; AJvYcCVbr9QegK7Ewmx1znbVf4j9jFW9dz7iSbSTRgq3/IoStIZbKmKeLF6X69liV0nbzciA+lNGfG53gDCRIc4=@vger.kernel.org X-Gm-Message-State: AOJu0YxQ1IWHdrhv9SwLfpE8Dbf8BGvOwcYb3++nLs1G6hO67FN1gG38 IkOnnrb2sGdn96Aggu/QohvL+wa1AWXjlGvoa2DpgPedCkyeiC5AQHHHWygFgUyKELFHlafpCbD pmHPXXWdMd7JSWsh8smq5CfohzrGM072zVQSlARqGrD6jDY6M15sWSNTmE8phJALpj0k= X-Gm-Gg: AZuq6aJ/mErm8unZbKDFDLxp6bLSTn9EAUg7+PfXDpmz3jz/Rbz8eqqugeOq7Ao8Ml+ u4EIwXKwJ355S9FP5Ndk160EQqm6gps461dBma5OYsfd0occGGwoC6UoPyK0+RWQlscWXNvSfT2 csjpZ6mrQCLmWOuHZP6stmyUIUNxJkPQ07iceTjAskPTpQisVUcwIPJ/SEqmrNPqgwtUFTKNqCX mZJAavXV3ZZV5xcLl8ph29Txo5/g49iDyGZ9CyaXuLajM6KSpBmLyYdf27rNDDntNIYKf9+T0Z6 p2SYhsKNHH5p3KWIBSQv1Ti8AR1Tz4cbJj5IcdwGpAO3/kQ1CqxGNsf8JiZ2pLqYlxWu6fmF1z0 vUBGlA01lCtNmhU8hD5x8M37LyH4v8/OG+Fo34kO7 X-Received: by 2002:a17:903:166e:b0:2a7:8bf3:5677 with SMTP id d9443c01a7336-2a8d81bae0cmr34347775ad.59.1769792414699; Fri, 30 Jan 2026 09:00:14 -0800 (PST) X-Received: by 2002:a17:903:166e:b0:2a7:8bf3:5677 with SMTP id d9443c01a7336-2a8d81bae0cmr34347195ad.59.1769792413761; Fri, 30 Jan 2026 09:00:13 -0800 (PST) Received: from [192.168.1.7] ([49.204.111.90]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2a88b4c3db4sm84917295ad.50.2026.01.30.09.00.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 30 Jan 2026 09:00:12 -0800 (PST) Message-ID: Date: Fri, 30 Jan 2026 22:30:04 +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 03/12] soc: qcom: geni-se: Introduce helper API for resource initialization 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-4-praveen.talari@oss.qualcomm.com> Content-Language: en-US From: Praveen Talari In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMTMwMDEzOSBTYWx0ZWRfX74Hqu21KND25 Y9uRrBBJ3iO4DnQcM62SHmEyBt5DQTJhiBO6zDjyUp3p8VJRsciQAUCoxJFj9s4f1/gkNRJtILJ N53wHmo+kuaXSysrNYxvZIAhQHVERozQ+pBs0LtyOVqezVRWZWj1NsahRCKO1k0d499pNxd4rwD aIMP25JC42D8hz2mMs0ZZ8eLi/3JjbhAhe307xkGBm++eWOAau8cS+VKW7hopT4ke5qI29k7t5t lSktGDVm/yYM+DbBLqk6I0bWp1Ph8hU8dmFASUISn+J3dFNcnRyUJFv++1ZR0OzgrkB0c11UQ3f aqJCEWZBcDXtfr+1hv6SrielqlKKGJJlIj5PqpIHt20sMusHLtPn5iaKn8K/7+cJ5vAUAdYiY9i KaOzeABXwE0cYa7HyuHrPVobqmIHRsQY4g1kUlFrbcznhR6Bmk+Qym97DJ4r94xERe4+twexhJs 0xE7e/0YqJenT5+3y9w== X-Proofpoint-ORIG-GUID: phg-WuEUPRhr5VZ7QIH_V6rbJqOk2zPf X-Authority-Analysis: v=2.4 cv=QfFrf8bv c=1 sm=1 tr=0 ts=697ce39f cx=c_pps a=cmESyDAEBpBGqyK7t0alAg==:117 a=10aD+GSAjGS7IfLbEAHBKg==:17 a=IkcTkHD0fZMA:10 a=vUbySO9Y5rIA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=lW4um1KOeupUEvrI7wgA:9 a=QEXdDO2ut3YA:10 a=1OuFwYUASf3TG4hYMiVC:22 X-Proofpoint-GUID: phg-WuEUPRhr5VZ7QIH_V6rbJqOk2zPf 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-01-30_02,2026-01-30_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 bulkscore=0 impostorscore=0 adultscore=0 phishscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 malwarescore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2601300139 Hi Konrad On 1/30/2026 5:40 PM, Konrad Dybcio wrote: > On 1/12/26 11:47 AM, Praveen Talari wrote: >> The GENI Serial Engine drivers (I2C, SPI, and SERIAL) currently duplicate >> code for initializing shared resources such as clocks and interconnect >> paths. >> >> Introduce a new helper API, geni_se_resources_init(), to centralize this >> initialization logic, improving modularity and simplifying the probe >> function. >> >> Signed-off-by: Praveen Talari >> --- >> v1 -> v2: >> From kernel test robot >> - Updated proper return value for devm_pm_opp_set_clkname() >> --- >> drivers/soc/qcom/qcom-geni-se.c | 47 ++++++++++++++++++++++++++++++++ >> include/linux/soc/qcom/geni-se.h | 6 ++++ >> 2 files changed, 53 insertions(+) >> >> diff --git a/drivers/soc/qcom/qcom-geni-se.c b/drivers/soc/qcom/qcom-geni-se.c >> index b0542f836453..75e722cd1a94 100644 >> --- a/drivers/soc/qcom/qcom-geni-se.c >> +++ b/drivers/soc/qcom/qcom-geni-se.c >> @@ -19,6 +19,7 @@ >> #include >> #include >> #include >> +#include >> #include >> >> /** >> @@ -1012,6 +1013,52 @@ int geni_icc_disable(struct geni_se *se) >> } >> EXPORT_SYMBOL_GPL(geni_icc_disable); >> >> +/** >> + * geni_se_resources_init() - Initialize resources for a GENI SE device. >> + * @se: Pointer to the geni_se structure representing the GENI SE device. >> + * >> + * This function initializes various resources required by the GENI Serial Engine >> + * (SE) device, including clock resources (core and SE clocks), interconnect >> + * paths for communication. >> + * It retrieves optional and mandatory clock resources, adds an OF-based >> + * operating performance point (OPP) table, and sets up interconnect paths >> + * with default bandwidths. The function also sets a flag (`has_opp`) to >> + * indicate whether OPP support is available for the device. >> + * >> + * Return: 0 on success, or a negative errno on failure. >> + */ >> +int geni_se_resources_init(struct geni_se *se) >> +{ >> + int ret; >> + >> + se->core_clk = devm_clk_get_optional(se->dev, "core"); >> + if (IS_ERR(se->core_clk)) >> + return dev_err_probe(se->dev, PTR_ERR(se->core_clk), >> + "Failed to get optional core clk\n"); >> + >> + se->clk = devm_clk_get(se->dev, "se"); >> + if (IS_ERR(se->clk) && !has_acpi_companion(se->dev)) >> + return dev_err_probe(se->dev, PTR_ERR(se->clk), >> + "Failed to get SE clk\n"); >> + >> + ret = devm_pm_opp_set_clkname(se->dev, "se"); >> + if (ret) >> + return ret; >> + >> + ret = devm_pm_opp_of_add_table(se->dev); >> + if (ret && ret != -ENODEV) >> + return dev_err_probe(se->dev, ret, "Failed to add OPP table\n"); >> + >> + se->has_opp = (ret == 0); >> + >> + ret = geni_icc_get(se, "qup-memory"); > > The second argument is a NOP after patch 1.. originally I think I had a > cross-subsys patch to get rid of that, neither solution is exactly pretty.. I will drop the second argument once these changes are ported across UART and SPI as well. Thanks, Praveen Talari > > But otherwise, this looks good > > Konrad