From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8FC383E7BCD for ; Mon, 20 Jul 2026 10:10:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784542263; cv=none; b=NFKNmwkEEj1z211OdKw8Sv+wnnRb6FHGVfNlnMxs0cl94TjKBK2K10WkcM/+WozUAEGWN9+jzWCjBw+9io5Ce79dxZ1KBOwBldG1J/cQthVotre4ahxopgtgIEgs1WnbNYdjHFncvR16+d5DUQLIRbKKmIffyF1aTshKLzQ0btE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784542263; c=relaxed/simple; bh=3VGzNIVavy4riBNoVaQGq83t63k4CBx5YMYFOuF7l5E=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=PmFVw1dYphdiB4tZ/gdaWsLXbx5Sp6fxEg0+3JaCifU6wu5n5ssGsFgLA3RgmQ0/VSKK0cFqf+tmRhkaMNK5ozpEOddIkeGNWmKc4073sasUp9dDC59NztVJe58McggBswFZH5U7qYEL4TdARQ92dpCxGn9lev8eS3TofV4cBxY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=Prv0kC9j; arc=none smtp.client-ip=209.85.218.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Prv0kC9j" Received: by mail-ej1-f51.google.com with SMTP id a640c23a62f3a-c1600d040e4so559550866b.1 for ; Mon, 20 Jul 2026 03:10:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1784542252; x=1785147052; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:content-language :from:references:cc:to:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to:content-type; bh=tKvQpFa1elvV0qe/8C8Y/Fz5QGnzRdhnFNUsbcgsZbw=; b=Prv0kC9jS6EpSBzK5FA1R46Ng1uKoRXe1xT8oHaD8vXv8V7mL9xcljj6f0Z9uaKNEZ ofGJe+9q9giZsJvSUQVZUur1lcFnpKi+mvGgpeyecUYu9pHN8N/JXQ5evkmyH2yIAfVv PJOo/K+qllyby4rRMFUjxjJgRa0zlEqRvb8P1RAF+fp92ksXhmvPFosubgS5P0o+elpL czCrBTK6yilk58BH/eoliKDsYXcLLeOw8wdf0ITzVZ5/bUa9tbOcjWrbvXLoLk1pqu6T zMTFhaggR42zNhTasL6MpiCv1yN3Vdy2HhdtZjalG4tUcNF6f3LRjSCt95jM3eOvsq88 QR4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784542252; x=1785147052; h=content-transfer-encoding:content-type:in-reply-to:content-language :from: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=tKvQpFa1elvV0qe/8C8Y/Fz5QGnzRdhnFNUsbcgsZbw=; b=ewJzEdYpleAq7HJ0KJpKCDilh52ScFYEUdrUlB6H5lt9g2PcrXFoC2t35dBRX3qHXG GoU9np1Lfr6UwtLhip2nSWzGzOQHzn9DFwgjfHznI3pJIKkvLpM78NlAnruV8vHl24PF Q2tv2Qd0nO+jhPbbYJ1ze84OY8XDBJ2hn2tHuMpM5jVqwKL6C/98TbgqJnxdTEZLAH+a +3T/n06eZ8YsdKaVjGb/gQk+HQZoopwfClArCIErkCwAhZ7g8Is+6sYQWCPaUYYXI4k2 5pVM2Jem1EIY4pAOE+1KrBEKMBUoaZhRYagss15lJcKT2Jp3R0UN62A7hYu/XMqZRt0X /TkQ== X-Forwarded-Encrypted: i=1; AHgh+RqwWfUL6la1MlSV7OWP9k2Tmm/s7Nvblz1zRPtwfyC5eRD60Cyp52GwbvdUsM2oYei6TKKV8N/036+3bYA=@vger.kernel.org X-Gm-Message-State: AOJu0YxQGYT65TykztfgGJ5tkXPsfN9GU2rfS5a7nI0fFYTZX9PJ5LB3 3ybjoNGVIUvtjJ3BiI5KFYdyFXh3qqNsle8t7JmqmMlbHvTASJ32E2DOyi8fS/GuRPI= X-Gm-Gg: AfdE7cndyJDlNsKl1V3V96T+lW37eii5PTaraUqS6KJsNyb1VQc3MniR5EfbE7RyLmU 7mAJNRxydKpo3red1X4wfd2dhod5BfBwuFGqde49QuFg9g5/+CIJn5EZ+Ou+jd87Mp7QL1SEz9V fh4sEx/IHz/+0s/Vpx7YdR6ePrDX3xe020nfFS9capFz0oCLj/Lx3v1T/Z8RQu5oZxWG3X9BD9V ClyJA1LFrndgAPLeLj6MCn7wUtoesty8Rhiee7sdqsiAmrpQe06COoJx3kb47SE7N1HhHMhD67R CxS7i5550+GSiFH85AjPMABBaZEbJ/G8rQAf3Fx9g2wBpNP3I7VXVZVUGfabJVxBP78x8qmQ8ql fCdOh2zNSjh5oQoQyo84AkGJnH+H8MO4ZIOyMM3RYaI4cF2WpVBK3P4qMmyWw4m35ZLBHyH1RVA Jgye7bixshtyAAJlpn8hEOTrox X-Received: by 2002:a17:906:f584:b0:c15:ee17:47a with SMTP id a640c23a62f3a-c16922d7b1fmr921088666b.15.1784542252253; Mon, 20 Jul 2026 03:10:52 -0700 (PDT) Received: from [192.168.0.101] ([109.77.26.223]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c1705afeb98sm441332466b.22.2026.07.20.03.10.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 Jul 2026 03:10:51 -0700 (PDT) Message-ID: Date: Mon, 20 Jul 2026 11:10:50 +0100 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 1/4] media: qcom: camss: Add PM clock support and integrate with runtime PM To: Loic Poulain , Vladimir Zapolskiy , Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20260717-camss-version-v1-0-7ed71fea95e8@oss.qualcomm.com> <20260717-camss-version-v1-1-7ed71fea95e8@oss.qualcomm.com> From: Bryan O'Donoghue Content-Language: en-GB In-Reply-To: <20260717-camss-version-v1-1-7ed71fea95e8@oss.qualcomm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 17/07/2026 15:20, Loic Poulain wrote: > Add optional PM clock support to the CAMSS driver using the PM clock > framework. This allows CAMSS clocks to be registered once and > automatically managed during runtime suspend and resume. > > This is especially useful for global CAMSS clocks that are shared across > multiple CAMSS subblocks. > > This avoids the need for each subblock to reference and manage the > shared clocks individually. A typical example is the set of clocks in > the top_group, which may be used by CSID, PHY, CCI, and other CAMSS > blocks. > > Introduce a small PM clock descriptor table in the CAMSS resources > structure to describe clocks and their optional rates. Initialize > these clocks at probe time and delegate clock ownership to the PM > core. > > Hook PM clock handling into the runtime PM callbacks to ensure clocks > are properly suspended and resumed alongside power domains and ICC > paths. > > Signed-off-by: Loic Poulain > --- > drivers/media/platform/qcom/camss/camss.c | 40 ++++++++++++++++++++++++++++++- > drivers/media/platform/qcom/camss/camss.h | 1 + > 2 files changed, 40 insertions(+), 1 deletion(-) > > diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/platform/qcom/camss/camss.c > index 2123f6388e3d7eafe669efd6b033e22d8eb5cf79..6a2bf3373e8755805c8cd0f8fe5037b788d68fa2 100644 > --- a/drivers/media/platform/qcom/camss/camss.c > +++ b/drivers/media/platform/qcom/camss/camss.c > @@ -18,6 +18,7 @@ > #include > #include > #include > +#include > #include > #include > > @@ -5346,6 +5347,35 @@ static void camss_genpd_cleanup(struct camss *camss) > dev_pm_domain_detach(camss->genpd, true); > } > > +/* > + * camss_init_pm_clks - register shared CAMSS clocks with the PM clock framework > + * > + * Clocks listed in res->pm_clks are shared across all CAMSS sub-devices (e.g. > + * top_ahb, axi). They are managed automatically by the PM framework. > + */ > +static int camss_init_pm_clks(struct camss *camss) > +{ > + struct device *dev = camss->dev; > + unsigned int i; > + int ret; > + > + if (!camss->res->pm_clks[0]) > + return 0; > + > + ret = devm_pm_clk_create(dev); > + if (ret) > + return ret; > + > + for (i = 0; i < CAMSS_RES_MAX && camss->res->pm_clks[i]; i++) { > + ret = pm_clk_add(dev, camss->res->pm_clks[i]); > + if (ret) > + dev_warn(dev, "failed to add pm_clk %s: %d\n", > + camss->res->pm_clks[i], ret); return ret; --- bod