Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp831567rwb; Thu, 22 Sep 2022 07:01:28 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6YaV7nxhxyCJpHxHS+iCY56zDku64BZUh4EnAD7PNPzJ8Z0BQgs5uB8ehladjHSNxmFNy6 X-Received: by 2002:a17:90b:3ec2:b0:202:b123:29cc with SMTP id rm2-20020a17090b3ec200b00202b12329ccmr15829591pjb.167.1663855288113; Thu, 22 Sep 2022 07:01:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663855288; cv=none; d=google.com; s=arc-20160816; b=aSco/JHnwKcyRMV0p6Uc/zmLXN3dXLFvctbKFEYW7DchT4GMp0CWdaeIbG1HRpfyVx dsAeYmszLhNyPhTDHn6SCDjj+wgzaxjamHcCoonEzJgm9bVXF3VBZ09iFh7yi0oAISjl z8Qkod32xNyaJIXMh8zFLWf3bfqc/pabaTkqkNRTKMR7/7/wuqxghi+EonFI1URF1HDh J5DCpDpyhn26MUnpg3O87QGqVDhUsnUAmomXA09BnVNMAGISz9lTTMe+XglcJA2DpMxG QRDrjuvKZ2NH9TgTqTZqc13PZ/ZeTpkvj6eqYtXVG9OsbVsjJ0L2hDyIEYszCtKfi6t7 +jCA== 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=oWTAgtwEdQZEhs85baSFdY/uLUUmuKOodCcZZkRj3f4=; b=rduyWFoHRjmtINkjIlhMyYjVRAqBXnD0mI22vp7x2HQojWp+k8q84stfL58esIifVd ZtRpYkSbvq5BiGpChrdVVyKPuE1cXjljd/V7+LAohb2O6F3yIHSVGEzAqzM7uIcxyUrI vAWWTrCdCARaYJ+zK7UlmLZjDyHWsUV4SKkLtpl8ac5D3REkOkNDbleUVnoEUNH03vpw LVzA6b+f3+ysTatQQfQDGz3V3xYJHJ4u77zeHft0nFNfLDU+kjGvxjl2KTDy4t7s/4NH HMBR9LRBxyCXLEOU+ryKGX7Pmfggv5Uk5NDtQCDb+h26xWEtLNbRN9FkaozD5y5R3/MD 7ERQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=CkbkPm9s; 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 u14-20020a170902e80e00b0016d5cfc6fd8si6915016plg.32.2022.09.22.07.01.11; Thu, 22 Sep 2022 07:01:28 -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=CkbkPm9s; 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 S230289AbiIVNNM (ORCPT + 99 others); Thu, 22 Sep 2022 09:13:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229901AbiIVNNL (ORCPT ); Thu, 22 Sep 2022 09:13:11 -0400 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0AA94EC573; Thu, 22 Sep 2022 06:13:09 -0700 (PDT) Received: by mail-ed1-x536.google.com with SMTP id e18so13565148edj.3; Thu, 22 Sep 2022 06:13:08 -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=oWTAgtwEdQZEhs85baSFdY/uLUUmuKOodCcZZkRj3f4=; b=CkbkPm9sZT92CUg2pUAWxm7FSkCIy5KuWvdm6xqGMaMSMKGjz6IUUrrt9tBEWgZEX0 ZntdiCzhVU095A0tvYU7ASniXrU9jBgW50/EVo97KePz9AqRdDvN9V0X61qIno3RvSWD zIaVhqb9qo9GETB3JMFQkrD9jyfaJLeq0aFcrVSOonbUdDQk2Zoe2kaby5UkRX92IIEe KNRaDkOiIcqJZSowIJBnEGKEk5ysYXex8c90iWHcTadStGoLrNiHN6nCDk4yREsC2xGZ CMH/IYoyYxKQlwN2wEdKBIGYUFKwM/gbNjGx3YOqWbUur3OVScbTchQX3c/T1vR7+e7o CQQA== 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=oWTAgtwEdQZEhs85baSFdY/uLUUmuKOodCcZZkRj3f4=; b=iuy8h2E9C1DczGKNodg00NH8kbF9elYIRHMlxp8fvQwhMN9aZtqz5Kya1ywVaKXaia +70BSpk22jiyHbae7z4doSoipPIcSCUeMLc8/A95nHCVPQYlWMbIxEFRGHDhFhaBHssn fhwgjzHtDuEhSHAHG4HnmFmFP+5+Za4Pi6ZwQE0NjXhjduwrYAXtXWeICEO7HX17S3qn gWgUHqv8NMwp0xuftpzheoNfYeOpGcKkH8C/UdSoxC3uTiFVCj8fabymC7KNUYNDmdSu n9NZOhdUG+66HaBe6yoHrgPX2vC3oSvYncZKLu1Xlz0bWmfxXOJeBlErcJSLr9j/EMnH +J6g== X-Gm-Message-State: ACrzQf3hthvbizi+tV2mximcLohjLbPZBc6AFYTGSJHEoVWv5Qh6Lovs TxUhC7sBpp1dK7VyZwTaSGDvqpjCPKEZf7TnJ7M= X-Received: by 2002:a05:6402:50d1:b0:452:899e:77c with SMTP id h17-20020a05640250d100b00452899e077cmr3315015edb.0.1663852387440; Thu, 22 Sep 2022 06:13:07 -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:12:40 +0100 Message-ID: Subject: Re: [PATCH v2 3/4] media: platform: Add Renesas RZ/G2L MIPI CSI-2 receiver driver To: Sakari Ailus Cc: Laurent Pinchart , Lad Prabhakar , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Philipp Zabel , Jacopo Mondi , =?UTF-8?Q?Niklas_S=C3=B6derlund?= , Hans Verkuil , Geert Uytterhoeven , 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 Sakari, On Thu, Sep 22, 2022 at 1:34 PM Sakari Ailus wrote: > > Hi Prabhakar, > > 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. > OK, I'll move the control outside runtime PM. > Runtime PM may be needed e.g. for resuming a parent device. > Agreed. Cheers, Prabhakar