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 94A0CC433F5 for ; Mon, 14 Feb 2022 16:48:40 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=HwIkg6IHOiVsiX3d5PdpOVnysrgW+en9sfYmpeQmRdU=; b=Cjl2renCvNvf3o uWtUOctFOF0VmtkvUmAhyWZMc09t0/U+UGy7jHYEyyM2CfptYKuKsAPg/zFq1x5pbQUecO4DYU8Qc vleurg5S7cuYpxvz/O9VE9hUDg8RxE6+H8/tAR5mMEphpC/R9OR/9JP11vsF3WuFKvU7aAX1XwERB aCXqw5T4PfShhenyZlkpTxP99DOMSOiSAez6IVTzdhrm8Wu9ZCdfxgVA3Yw/w9xsrIUJdn4xMpxka 9hPHFDXCf01q7Usj8p38U3tWz5b7z5sX1Y+3jK3oQlf9/2Mfs0UBjy7FTs/3WIlneQNuiNg2IBDvo osUWESzhvMrW//rvlE1w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJeWl-00G95P-Qz; Mon, 14 Feb 2022 16:48:39 +0000 Received: from mga09.intel.com ([134.134.136.24]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJePS-00G5PC-1e; Mon, 14 Feb 2022 16:41:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644856866; x=1676392866; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=7HBTbIry5i2v3ofkv2rXvDfAR5tIt7kfIF4pEaiDFA4=; b=QgPF+WaeJJbBNe6iRT1tCz1tD4+q15agc/QGYsIOqgVSIDP6kT6vq5Ej 4TGZVe13bI0sHTsWUxqDiBXTzqESgr4/iGkcfRf1WwhxqgcIR90omS5WJ dKSYubroWNL5zrRVWTglDB4Le2S5aTZMws2B+TuaenHn6IFZ/Z2JI4qQ5 3I5rBWfJlf0fIbYVoZw2CnJHyC7eFJ6kuwg9O/R092JGg+5rKXbhanEIz yS/ktcXo73VpE4+73y2wkb6vtgyvCEGYha6yKEnU+67R4LBmNexrAFXtr J1PtKqprcQ6iQFtlxQuJWA5tnhBAB6wAs4ryl0eopnst1pdnGM2tjh1jK w==; X-IronPort-AV: E=McAfee;i="6200,9189,10258"; a="249875010" X-IronPort-AV: E=Sophos;i="5.88,368,1635231600"; d="scan'208";a="249875010" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Feb 2022 08:41:05 -0800 X-IronPort-AV: E=Sophos;i="5.88,368,1635231600"; d="scan'208";a="587266599" Received: from punajuuri.fi.intel.com (HELO paasikivi.fi.intel.com) ([10.237.72.43]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Feb 2022 08:40:58 -0800 Received: from paasikivi.fi.intel.com (localhost [127.0.0.1]) by paasikivi.fi.intel.com (Postfix) with SMTP id 962A1201DB; Mon, 14 Feb 2022 18:40:56 +0200 (EET) Date: Mon, 14 Feb 2022 18:40:56 +0200 From: Sakari Ailus To: Paul Kocialkowski Cc: linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, linux-clk@vger.kernel.org, linux-staging@lists.linux.dev, Yong Deng , Mauro Carvalho Chehab , Rob Herring , Maxime Ripard , Hans Verkuil , Chen-Yu Tsai , Jernej Skrabec , Greg Kroah-Hartman , Helen Koike , Laurent Pinchart , Thomas Petazzoni Subject: Re: [PATCH v2 27/66] media: sun6i-csi: Add media ops with link notify callback Message-ID: References: <20220205185429.2278860-1-paul.kocialkowski@bootlin.com> <20220205185429.2278860-28-paul.kocialkowski@bootlin.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220205185429.2278860-28-paul.kocialkowski@bootlin.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220214_084106_195971_AF47179F X-CRM114-Status: GOOD ( 19.75 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org Hi Paul, Thanks for the update. On Sat, Feb 05, 2022 at 07:53:50PM +0100, Paul Kocialkowski wrote: > In order to keep the power use count fields balanced when link changes > happen between v4l2_pipeline_pm_get/set calls (in open/close), > the link_notify media operation callback needs to be registered. > > Signed-off-by: Paul Kocialkowski > --- > drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c > index 6f04f86504bf..c8fe31cc38b5 100644 > --- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c > +++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c > @@ -23,6 +23,7 @@ > #include > #include > #include > +#include > > #include "sun6i_csi.h" > #include "sun6i_csi_reg.h" > @@ -574,6 +575,12 @@ void sun6i_csi_set_stream(struct sun6i_csi_device *csi_dev, bool enable) > CSI_CAP_CH0_VCAP_ON); > } > > +/* Media */ > + > +static const struct media_device_ops sun6i_csi_media_ops = { > + .link_notify = v4l2_pipeline_link_notify, Do you really need this? Drivers should instead rely on runtime PM nowadays. > +}; > + > /* V4L2 */ > > static int sun6i_csi_link_entity(struct sun6i_csi_device *csi_dev, > @@ -683,6 +690,7 @@ static int sun6i_csi_v4l2_setup(struct sun6i_csi_device *csi_dev) > snprintf(media_dev->bus_info, sizeof(media_dev->bus_info), > "platform:%s", dev_name(dev)); > media_dev->hw_revision = 0; > + media_dev->ops = &sun6i_csi_media_ops; > media_dev->dev = dev; > > media_device_init(media_dev); -- Kind regards, Sakari Ailus -- linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy