From patchwork Thu Feb 4 19:28:52 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 77179 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o14JSg9e030525 for ; Thu, 4 Feb 2010 19:28:42 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756029Ab0BDT2l (ORCPT ); Thu, 4 Feb 2010 14:28:41 -0500 Received: from mail.gmx.net ([213.165.64.20]:53091 "HELO mail.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1754532Ab0BDT2k (ORCPT ); Thu, 4 Feb 2010 14:28:40 -0500 Received: (qmail invoked by alias); 04 Feb 2010 19:28:36 -0000 Received: from p57BD19DD.dip0.t-ipconnect.de (EHLO axis700.grange) [87.189.25.221] by mail.gmx.net (mp026) with SMTP; 04 Feb 2010 20:28:36 +0100 X-Authenticated: #20450766 X-Provags-ID: V01U2FsdGVkX1+BD8lqEySBNylKXaQYm4Pr+lctO5wKAQ8r68OS1I xfccP1lzFzYtRn Received: from lyakh (helo=localhost) by axis700.grange with local-esmtp (Exim 4.63) (envelope-from ) id 1Nd7Nk-0007RN-Td; Thu, 04 Feb 2010 20:28:52 +0100 Date: Thu, 4 Feb 2010 20:28:52 +0100 (CET) From: Guennadi Liakhovetski To: Valentin Longchamp cc: Linux Media Mailing List , Hans Verkuil , Laurent Pinchart , Mauro Carvalho Chehab Subject: Re: [PATCH] MT9T031: write xskip and yskip at each set_params call In-Reply-To: <4B580FE8.8080203@epfl.ch> Message-ID: References: <1264013696-11315-1-git-send-email-valentin.longchamp@epfl.ch> <4B580FE8.8080203@epfl.ch> MIME-Version: 1.0 X-Y-GMX-Trusted: 0 X-FuHaFi: 0.46000000000000002 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 04 Feb 2010 19:28:43 +0000 (UTC) diff --git a/drivers/media/video/mt9v022.c b/drivers/media/video/mt9v022.c index 1a34d29..08a3478 100644 --- a/drivers/media/video/mt9v022.c +++ b/drivers/media/video/mt9v022.c @@ -8,15 +8,17 @@ * published by the Free Software Foundation. */ -#include -#include -#include #include +#include +#include #include +#include +#include +#include -#include -#include #include +#include +#include /* * mt9v022 i2c address 0x48, 0x4c, 0x58, 0x5c @@ -718,6 +720,28 @@ static int mt9v022_s_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl) return 0; } +static int mt9v022_runtime_suspend(struct device *dev) +{ + dev_info(dev, "%s\n", __func__); + return 0; +} + +static int mt9v022_runtime_resume(struct device *dev) +{ + dev_info(dev, "%s\n", __func__); + return 0; +} + +static struct dev_pm_ops mt9v022_dev_pm_ops = { + .runtime_suspend = mt9v022_runtime_suspend, + .runtime_resume = mt9v022_runtime_resume, +}; + +static struct device_type mt9v022_dev_type = { + .name = "MT9V022", + .pm = &mt9v022_dev_pm_ops, +}; + /* * Interface active, can use i2c. If it fails, it can indeed mean, that * this wasn't our capture interface, so, we wait for the right one @@ -727,6 +751,7 @@ static int mt9v022_video_probe(struct soc_camera_device *icd, { struct mt9v022 *mt9v022 = to_mt9v022(client); struct soc_camera_link *icl = to_soc_camera_link(icd); + struct video_device *vdev = soc_camera_i2c_to_vdev(client); s32 data; int ret; unsigned long flags; @@ -803,6 +828,8 @@ static int mt9v022_video_probe(struct soc_camera_device *icd, ret = mt9v022_init(client); if (ret < 0) dev_err(&client->dev, "Failed to initialise the camera\n"); + else + vdev->dev.type = &mt9v022_dev_type; ei2c: return ret;