Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp388167rwi; Thu, 27 Oct 2022 02:39:52 -0700 (PDT) X-Google-Smtp-Source: AMsMyM70Wn4Pyqm82jgE5iucc1sUwLDaewsQ1rWhnVc9UxArKjr0rZ2NdhpECh2CvDLTsMQaPjHA X-Received: by 2002:a63:2bd4:0:b0:451:5df1:4b15 with SMTP id r203-20020a632bd4000000b004515df14b15mr42165706pgr.518.1666863591847; Thu, 27 Oct 2022 02:39:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666863591; cv=none; d=google.com; s=arc-20160816; b=B+BCopn8N3kZJNBjsPmHtmwp2WPh9V2QuDHnJ6PFfwW2S0oh8YRNq6ulzZdbN5h1tD njH7MYiHnYJBKdto4CHMj1HfYwWnhc9ns7csNgKJ89BIvYo4ymAumJsa8yBWCLoEWoDJ KLr3DOzQrqukCFXx9F/fX+TsQdEzLMuk89Rf+ZBM0h0ipxGgxrh5BJAhj44DpbbMCGOh 3bVffuePYj39Zh/eqdt7fGGYs6Lw5T2jH1ITnhTeD5HLPCU4MUW0IoMm9dYfi9+Y+Jv8 ED5kSgq8eEcfUaf3FTSwo9te3uoqHNCFlYFRv0q/9wzFDc41A1hcGYZhg7HaYFxT1UbG IKew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=agSAcZe+16iiHwFsj3B8uVtScAZPbNCiatZ0OhFMf9Q=; b=yKt6Oz0DL66B0oA9g1AlrcFuPKpjgdr2vEV5DihyWShtxzJ/DY7YQ/DGRESPOKU0M9 9kA3FxzqTuwQ0gJgXtKijZ78qZtdmJq/SzxO4BABDzjNuTUEbYdn1RqCRRfGD9gQFiix Tiveln+9QQ8l9xt5MRR9+MG77EQweeJJcYrvlXjx29beZSy/I6AB1BLtyExMzsmvCo7H cARP01g+AYvtsz9R7cVJSkGs57DzlLnMPYsDpBr5gxojsTDthg3iDUa8f2MXbixpF7T8 m/BN98aqgd7yUixMHezecBOD7iqlLngVolvn7QZnWTnAsVb+Usu+IWSCYOgcA/YGTBkQ wBSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=DFk7hH2v; 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=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kb14-20020a17090ae7ce00b00205d0348e7fsi1358230pjb.93.2022.10.27.02.39.39; Thu, 27 Oct 2022 02:39:51 -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=@intel.com header.s=Intel header.b=DFk7hH2v; 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=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233974AbiJ0JWg (ORCPT + 99 others); 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> X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_NONE 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 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