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 BCCA73E0097 for ; Thu, 25 Jun 2026 12:19:26 +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=1782389969; cv=none; b=BRxkVtjFVVDxRyKyI9G3Mejjp17SzasBtckei+jHx94tORFM/UhDNfm7TUm0q+qGN3arvgi4uvODk58LUY1nlTTQ6rbrjozdEge2isXaBlx2CQQy1ae6MUZqXXyK0fDm2dZkh+yB6MVak27yTRYXPCQ0njUh1HGIJeZbfRUT6LQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782389969; c=relaxed/simple; bh=Mz8OpHT1duaXDpyujl4q+fOZ5QNzT5vnTX8I3Qr+vi0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Je+SoC847EGWFP56R2+6b5sl9TW0EbN/IrZ3LDL+ucc7ZumtoeuJTsbSNlZ01oWFCInaCqhFhOh6dKaYH68gnDnSlmhKyVk7wM/ZLei87BQPEQMK7BAs+RbxUNA7d4F6ZTyRg+//IXEcVEDqTHuf2L+G4grTs4wXljGCDKdEn4A= 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=gnQVGdaE; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=NibFjbqV; 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="gnQVGdaE"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="NibFjbqV" 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 65P9julB1753995 for ; Thu, 25 Jun 2026 12:19:25 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= Q5HypoovyYvP0zHEoJJ3u328Zashj4UEqpuWiF8wzV4=; b=gnQVGdaENlFp0652 Bgn/j+CWF23qfJ9vOSjoas7QvhupePAGN4cdpKqBQgT/sNzs2V36Ps6tAhLoeBxv JBU6xcqjSbtTMB1gfxxW/f7ALypk5vzzwGncsxbNBdPy+SwKjBuO/pJRBFubbi93 lUAhEvfWPkitlOMz5IAkl1/qVLu2bNfTqI2y5VLzCy9puGisBXfFYyU8aoYklkTK lZrKW4rbLOMeBBVh2GR8zO8eiJik6b4K51wleks+qDIUo3jqg0IbIOM+R1iiNBUK HqXkz96Ws/92AcZeX0jU7NiR8bShdO/aiSCu3RZfoYcSIFsPbS8gbJsQDyOH93H6 ePAxlA== Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4f0w0q1rdx-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 25 Jun 2026 12:19:25 +0000 (GMT) Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-9157b3e5182so11447885a.1 for ; Thu, 25 Jun 2026 05:19:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1782389965; x=1782994765; darn=vger.kernel.org; h=content-transfer-encoding:content-type: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 :content-type; bh=Q5HypoovyYvP0zHEoJJ3u328Zashj4UEqpuWiF8wzV4=; b=NibFjbqVYt65OuQLWstVv6KYzu2+yCQvCeso2UCItY7vDKeU2EYhbTrD/bgH3sDLIG jkoqZcy9qaAsiNWitjhSzmLoki297FMTi7kmj/fYKaMpmzEGK+NFnoBp6/3c/4/EC2RT RPmveFnyrRgafM3gtyC5fs4g2TMNbm6w6e7D5yVRStzzbNA2Eksid6+4f0yd8pgwhPbA OAD4Noeq+yBUJSayRm7owQ7bgrcf/wkSv2KW1WJ1/BBF78GrL8OBTAbU9nadgfSSf+qE yysAsqG5dqWAODtbEDqnRMx/MpAqGTssJOpbQXtq8W+eG+Ut2R2vcXizh08vhyeOLhq8 0Eiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782389965; x=1782994765; h=content-transfer-encoding:content-type: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:content-type; bh=Q5HypoovyYvP0zHEoJJ3u328Zashj4UEqpuWiF8wzV4=; b=T/Hh/HCfs1Fy6iQwWkogsG7IUdw2+C3RQRt63sbbwE3MZqX3fb0Rb7Z6Gv9+iIBpz3 CxI2nwZR/K8zzJaxUMakmD8HIx/B8dt/7LaU24cCGJ68PzMHXyQOJJQi+y8jsGvcONFx KL+PyEJZMBz8bk76o+Bblc9+paphuehO2ZUkSK/GQJBLSLdZOZQcRQeW12RlbyE1i12/ T8f9ybEA1kwLNeOqFLbM8pZzqhr9pxOkG7VBga9B9RxBuyDgAayE0CijDiVgVIWgxigN Tw4k3wlwxxCmBHXzaU/JtHXzbA206WfHZcHHsZFIIx4KB8c4xZ3j4HzvNO9dqO7RxPKC 3FVw== X-Forwarded-Encrypted: i=1; AFNElJ8O7P4157CIkuUGf6o1iiITxVTm4acg3IRoS0d1tL+d8o5/lu8QW9TqjbV2DlrEu5tl0EfFabNY04FcE0Q=@vger.kernel.org X-Gm-Message-State: AOJu0YyYKXHrP8XgbN/YySJr1yrxuWJ9ay2k70FhAqIBW2ot8OqLadKL rT8aar3itsYDyHZG5PoyIxg/Z1pVnny7vl6koCEwydNPpRePytptJ6tnaBqXI9WBevOXrNwz1cI DrvP3LDM/nF07iMej3+EzrNq//gC5MPX+GVdV0RR6w4Itgh1H9BcWzGGhuveH8u4RtZc= X-Gm-Gg: AfdE7ckIbULBTK+VaFbv0C+IVJ0MVTscorqEJpCKBMjxkXLGw8C4QMaIHQEEq35rf6P CfnTqOTIa8kwg1JlUuDdfjYwIn4RMYCDIfVbl5D8C6ZH91f4azjzQCXumeI2bUy+JVlFXx5e6Ao oHVlHrTu1LZ/mn/WfbLfaK2TSkcriGF1yqdCr6q6u1tPLRnn8SjaXDgaTqPSjIjy16ZbGeLqPbn IPiYZJ/nEXrRChmwQDYcMNnu7vkfLoyYE27yk0F0SzXhEARktKE8/S4TcujtHEoogNhB7fJqTtQ RZnxDHU7DY9X2ibCqVaMlYb2fmbk9KiEj8+pG7uosJvsK/nuA9VExsL0lQL1AznFYKqLxmAAtA+ 90nMoJ7F5qlcBDA/nbsmZ8UmBvfw0tBHfXP8= X-Received: by 2002:a05:620a:4693:b0:926:e8e6:3c28 with SMTP id af79cd13be357-9293e3bc2famr201292685a.7.1782389964878; Thu, 25 Jun 2026 05:19:24 -0700 (PDT) X-Received: by 2002:a05:620a:4693:b0:926:e8e6:3c28 with SMTP id af79cd13be357-9293e3bc2famr201288485a.7.1782389964264; Thu, 25 Jun 2026 05:19:24 -0700 (PDT) Received: from [192.168.120.170] ([178.235.128.140]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c11fbe05f9csm171615166b.31.2026.06.25.05.19.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Jun 2026 05:19:23 -0700 (PDT) Message-ID: Date: Thu, 25 Jun 2026 14:19:21 +0200 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 v2 2/5] clk: qcom: common: introduce qcom_cc_sync_state() To: Brian Masney Cc: Saravana Kannan , Abel Vesa , Maxime Ripard , Michael Turquette , Stephen Boyd , Russell King , Bjorn Andersson , Hans de Goede , Dmitry Baryshkov , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Jens Glathe References: <20260616-clk-sync-state-v2-0-15f82c64d95c@redhat.com> <20260616-clk-sync-state-v2-2-15f82c64d95c@redhat.com> <21bbffb7-ce99-4c38-a5cc-6a3f3c7f48eb@oss.qualcomm.com> Content-Language: en-US From: Konrad Dybcio In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-ORIG-GUID: 4Z46NqNDE2aStt9aOrekhFgVf5yZc8xb X-Proofpoint-Spam-Info: AW1haW4tMjYwNjI1MDEwNiBTYWx0ZWRfXx4ECqofpa4Yp b9jI54qUB6JLBeJjYinoz3Rw4gi6F/khXTpom+qSMRCODdghONDc94fPT8KA13Smb3boL1H6wzO goR3cXlQzRYgoVgN8tJ+vw2uVVSKHu0= X-Proofpoint-GUID: 4Z46NqNDE2aStt9aOrekhFgVf5yZc8xb X-Authority-Analysis: v=2.4 cv=R6Ez39RX c=1 sm=1 tr=0 ts=6a3d1ccd cx=c_pps a=50t2pK5VMbmlHzFWWp8p/g==:117 a=PRfkaYvzSr8QmIIGAkY2Sg==:17 a=IkcTkHD0fZMA:10 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=ZpdpYltYx_vBUK5n70dp:22 a=gxl3bz0cAAAA:8 a=20KFwNOVAAAA:8 a=_b-nc2vJREEiSiBs9swA:9 a=QEXdDO2ut3YA:10 a=IoWCM6iH3mJn3m4BftBB:22 a=kiRiLd-pWN9FGgpmzFdl:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjI1MDEwNiBTYWx0ZWRfX+RUo2Qyhny45 T1ohp+ZnwLzw1QYRwU09l5NuCDm0MgKCWLLI+aoUzXVbmDvksLdQ1EVgWkQxjsAkimFyRI+t44w 563tR9BLgFryU8FaWBUs9AHYYYlXk+H+MnS6AsxT4fUjTfDNr60/GYlyWBM+lNs37P3dL90yZU6 SNPX9+3VKLt3nHZK8ikfriqirAadDtii6xTtZThBpuu6ljPwTbhTM3tFwOjW+7Ovjv9IQM67trN SXkTT/2SaGhuBj9Vnf6e4LvN6q9UrIZgjPRO6XchX2JfwN49R5q1VpAZ9juq000NU421qicvKZn YOqBQPMAEirAsb9WREioV/DA+z0W0NqgEQBhwTDSXhBNeuzpCOxG49anvT5USh+jpZrdgEwZbd4 9ppOhd3DVHu5ml9uVXWxgsvOKuizv8causrhh+UA330Aj+EmxGO5TqzPUAkNmBIc5y7S2Acbqwq tmWEakaj/xlAIPDPE1Q== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-25_01,2026-06-24_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 clxscore=1015 malwarescore=0 priorityscore=1501 adultscore=0 suspectscore=0 impostorscore=0 spamscore=0 lowpriorityscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2606250106 On 6/25/26 1:38 PM, Brian Masney wrote: > Hi Konrad, > > On Thu, Jun 25, 2026 at 11:44:12AM +0200, Konrad Dybcio wrote: >> On 6/16/26 11:09 PM, Brian Masney wrote: >>> Several qcom clk providers currently have a sync_state helper set to >>> icc_sync_state(). With an upcoming change to the clk framework, if >>> sync_state is not defined for the device, then the clk framework sets it >>> to clk_sync_state(). >>> >>> Clk providers that require their own sync_state will need to call the >>> framework level clk_sync_state(). Let's introduce a new common helper >>> qcom_cc_sync_state() that calls icc_sync_state() and clk_sync_state(). >>> >>> Tested-by: Jens Glathe >>> Signed-off-by: Brian Masney >>> --- >>> drivers/clk/qcom/common.c | 9 +++++++++ >>> drivers/clk/qcom/common.h | 1 + >>> 2 files changed, 10 insertions(+) >>> >>> diff --git a/drivers/clk/qcom/common.c b/drivers/clk/qcom/common.c >>> index eec369d2173b..31382c49c948 100644 >>> --- a/drivers/clk/qcom/common.c >>> +++ b/drivers/clk/qcom/common.c >>> @@ -3,12 +3,14 @@ >>> * Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. >>> */ >>> >>> +#include >>> #include >>> #include >>> #include >>> #include >>> #include >>> #include >>> +#include >>> #include >>> #include >>> #include >>> @@ -464,5 +466,12 @@ int qcom_cc_probe_by_index(struct platform_device *pdev, int index, >>> } >>> EXPORT_SYMBOL_GPL(qcom_cc_probe_by_index); >>> >>> +void qcom_cc_sync_state(struct device *dev) >>> +{ >>> + icc_sync_state(dev); >> >> As mentioned before, we really need to test for (qcom_cc_desc)->icc_hws >> here >> >> If icc_sync_state() is called without an interconnect provider >> being registered, the framework state gets messed up: >> >> --- drivers/interconnect/core.c >> void icc_sync_state(struct device *dev) >> { >> struct icc_provider *p; >> struct icc_node *n; >> static int count; // function-static variable >> >> count++; // called for every clock controller in this revision >> >> if (count < providers_count) // kaboom >> return; >> >> // actual sync_state never happens anymore >> >> Presumably one would pass this through drvdata, but be careful as >> some drivers use it for other purposes today > > My next version of this series that I haven't posted yet allows chaining > the sync_state callbacks at the driver core level. It doesn't require > any of the QC clk driver changes, and will allow us to play nicely with > the pmdomain subsystem, and any others the move to sync_state in the > future. > > I think I see the confusion between us the last few rounds of review. In > this series, I added qcom_cc_sync_state() and converted 6 drivers over to > use it. (I excluded clk-cbf-8996.c since it is separate.) Only the 6 > drivers today that called icc_sync_state() now call qcom_cc_sync_state() -> > icc_sync_state(). So from my vantage point it is the same overall > functionality. > > I didn't look at this from the perspective of qcom_cc_sync_state() would > be common infrastructure, and a newly added driver in the future that may > not interact with the ICC framework may use this. Is this correct? Aaah right, my mistake. I assumed that adding that binding qcom_cc_sync_state to all qcom clock drivers was the next step. Konrad