Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp837277rwb; Thu, 22 Sep 2022 07:04:27 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7zHuLOCP1RNxvNjzPAq2+mVvS5riUCSFacdI67LbNonbJAaG3Z9iOJ4/BBaqn75Wjei7wK X-Received: by 2002:a63:fa44:0:b0:439:2fa1:d9b3 with SMTP id g4-20020a63fa44000000b004392fa1d9b3mr3296272pgk.110.1663855466439; Thu, 22 Sep 2022 07:04:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663855466; cv=none; d=google.com; s=arc-20160816; b=JhMuAu2VqHFep+v85GOJdS7zLb7pXP1D8GGuQ7FF1efhfjAGSJNa//khNuWkygLbq+ KtYz9nBaLEhKTV/PtV5vymLMmHxkWUpTL3kP2kKfd4+4P6epBHMJXuu6rDcwYMYasFPy mGH7eXawLPFYCqp17WG79Ic3afSydBfuQRC0nBka1RlXm2X4mRudgNRrTcmwXoPr0Tqp TLOCwpkmFua09nCcyNpUbg39x+Lottbtaqc8Q0ddcN0KjBz05gaaCPydAN2kyFSGgaPS DOBPME2waB1DQrtlPR6fsmR3iH4RYv5C31yZlgv4SfidmwyhpEtYWP5eDDhRZ0WWQR1b 8b1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=GfDOH3Jon3LZczj1G1VLJYGGbFNCEA02UiZeXWZy9+k=; b=n1MKxuLiyUO58SJ0/Sx+WYSJHTUn45k1vwVhXOOSFBQcB11r6kxnRd91Pu8ijwZwx9 +hUQCZ9dOPuPx7qml4L1rWYn49bTaArjFczje+2GDnp+NZ5RADJQz+3soOYc6vlPN+Ip bM/uJt0YD3S983FbpAOvZkwgS0N9ANASuqhqO7Utqv/lGH89VS1V/R3+XuTlPJIyYp4t DQ9CLQ6HpQVveRj2/jFLFSobtIJdRIeif9mVwN9g5BFBQ3EMnSKysn2fritgadosYLwy KO5XppFX6mQFjOQ6cs9vbAW6FmR1zL2MWgcRQrxE2uUgJVYwnls/gc1Qx5ggBk4hy5fY +epA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=hif0g0Hs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j6-20020a170903024600b00179988ca61dsi596786plh.510.2022.09.22.07.03.57; Thu, 22 Sep 2022 07:04:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=hif0g0Hs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231415AbiIVN1r (ORCPT + 99 others); Thu, 22 Sep 2022 09:27:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231228AbiIVN1p (ORCPT ); Thu, 22 Sep 2022 09:27:45 -0400 Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 639B1E3EC2; Thu, 22 Sep 2022 06:27:43 -0700 (PDT) Received: by mail-ed1-x52f.google.com with SMTP id x21so6524390edd.11; Thu, 22 Sep 2022 06:27:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=GfDOH3Jon3LZczj1G1VLJYGGbFNCEA02UiZeXWZy9+k=; b=hif0g0HseARCaUTv7LneolSToCeCpqwcD8FGLV/jJbP3gxyplN7LmjqI80BuO9Os9Q sswktMIzxvl/AVbE4k6P4qdrDa+/MdIYr2V5b5a5X3BZEuj7dONlbzOEeWORcNqAKqih 0iF1cRLKrthqqimysu9x8U05GYDaKiM4VKrUng7rC7R17nS4lucImmCQf7y17RbhDVnB vGjbQ6FbdYExu+be5WuTjg2CCxNwbXaAFzAyd60saH1doqta7PtD5CZjGjb04iACUL9q uPyAatDxEDIiwso2g+ubYr4ubEpG7N0wK1Bli2F9JrTIN/7B1OfRefvMvrTK8dJDvXt1 nNBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=GfDOH3Jon3LZczj1G1VLJYGGbFNCEA02UiZeXWZy9+k=; b=ymHaerePL76EDpTb3aJXXfPG44GTzHYHD3VQiO/x8Y7vpXB5JV5DyQ6ZvwHZ1T1L7o qA5jwWy7Jp7mI/G2XCvg3p4A5eWgGYOVbirIZ57z/l7uPWBP0CVnbjfwSepIjjhRt5W7 LLntUe0t+73aGOG83lBfMMu1xEowsVDIjGkgiANCSuPNOS676cjrKZa4gb3swW93bM+o B99D0iMfmngLhbGKM02OXBwktogeF9cpge8oil8qUwWFFjAulgAWKRLr6R6t8rJyOZKW 5Mbh6ruZQlqL0ysxB7NK4aKgH2hGcmo9eVxF5Bw2FFE/zsvs/35CfUxzhCQIOPNtmLm9 ZKAw== X-Gm-Message-State: ACrzQf1En7jC1FdczfJaqNfy4yj5YyQHKFUeRFpyfcxr+FnZ+n71FtyV YurwaH5Aoisi9aGEGkHYwk+luNiN4sMU/6kqL+E= X-Received: by 2002:a05:6402:50d1:b0:452:899e:77c with SMTP id h17-20020a05640250d100b00452899e077cmr3385432edb.0.1663853261902; Thu, 22 Sep 2022 06:27:41 -0700 (PDT) MIME-Version: 1.0 References: <20220905230406.30801-1-prabhakar.mahadev-lad.rj@bp.renesas.com> <20220905230406.30801-4-prabhakar.mahadev-lad.rj@bp.renesas.com> In-Reply-To: From: "Lad, Prabhakar" Date: Thu, 22 Sep 2022 14:27:15 +0100 Message-ID: Subject: Re: [PATCH v2 3/4] media: platform: Add Renesas RZ/G2L MIPI CSI-2 receiver driver To: Geert Uytterhoeven Cc: Sakari Ailus , Laurent Pinchart , Lad Prabhakar , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Philipp Zabel , Jacopo Mondi , =?UTF-8?Q?Niklas_S=C3=B6derlund?= , Hans Verkuil , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Biju Das Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Geert, On Thu, Sep 22, 2022 at 1:51 PM Geert Uytterhoeven wrote: > > On Thu, Sep 22, 2022 at 2:34 PM Sakari Ailus > wrote: > > On Thu, Sep 22, 2022 at 01:08:33PM +0100, Lad, Prabhakar wrote: > > > > > * Switched to manually turn ON/OFF the clocks instead of pm_runtime so that > > > > > the mipi/dhpy initialization happens as per the HW manual > > > > > > > > That doesn't look right. The driver doesn't use runtime PM anymore, so > > > > power domains may not be handled properly. What was the problem with > > > > clock handling using runtime PM ? > > > > > > > If we use the runtime PM all the clocks will be turned ON when we call > > > pm_runtime_resume_and_get() which I dont want to. As per the "Starting > > > reception for MIPI CSI-2 Input" section 35.3.1 for example we first > > > need to turn ON all the clocks and later further down the line we need > > > to just turn OFF VCLK -> Enable Link -> turn ON VCLK. Due to such > > > cases I have switched to individual clock handling. > > > > If that is the case, then you should control just that clock directly, > > outside runtime PM callbacks. > > > > Runtime PM may be needed e.g. for resuming a parent device. > > Exactly. > So probably you should not consider R9A07G044_CRU_VCLK a PM clock, > i.e. you need changes to rzg2l_cpg_is_pm_clk() to exclude it. > Thanks for the pointer. In that case we will have to consider R9A07G044_CRU_VCLK and R9A07G044_CRU_SYSCLK as not PM clocks. Does the below sound good? - DEF_NO_PM() macro - bool is_pm_clk in struct rzg2l_mod_clk. I still have to implement it, just wanted your opinion beforehand. Cheers, Prabhakar