Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp756457rwb; Thu, 22 Sep 2022 06:09:27 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7gkKE67rZxkh+ABMzQgqMtI4OTdjyPR2bYzCfyqqXx8GthKYLdw+oef8GybDF2xf9oW45I X-Received: by 2002:a17:907:16a5:b0:77c:e0f0:1f25 with SMTP id hc37-20020a17090716a500b0077ce0f01f25mr2638795ejc.217.1663852166966; Thu, 22 Sep 2022 06:09:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663852166; cv=none; d=google.com; s=arc-20160816; b=fOwOKzummiMBdQE1vECMOrTLuOB9IMSA8hrurxqtWozzBFq30of4lWkHHMkxuzTyp6 /YVrm14ztcFHk7vpoG1+4/OjSqt6n2/fYBLau1bmhq50YObSJubD+n4+Z/MD1IRedI4X 0JtiZRuy5Ud6JYUi7VbXRrg4RDWlvaeO951WxUvotR8E2ojRm3Neoz9RAXa45twmf9Tm WAGmIkYpF/Qb9Idp7QaBMjMIAY1OeBn87W9xsXjtodJ4YML4eZbvIoE7hxJ+F/tsXzt/ GogwhWvSJaYihCcmf+nvc2YWx5fDQr59OZ/8EBujgESFbeOWW4Vqpzub0HQkCUyYimW5 BnBw== 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; bh=1IX5rDJUB9B6ypTnX4DvDDFVPLxK4WN5mvStRFZFjD0=; b=kcJBKbucq147oQWl7xP6GoRszDVuvl/Zn7CNsTldya6X/Z4z3cBClaoTKtKwfIWQwT yecl5lULaxgnk3qg/RyV2fZPPQVa5rs0UxaW8p772LH14dOjKdXu/GzwGJ+cL7wdmXe9 CmaIY3ijQDnh2d5yp0BIyoHlowDpe0nMYyYe+E/Ba+CO/98TRGm+Gzya8NeYwfueevVd xGLlcRqrb8NgjwJR8b/yVkYyW74s+a874Yzs3ydjW88ZKSQVUa3S/EXPqZ0qG95bvvL8 bnTnCvyxIo6oSvQZi7cIHJrYed7AqUPxnfvYYr4lSe520a9DKXxgwRdGH1jB+Jgzy0pM mAgg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cs18-20020a170906dc9200b0073866c0672asi5671259ejc.73.2022.09.22.06.09.00; Thu, 22 Sep 2022 06:09: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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229970AbiIVMvo (ORCPT + 99 others); Thu, 22 Sep 2022 08:51:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55772 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229644AbiIVMvl (ORCPT ); Thu, 22 Sep 2022 08:51:41 -0400 Received: from mail-qv1-f45.google.com (mail-qv1-f45.google.com [209.85.219.45]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A1F8E11D5; Thu, 22 Sep 2022 05:51:40 -0700 (PDT) Received: by mail-qv1-f45.google.com with SMTP id c6so6702881qvn.6; Thu, 22 Sep 2022 05:51:40 -0700 (PDT) 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=1IX5rDJUB9B6ypTnX4DvDDFVPLxK4WN5mvStRFZFjD0=; b=xBKfamC7vby92JRWleg62eNt5uMcOo+UXTESUt9WP5nU6IjHc0AKcoC2Y/6udybgV7 CM0SAIRebr2TM/ikU6bjvnDJ4NEmvu48A+IASeIdGs8P+nIGUGBBUG1esXjdFrL4FkEt aRtLzzIedho/SpyzS0waf5a9HR4qpqfbgcde6OGXH/A50yDc39r+vKwbK/gmBZu0Z+aT lA7RQ/oHKSRrUXuLl45DI+saiG3bJ0n1Rsbrbw6bpQm5ubp2AmaZ/F9hJ+LYu4tTORPF yqIWaL3yipgvZvZrQB1OF7JWub+EgIK86guQg0GFdBY5wJRJjq2wzObcWJU5ofuW+kTY uDXA== X-Gm-Message-State: ACrzQf0nexWtbU2snwfCRvKl6uRwpln5AMBSqoc+hYMNrm3kTT914Cg1 y+WSy7uQNQrKWJKMcDFa6jqzQr5CiGqbWw== X-Received: by 2002:a05:6214:27c6:b0:4ac:94f9:c727 with SMTP id ge6-20020a05621427c600b004ac94f9c727mr2246920qvb.51.1663851099473; Thu, 22 Sep 2022 05:51:39 -0700 (PDT) Received: from mail-yw1-f173.google.com (mail-yw1-f173.google.com. [209.85.128.173]) by smtp.gmail.com with ESMTPSA id y17-20020a37f611000000b006b5cc25535fsm3589864qkj.99.2022.09.22.05.51.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 22 Sep 2022 05:51:39 -0700 (PDT) Received: by mail-yw1-f173.google.com with SMTP id 00721157ae682-3452214cec6so97752927b3.1; Thu, 22 Sep 2022 05:51:38 -0700 (PDT) X-Received: by 2002:a0d:de43:0:b0:349:31bd:e8d5 with SMTP id h64-20020a0dde43000000b0034931bde8d5mr2797113ywe.283.1663851098623; Thu, 22 Sep 2022 05:51:38 -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: Geert Uytterhoeven Date: Thu, 22 Sep 2022 14:51:27 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 3/4] media: platform: Add Renesas RZ/G2L MIPI CSI-2 receiver driver To: Sakari Ailus , "Lad, Prabhakar" 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 , 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=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no 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 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. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds