From patchwork Tue May 14 10:45:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lad, Prabhakar" X-Patchwork-Id: 2565121 Return-Path: X-Original-To: patchwork-davinci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from bear.ext.ti.com (bear.ext.ti.com [192.94.94.41]) by patchwork2.kernel.org (Postfix) with ESMTP id 6E9EADF24C for ; Tue, 14 May 2013 10:49:15 +0000 (UTC) Received: from dflxv15.itg.ti.com ([128.247.5.124]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id r4EAlBqi000850; Tue, 14 May 2013 05:47:11 -0500 Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id r4EAlB4k008455; Tue, 14 May 2013 05:47:11 -0500 Received: from dlelxv24.itg.ti.com (172.17.1.199) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.2.342.3; Tue, 14 May 2013 05:47:10 -0500 Received: from linux.omap.com (dlelxs01.itg.ti.com [157.170.227.31]) by dlelxv24.itg.ti.com (8.13.8/8.13.8) with ESMTP id r4EAlBwC021126; Tue, 14 May 2013 05:47:11 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id DDB1180630; Tue, 14 May 2013 05:47:10 -0500 (CDT) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp53.itg.ti.com (dflp53.itg.ti.com [128.247.5.6]) by linux.omap.com (Postfix) with ESMTP id 8106080626 for ; Tue, 14 May 2013 05:46:58 -0500 (CDT) Received: from white.ext.ti.com (white.ext.ti.com [192.94.93.38]) by dflp53.itg.ti.com (8.13.8/8.13.8) with ESMTP id r4EAkwr0006097 for ; Tue, 14 May 2013 05:46:58 -0500 (CDT) Received: from mail6.bemta7.messagelabs.com (mail6.bemta7.messagelabs.com [216.82.255.55]) by white.ext.ti.com (8.13.7/8.13.7) with ESMTP id r4EAkvbJ029313 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 14 May 2013 05:46:58 -0500 Received: from [216.82.253.67:3537] by server-12.bemta-7.messagelabs.com id E7/B0-15214-12612915; Tue, 14 May 2013 10:46:57 +0000 X-Env-Sender: prabhakar.csengg@gmail.com X-Msg-Ref: server-5.tower-158.messagelabs.com!1368528416!2788403!1 X-Originating-IP: [209.85.210.45] X-SpamReason: No, hits=0.0 required=7.0 tests=ML_RADAR_SPEW_LINKS_14, spamassassin: X-StarScan-Received: X-StarScan-Version: 6.9.6; banners=-,-,- X-VirusChecked: Checked Received: (qmail 25987 invoked from network); 14 May 2013 10:46:57 -0000 Received: from mail-da0-f45.google.com (HELO mail-da0-f45.google.com) (209.85.210.45) by server-5.tower-158.messagelabs.com with RC4-SHA encrypted SMTP; 14 May 2013 10:46:57 -0000 Received: by mail-da0-f45.google.com with SMTP id w3so237800dad.4 for ; Tue, 14 May 2013 03:46:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=3mUIEMTA3xRGxo8CeVE0pvibGbj6oJRIwrF28Om6BTo=; b=Q3i0gnY8kmj22rDT/2kFDvyaUHkb3PmigW+RQKcJgdrKrLD0FI4IeHed1pWLpgV9UW jr0nmDWHaY3cqfY40Mr/1A2phv55Y6RTMX0Jeaaqo0JJ1b2BoWneTkVQ4EjZFI0l/GJI GSNtTMiaR+Wv5NOt3XO0peSuT5UkupbExgtr9mgTJ2fd8q9VnFhDciXF5bczeOlzwRyJ fgOl7H+W1uvSWWA/mXE1zwDENk3/y+eIWHuao4WtKdSFjMDz0g429KaCbJf/uVE7Hf1/ ZHtc3o05SJ9EzZdjahNsddH6A/h+I6tpl+/vkgHP/+UPNB0nKMxGFyuK0DjukN5jKUsh 1hmg== X-Received: by 10.68.231.65 with SMTP id te1mr33125171pbc.98.1368528416497; Tue, 14 May 2013 03:46:56 -0700 (PDT) Received: from localhost.localdomain ([59.98.240.128]) by mx.google.com with ESMTPSA id nt2sm17784107pbc.17.2013.05.14.03.46.50 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 14 May 2013 03:46:55 -0700 (PDT) From: Lad Prabhakar To: LMML Subject: [PATCH 4/5] media: i2c: tvp7002: add support for asynchronous probing Date: Tue, 14 May 2013 16:15:33 +0530 Message-ID: <1368528334-13595-5-git-send-email-prabhakar.csengg@gmail.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1368528334-13595-1-git-send-email-prabhakar.csengg@gmail.com> References: <1368528334-13595-1-git-send-email-prabhakar.csengg@gmail.com> CC: DLOS , Mauro Carvalho Chehab , LKML , Hans Verkuil , Laurent Pinchart , Sylwester Nawrocki , Sakari Ailus , Guennadi Liakhovetski X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com From: Lad, Prabhakar Both synchronous and asynchronous tvp7002 subdevice probing is supported by this patch. Signed-off-by: Lad, Prabhakar Cc: Hans Verkuil Cc: Laurent Pinchart Cc: Mauro Carvalho Chehab Cc: Guennadi Liakhovetski Cc: Sylwester Nawrocki Cc: Sakari Ailus Cc: linux-kernel@vger.kernel.org Cc: davinci-linux-open-source@linux.davincidsp.com --- drivers/media/i2c/tvp7002.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/drivers/media/i2c/tvp7002.c b/drivers/media/i2c/tvp7002.c index f4114bf..d5113d1 100644 --- a/drivers/media/i2c/tvp7002.c +++ b/drivers/media/i2c/tvp7002.c @@ -31,6 +31,7 @@ #include #include +#include #include #include #include @@ -1073,6 +1074,11 @@ static int tvp7002_probe(struct i2c_client *c, const struct i2c_device_id *id) } v4l2_ctrl_handler_setup(&device->hdl); + device->sd.dev = &c->dev; + error = v4l2_async_register_subdev(&device->sd); + if (error) + goto error; + return 0; error: @@ -1097,6 +1103,7 @@ static int tvp7002_remove(struct i2c_client *c) v4l2_dbg(1, debug, sd, "Removing tvp7002 adapter" "on address 0x%x\n", c->addr); + v4l2_async_unregister_subdev(&device->sd); #if defined(CONFIG_MEDIA_CONTROLLER) media_entity_cleanup(&device->sd.entity); #endif