Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1270993rwb; Thu, 22 Sep 2022 12:31:35 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5bpTrDF4+v9vLwvEMqq+RDc5dps3tmdmnFDtzh5DttCeQV5q5xwwT8VcLv6XNTsITiwj11 X-Received: by 2002:a17:903:186:b0:178:3af4:87b3 with SMTP id z6-20020a170903018600b001783af487b3mr4828904plg.117.1663875095432; Thu, 22 Sep 2022 12:31:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663875095; cv=none; d=google.com; s=arc-20160816; b=aD44uOCedkOWfubqxDAws/tp1NSPbKUiD1wzzrMo/P1muMT2CZbCjfHLO2cTNBIDiD 8iuZZ0KNv1xwbCnqohgMdCEhrtdQ11W7v++1NU46GX5lCtkYJapvYXOWyg4bWca8BOa4 VRtAQybBcUHco4RwzqWaz/A8lA/W5pQrElHwUbnVr9aIkP+lVU9rgO5NfHjMD+WkoanR Oip+E9D1YXt7K4EA3JiD6zyujFYgnDfAeHtqR4cHt4f9uB4yPP4PUm5A7u/n8QpBuEGV /l1xGDjg0+uNouRRN2+knMb5GH28pV/RYgorDeS+ASiFtbNOrnktqi88nNHMt4PoCjbj CiGA== 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=4SC2lpclsApuwnvv9v4FOQnC9TCXLCDA7rskDl0X8oQ=; b=thOV4awmcvVXxATj1MJXebDFepjOgC+yhCWFkTrlzOyP6VXXJkFmwHfsSdom7BEKRg JpQi0SE9x2t/iqZcXeey3ffgop1Eldg62Tg1TdFmY2To0l0HlPVvZo7Lb96TxvMqWVnK wiwgpacXUQcLN+ssBJcSD1EwDsYRHP9FuycsV3yanqjbJHcvkDWvL6vWILyxPNa8cQb2 OBFNN0wZC6R6Tm/yQKCLtXYA2yBr4B2ExSmnFptuGfvW1itqMXh7bF6yUZ2N+B/woM5O emVbWq8LKdPIHub4I7pIWx/p/0Vmk8SkUBeyJrRX2bqkt8jwzNYlaL9Eq7w1EvEswtGj zuJA== 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 c13-20020a170902b68d00b001782ec0988esi549941pls.495.2022.09.22.12.31.23; Thu, 22 Sep 2022 12:31:35 -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 S232540AbiIVTNk (ORCPT + 99 others); Thu, 22 Sep 2022 15:13:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232636AbiIVTNh (ORCPT ); Thu, 22 Sep 2022 15:13:37 -0400 Received: from mail-qv1-f48.google.com (mail-qv1-f48.google.com [209.85.219.48]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3CB44106A1D; Thu, 22 Sep 2022 12:13:36 -0700 (PDT) Received: by mail-qv1-f48.google.com with SMTP id i15so7547060qvp.5; Thu, 22 Sep 2022 12:13:36 -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=4SC2lpclsApuwnvv9v4FOQnC9TCXLCDA7rskDl0X8oQ=; b=4RXJGxrGX5X5Z80FXXfTB9gbmLokUMJvd8alC6/0XfWmICYTcqzEKqUhKDU63HG+uc Xh2SNIkoJDLmcbNgk+4paD5pP5Q16JQXUUBPx6p03cX2lUeF0a3/E1BpDibkazvDP1vT ZnzF/yMnJ85+qSUUzOxu6gaXQgGrNtHTjORwAwsORxSQP1Sjl9IZ2+MIRmZ1YfpeKIkd DRt36MPeav1kDaWMU1Gv5kP/L4gZ6dDc+20UPpv1CPjnrLLAZkUlFTrQunSXT/nLVjFP Cvsyu1mqTMnAOA21hJLTc8TgyIvG5leDjHQbVhEuIGdnLMxPNDxQvc9AbeL9zEAVDS4Y rlLA== X-Gm-Message-State: ACrzQf0d4SNx2D0P7U9URV7OxsIALOqiYcNhvvgO/5/HYQ8C2WAQ1yLO vjrMeM6ySsLllCmKQx4pqN5GdhVVYIEyYg== X-Received: by 2002:a0c:f445:0:b0:4a6:9f4a:9a66 with SMTP id h5-20020a0cf445000000b004a69f4a9a66mr4001052qvm.65.1663874015231; Thu, 22 Sep 2022 12:13:35 -0700 (PDT) Received: from mail-yw1-f172.google.com (mail-yw1-f172.google.com. [209.85.128.172]) by smtp.gmail.com with ESMTPSA id o2-20020ae9f502000000b006b640efe6dasm4041930qkg.132.2022.09.22.12.13.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 22 Sep 2022 12:13:33 -0700 (PDT) Received: by mail-yw1-f172.google.com with SMTP id 00721157ae682-3452214cec6so109751637b3.1; Thu, 22 Sep 2022 12:13:33 -0700 (PDT) X-Received: by 2002:a0d:dd09:0:b0:344:fca5:9b44 with SMTP id g9-20020a0ddd09000000b00344fca59b44mr4793428ywe.358.1663874013318; Thu, 22 Sep 2022 12:13:33 -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 21:13:21 +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: "Lad, Prabhakar" 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=-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 Hi Prabhakar, On Thu, Sep 22, 2022 at 3:27 PM Lad, Prabhakar wrote: > 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. LGTM. Thanks! 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