From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9FAEBC38A2D for ; Thu, 27 Oct 2022 09:49:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233968AbiJ0JtX (ORCPT ); Thu, 27 Oct 2022 05:49:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234810AbiJ0JtU (ORCPT ); Thu, 27 Oct 2022 05:49:20 -0400 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A65A96396; Thu, 27 Oct 2022 02:49:19 -0700 (PDT) Received: by mail-ed1-x52d.google.com with SMTP id a67so1706336edf.12; Thu, 27 Oct 2022 02:49:19 -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:message-id:reply-to; bh=IWPyJZW5AVoC+nrDVVz16Q/2YNSTwOB7weYuST5UkDM=; b=jDWhFlSODS1EWcJZZeGu65cVUR9mHawB/5m7LVZcG1/shMrHhfwkLWzJ9qiJlehoR/ WoD2GU6tA1YkVAB5uX6meQVb2pkppteLdaU+N4F/LHK2ujAUkKLHtgNpqewbR8HdfeOR NPDqf6vccVGlvfM77hnmobflfGQ1TFycN1HdfyWbBTczYXJ29RLojyk9JmfqSFUGaeay KmzBRb1KzC2YS7pYl+JQRBwOKBqC3IteefHZy8KY0LdBh4E9cuBuUfIFikzbB/GqN1RZ B3IE2uVwYM4EhHKDqUtHio8mqPTlc34G0or/HSsw2FHYSBrazekliDIwZk/AXpMgUWrc ukZA== 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:message-id :reply-to; bh=IWPyJZW5AVoC+nrDVVz16Q/2YNSTwOB7weYuST5UkDM=; b=CorCta9FF3TdyiAzUIIEkg4G7RGqxTnImPRWaI89C1Zd0D824zfB/MD/mpb6edGMM0 hc8BIuAXmCv19Al9KiCwIWR27JMNKkkdHWCXdy6fmrBueWVa9Va8tq3weW25/rJVx9DF 24ZqyOaitmiOHGUIR55elXLgzTaqpFUwzx06t5VSNkejejzbQrzKmUXhjEO4X/u6zEo+ +3sfRNGpVArR9rff3exj4gJbwATkvffd6ZlJZafuvzIMUGhkJf58pQd9H2KwO9d708te pGnfcMebx6wGyL0TIYy0oyAQmH5I9IhQO4pGssrZTA99i5Gyz6+AuOKk+iYsCeexE9TE 9L+Q== X-Gm-Message-State: ACrzQf3IZC4oe+QT/1n25m5qLh3S0oljWCQlNmQZRm9b6f5pMcqz/eoJ w0N+JAofIF5mON3V3JODsmakE9EqtcxWC3HqCZY= X-Google-Smtp-Source: AMsMyM50d4ocHboYT2FXOEMzrCVMW05GrxeaNf3kP4FkUT2jOdfQ2qVD18OBeNLY7N3Ce30ysegqhAHqb2ijaiwzG3w= X-Received: by 2002:a05:6402:26cf:b0:45d:48d7:928e with SMTP id x15-20020a05640226cf00b0045d48d7928emr43252923edd.275.1666864158072; Thu, 27 Oct 2022 02:49:18 -0700 (PDT) MIME-Version: 1.0 References: <20221026130658.45601-1-prabhakar.mahadev-lad.rj@bp.renesas.com> <20221026130658.45601-7-prabhakar.mahadev-lad.rj@bp.renesas.com> In-Reply-To: From: "Lad, Prabhakar" Date: Thu, 27 Oct 2022 10:48:51 +0100 Message-ID: Subject: Re: [PATCH v3 6/9] media: i2c: ov5645: Use runtime PM To: Sakari Ailus Cc: Laurent Pinchart , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Geert Uytterhoeven , Magnus Damm , Hans Verkuil , Shawn Tu , Jacopo Mondi , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-renesas-soc@vger.kernel.org, Biju Das , Lad Prabhakar Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sakari, On Thu, Oct 27, 2022 at 10:22 AM Sakari Ailus wrote: > > Hi Prabhakar, > > Thanks for the update. > > On Wed, Oct 26, 2022 at 02:06:55PM +0100, Prabhakar wrote: > > From: Lad Prabhakar > > > > Switch to using runtime PM for power management. > > > > Signed-off-by: Lad Prabhakar > > Reviewed-by: Laurent Pinchart > > --- > > v2->v3 > > * Jumped to err_pm_runtime label in case of sd register failure > > * Now calling pm_runtime_mark_last_busy() before pm_runtime_put_autosuspend() > > call > > * Now calling pm_runtime_put_sync() in case s_stream(1) fails > > * In s_stream(0) no calling pm_runtime_mark_last_busy() and > > pm_runtime_put_autosuspend() > > * Included RB tag from Laurent. > > > > v1->v2 > > * Moved pm_runtime_*_autosuspend() calls after registering the subdev. > > --- > > drivers/media/i2c/Kconfig | 2 +- > > drivers/media/i2c/ov5645.c | 141 +++++++++++++++++++------------------ > > 2 files changed, 73 insertions(+), 70 deletions(-) > > > > diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig > > index 7806d4b81716..c0edd1017fe8 100644 > > --- a/drivers/media/i2c/Kconfig > > +++ b/drivers/media/i2c/Kconfig > > @@ -459,7 +459,7 @@ config VIDEO_OV5640 > > config VIDEO_OV5645 > > tristate "OmniVision OV5645 sensor support" > > depends on OF > > - depends on I2C && VIDEO_DEV > > + depends on I2C && PM && VIDEO_DEV > > I think you can drop the PM dependency --- the driver will work fine > without CONFIG_PM. > Agreed, I'll send a new version dropping this and fixing the comments on patch #5 and patch #8. > Although one could question why do we have CONFIG_PM. Some systems won't > boot without it and who would want to consume more power than necessary? > > Could this be removed altogether? Or perhaps we could add CONFIG_PM > dependency to V4L2 and DVB? :-) > Or rather this option should be selected by the platform itself rather than subsystem? Cheers, Prabhakar From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3E5C7C67871 for ; Thu, 27 Oct 2022 09:50:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=X6qi/oXxq/egKJNAt5E2HPToBurPR3P9VVBEb4FqECA=; b=PxHEUggPuCzDL7 AKi1GlRPdp9PRB2pQZOwfJAfEmkgekxl9nAfksSpGosi6yqktS3DYHkvJqHLLmCECGFYqO6hCEGCR LLqrRzGkVbmUzUVh43clXC8tRVvI+oxzxLo8VK44iMzKoRJfFS/jXE49ZIzFyU/ddc2WA28q6JcCq y3FI8t1A9tRXqIzBZh2Kd2HDEDsJS+yJA5Qb8wSZYO/wIjw9qxm8soMJrfrl7Iz3o/MZpal6v7hc4 txWssJtw0DOFUdW5byjbZ8ptfDKkF0BDedaa5ssoMIA3xTPJrcMtcaE+jjM4l4PGEGzwLhA2pJu3y rZVyIm51RtS86t3aqlUA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1onzVs-00Cf6R-9H; Thu, 27 Oct 2022 09:49:24 +0000 Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1onzVp-00Cf4n-Mv for linux-arm-kernel@lists.infradead.org; Thu, 27 Oct 2022 09:49:23 +0000 Received: by mail-ed1-x532.google.com with SMTP id l11so559058edb.4 for ; Thu, 27 Oct 2022 02:49:19 -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:message-id:reply-to; bh=IWPyJZW5AVoC+nrDVVz16Q/2YNSTwOB7weYuST5UkDM=; b=jDWhFlSODS1EWcJZZeGu65cVUR9mHawB/5m7LVZcG1/shMrHhfwkLWzJ9qiJlehoR/ WoD2GU6tA1YkVAB5uX6meQVb2pkppteLdaU+N4F/LHK2ujAUkKLHtgNpqewbR8HdfeOR NPDqf6vccVGlvfM77hnmobflfGQ1TFycN1HdfyWbBTczYXJ29RLojyk9JmfqSFUGaeay KmzBRb1KzC2YS7pYl+JQRBwOKBqC3IteefHZy8KY0LdBh4E9cuBuUfIFikzbB/GqN1RZ B3IE2uVwYM4EhHKDqUtHio8mqPTlc34G0or/HSsw2FHYSBrazekliDIwZk/AXpMgUWrc ukZA== 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:message-id :reply-to; bh=IWPyJZW5AVoC+nrDVVz16Q/2YNSTwOB7weYuST5UkDM=; b=kRFTI5CrvMqrStSbyprvki4aj0q89id9gHHUVjV0R1I+QMGjARuVo+36yxmuRiMknY JrCIWMu8BwhnPrpM/Z/Zp+ouWSr0SO0/hZj5jEuHnlkqj/Vmu3/gMTA8J0H869k+d2fq AxF2RlBgWbmMc4AB5CNTNMQxze+/Gi/cLAw+0m2WVR12tRUP+dSr9L+VF/V/SDcO2mZW UJNYabr2S+wknuJQLzzbG2Ml3s6AFApPX293RAI9KYdj+5VwNk5kWDJZI37tKQuMsIgu +vjO8UChtK+tifsiUKu0U33UdOC1Q8fnGHQWHPAVqwmDzRTT8jm8rXSCz48F0/CjF/eF 7INQ== X-Gm-Message-State: ACrzQf1V+rIctKo+ZwiFr0oWDqM1Rf4kJUvCeXUYnVVF1nEdp70PGCrk V3+0PFrdCjqqujiZjQHCS20bDzCMCAnEdGj2DYICj3QK4Nh1Vg== X-Google-Smtp-Source: AMsMyM50d4ocHboYT2FXOEMzrCVMW05GrxeaNf3kP4FkUT2jOdfQ2qVD18OBeNLY7N3Ce30ysegqhAHqb2ijaiwzG3w= X-Received: by 2002:a05:6402:26cf:b0:45d:48d7:928e with SMTP id x15-20020a05640226cf00b0045d48d7928emr43252923edd.275.1666864158072; Thu, 27 Oct 2022 02:49:18 -0700 (PDT) MIME-Version: 1.0 References: <20221026130658.45601-1-prabhakar.mahadev-lad.rj@bp.renesas.com> <20221026130658.45601-7-prabhakar.mahadev-lad.rj@bp.renesas.com> In-Reply-To: From: "Lad, Prabhakar" Date: Thu, 27 Oct 2022 10:48:51 +0100 Message-ID: Subject: Re: [PATCH v3 6/9] media: i2c: ov5645: Use runtime PM To: Sakari Ailus Cc: Laurent Pinchart , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Geert Uytterhoeven , Magnus Damm , Hans Verkuil , Shawn Tu , Jacopo Mondi , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-renesas-soc@vger.kernel.org, Biju Das , Lad Prabhakar X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221027_024921_766437_0A171BD5 X-CRM114-Status: GOOD ( 25.37 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Sakari, On Thu, Oct 27, 2022 at 10:22 AM Sakari Ailus wrote: > > Hi Prabhakar, > > Thanks for the update. > > On Wed, Oct 26, 2022 at 02:06:55PM +0100, Prabhakar wrote: > > From: Lad Prabhakar > > > > Switch to using runtime PM for power management. > > > > Signed-off-by: Lad Prabhakar > > Reviewed-by: Laurent Pinchart > > --- > > v2->v3 > > * Jumped to err_pm_runtime label in case of sd register failure > > * Now calling pm_runtime_mark_last_busy() before pm_runtime_put_autosuspend() > > call > > * Now calling pm_runtime_put_sync() in case s_stream(1) fails > > * In s_stream(0) no calling pm_runtime_mark_last_busy() and > > pm_runtime_put_autosuspend() > > * Included RB tag from Laurent. > > > > v1->v2 > > * Moved pm_runtime_*_autosuspend() calls after registering the subdev. > > --- > > drivers/media/i2c/Kconfig | 2 +- > > drivers/media/i2c/ov5645.c | 141 +++++++++++++++++++------------------ > > 2 files changed, 73 insertions(+), 70 deletions(-) > > > > diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig > > index 7806d4b81716..c0edd1017fe8 100644 > > --- a/drivers/media/i2c/Kconfig > > +++ b/drivers/media/i2c/Kconfig > > @@ -459,7 +459,7 @@ config VIDEO_OV5640 > > config VIDEO_OV5645 > > tristate "OmniVision OV5645 sensor support" > > depends on OF > > - depends on I2C && VIDEO_DEV > > + depends on I2C && PM && VIDEO_DEV > > I think you can drop the PM dependency --- the driver will work fine > without CONFIG_PM. > Agreed, I'll send a new version dropping this and fixing the comments on patch #5 and patch #8. > Although one could question why do we have CONFIG_PM. Some systems won't > boot without it and who would want to consume more power than necessary? > > Could this be removed altogether? Or perhaps we could add CONFIG_PM > dependency to V4L2 and DVB? :-) > Or rather this option should be selected by the platform itself rather than subsystem? Cheers, Prabhakar _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel