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 DADF7C67871 for ; Thu, 27 Oct 2022 09:22:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234290AbiJ0JWg (ORCPT ); Thu, 27 Oct 2022 05:22:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50076 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232946AbiJ0JWe (ORCPT ); Thu, 27 Oct 2022 05:22:34 -0400 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF92837428; Thu, 27 Oct 2022 02:22:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666862553; x=1698398553; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=B2DWWDfUsiKyktfanKjjzgcDXjdREy8+Y3UB+FVi+Io=; b=DFk7hH2vmc9bjjhe7MczHF/HO92fFQ3BJ6Kv7Q/aN146MvQpU7aSPziL TRuGEfW4teJ0/VkdFt0kSqv4F3+iu0oP/2b6RbRYTaFJ+OWOZ1rFHUgbh tQeo9lqfPhZtswU1TN27KPDDP4a5Ge7ZluRSqDXKZouS1FHId63mkO4tM rPSiUYihK7G2P3IEYFmxTz95NI1h0yUJ//g5+wPxbFw+9GD14zgQZ3A4j M9yZGk8zCOYX5Zi6wg/VrrXkn2e2HAuG85CdF+TXiDxPZwCAMf1Gx2kH7 l8FbCUgTfOj5RSh6e50dkUgUgVozjemSv0rUsja2PCJfAnpYKF5luDXTA A==; X-IronPort-AV: E=McAfee;i="6500,9779,10512"; a="308168707" X-IronPort-AV: E=Sophos;i="5.95,217,1661842800"; d="scan'208";a="308168707" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Oct 2022 02:22:33 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10512"; a="737607691" X-IronPort-AV: E=Sophos;i="5.95,217,1661842800"; d="scan'208";a="737607691" Received: from punajuuri.fi.intel.com (HELO paasikivi.fi.intel.com) ([10.237.72.43]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Oct 2022 02:22:28 -0700 Received: from paasikivi.fi.intel.com (localhost [127.0.0.1]) by paasikivi.fi.intel.com (Postfix) with SMTP id 5C07D2026C; Thu, 27 Oct 2022 12:22:26 +0300 (EEST) Date: Thu, 27 Oct 2022 09:22:26 +0000 From: Sakari Ailus To: Prabhakar 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 Subject: Re: [PATCH v3 6/9] media: i2c: ov5645: Use runtime PM Message-ID: References: <20221026130658.45601-1-prabhakar.mahadev-lad.rj@bp.renesas.com> <20221026130658.45601-7-prabhakar.mahadev-lad.rj@bp.renesas.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221026130658.45601-7-prabhakar.mahadev-lad.rj@bp.renesas.com> Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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. 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? :-) Certainly out of scope of this set though. -- Kind regards, Sakari Ailus