Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp1427370lqp; Mon, 15 Apr 2024 06:26:56 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXKpTcxVYazHg3JyFQzlbO8tCpvAZeKmiTWNze3wT8GvqAVzrw15AolaK9pwMKjhpaNVjkfR5bhN155TW2L5ugfHf4QOLLqdpiu+vSyLg== X-Google-Smtp-Source: AGHT+IE5HyEnD8T6J6PmMRfNqWB7jYziJM15tFyXizlOsGe65tvznrgb5DU2a/E1j2PwHqPHwJTq X-Received: by 2002:a05:6a20:9752:b0:1a7:1bef:2377 with SMTP id hs18-20020a056a20975200b001a71bef2377mr10410944pzc.38.1713187616467; Mon, 15 Apr 2024 06:26:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713187616; cv=pass; d=google.com; s=arc-20160816; b=HPvdnaKk2u/G7ij8MJFl8k5+1vBbvBM75yFuLxIDSVf6DhKbS/2VdoNaECHP4EHZev LkaBe/jPeM4CiaEBEOFLGn/eHmRTYfFj96cFQ1o7OQ6vf5vU7jGyTKuGFj8fPFNMUDgg LvOsNL3L834kqOsOojp8EZ1uJypRFkzgmg6lj+5qe7teYZRYFk32Kg9OANR2uWw/zeqh Stkh2VgPUq0Z+TWVf4ADTou+PLiuNdnZDyNpV2ynaxWQ5fSRMd58ArDg18LmwrHebxaR AuqLi20tP9XD6+uHlbATJPm/m0m9pgc/Hu7M1mIyLPECBaWHXwdxWNpqfRP4y0Ekplpv lAQg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=4fwRgSggVbLe6+8l2QxlodD8R4Jnj2CNVAHen8a3BPg=; fh=QAlplFJ8X2lEHw5baRPFhFwp5aGCRJlzF7LtbqI2zk0=; b=jNlrmw/lXnY8y0B7N/lvLK1mex+9CpzkGlEFjn1NJ2UuCcbMF1BODE4sJ6MFCKykeC s07uEHfq+YRUDL502cEqJTaGmD7DODLQj3HyLWy6e8MEsoHFXDz+vCs/NtBrPo+sBJBc OMvda50stK/v2Xwb8K2xjn3tXw7Z5LlCFEVEOXr73oqzAVxcpbD6PqmLZ+oViKElsX8D naXIVKQpaAAx5ie6N4oyaG7PXkuPk8NMSdEokfCnJdkA0NvGMWD+pj/52BM550mQBt57 Hxu4bqplOUnQeteqmXvi0vciLx0Oauvu43NkvXLAKWyUE+LHNpdIkaaz2vl6QcLvBsU7 vCcw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=KY5qXEOL; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-144666-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-144666-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id hq9-20020a056a00680900b006ea88c317f0si7890106pfb.53.2024.04.15.06.26.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 06:26:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-144666-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=KY5qXEOL; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-144666-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-144666-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 163E9284E7B for ; Mon, 15 Apr 2024 07:26:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2BDCF2421A; Mon, 15 Apr 2024 07:25:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="KY5qXEOL" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CDD971E504; Mon, 15 Apr 2024 07:25:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.15 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713165953; cv=none; b=Jfk+2FJMhczbgrIh3EWoXrf/AFH5Ppeu00oLCvB10InA9lTF5Vj0vd9XB4sGAW4eMa9QFm4Lc5NhCIPJxIFxBzby93xkaszVHO3Xv95j0xgzLooXL7NlYqvWWNeqpZO/jIRAMDZT5bxidwAjprFEAMSWcqDhKm9EGVdFjAZWgXY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713165953; c=relaxed/simple; bh=OqnLGYrmxL1r//qeEKxNpcsT5ecBncxRH0T2KE36LVA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=YIchOBya7hJyLZKabzRyGjwZ9NbHWJv9AHFa3b9UcXev7Otcu+/rT6T4NfMDwZEwWdgrGlQ5/3MveWwfkACR3KKsJduePIGWNHI1ZxTHS9Em7GNOLaGBpVvFiYbInU9yxFe0OrbOpCIYNe4T4Kp0zfI9re1YOdNkh//XK5PXoF8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=KY5qXEOL; arc=none smtp.client-ip=198.175.65.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1713165952; x=1744701952; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=OqnLGYrmxL1r//qeEKxNpcsT5ecBncxRH0T2KE36LVA=; b=KY5qXEOL+4ifkhpS2rSLmkLJxCqvUAAr3iRaUUM6f9H+zETli7g69HbA Tn+9e7xmegczYNRqMJfH/lmfjMXGHGUVFSXDEm73LF02CAsO+Gkwvcowy vPIQO1Osq/H78r8ph1G7FIyO/ng3Whk3ol1+qzno84j3lQ6N9WX7EeFFq ESNIq2IN48bozMEVVefKhWnm3+MwP3K76W1zeJPnwDH/uCp/Pq5v98+EK OSUzUigxsm/AKMt9p8uzVF7C1KXLKEYzaSwCBw+TWwZJi9YUseKP7LYh6 M6z6mtvdXls8/1zbkXnOIoHOKVZukEjedOqgNgCLi99y/raKzA0WyUd4Z Q==; X-CSE-ConnectionGUID: +0f9SbWITayVNE27OyHvMA== X-CSE-MsgGUID: qZGR78GhRoeFSf1RK4KGGA== X-IronPort-AV: E=McAfee;i="6600,9927,11044"; a="12327836" X-IronPort-AV: E=Sophos;i="6.07,202,1708416000"; d="scan'208";a="12327836" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Apr 2024 00:25:51 -0700 X-CSE-ConnectionGUID: hNZHFNF7Stac7Np65aHCjQ== X-CSE-MsgGUID: GHaQ/P5ASKWRbx+yYAx0zA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,202,1708416000"; d="scan'208";a="26628608" Received: from turnipsi.fi.intel.com (HELO kekkonen.fi.intel.com) ([10.237.72.44]) by orviesa005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Apr 2024 00:25:45 -0700 Received: from kekkonen.localdomain (localhost [127.0.0.1]) by kekkonen.fi.intel.com (Postfix) with ESMTP id 56B1311F8AF; Mon, 15 Apr 2024 10:25:42 +0300 (EEST) Date: Mon, 15 Apr 2024 07:25:42 +0000 From: Sakari Ailus To: Andy Shevchenko Cc: Zhi Mao , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Philipp Zabel , Laurent Pinchart , Heiko Stuebner , Hans Verkuil , Hans de Goede , Tomi Valkeinen , Alain Volmat , Paul Elder , Mehdi Djait , Bingbu Cao , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, shengnan.wang@mediatek.com, yaya.chang@mediatek.com, yunkec@chromium.org, 10572168@qq.com Subject: Re: [PATCH 2/2] media: i2c: Add GT97xx VCM driver Message-ID: References: <20240410104002.1197-1-zhi.mao@mediatek.com> <20240410104002.1197-3-zhi.mao@mediatek.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Hi Andy, On Fri, Apr 12, 2024 at 04:43:43PM +0300, Andy Shevchenko wrote: > On Fri, Apr 12, 2024 at 12:39 PM Sakari Ailus > wrote: > > On Wed, Apr 10, 2024 at 07:00:02PM +0300, Andy Shevchenko wrote: > > > > +static int gt97xx_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh) > > > > +{ > > > > + return pm_runtime_resume_and_get(sd->dev); > > > > +} > > > > + > > > > +static int gt97xx_close(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh) > > > > +{ > > > > + return pm_runtime_put(sd->dev); > > > > +} > > > > > > Hmm... Shouldn't v4l2 take care about these (PM calls)? > > > > Ideally yes. We don't have a good mechanism for this at the moment as the > > lens isn't part of the image pipeline. Non-data links may be used for this > > in the future but that's not implemented yet. > > Aren't you using devlinks? It was designed exactly to make sure that > the PM chain of calls goes in the correct order. Device links are already used by the IPU bridge, but in the other direction: the VCM requires the sensor to be powered up in this case. -- Regards, Sakari Ailus