From patchwork Sat Jun 22 17:44:14 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prabhakar X-Patchwork-Id: 2765961 Return-Path: X-Original-To: patchwork-davinci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 43E349F39E for ; Sat, 22 Jun 2013 17:46:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4650620106 for ; Sat, 22 Jun 2013 17:46:16 +0000 (UTC) Received: from devils.ext.ti.com (devils.ext.ti.com [198.47.26.153]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4D5CA20105 for ; Sat, 22 Jun 2013 17:46:15 +0000 (UTC) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id r5MHisDk014681; Sat, 22 Jun 2013 12:44:54 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id r5MHisQN012952; Sat, 22 Jun 2013 12:44:54 -0500 Received: from dlelxv24.itg.ti.com (172.17.1.199) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.2.342.3; Sat, 22 Jun 2013 12:44:54 -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 r5MHisbQ003766; Sat, 22 Jun 2013 12:44:54 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id F03A980628; Sat, 22 Jun 2013 12:44:53 -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 1591880627 for ; Sat, 22 Jun 2013 12:44:51 -0500 (CDT) Received: from red.ext.ti.com (red.ext.ti.com [192.94.93.37]) by dflp53.itg.ti.com (8.13.8/8.13.8) with ESMTP id r5MHioPR022767 for ; Sat, 22 Jun 2013 12:44:50 -0500 (CDT) Received: from mail6.bemta7.messagelabs.com (mail6.bemta7.messagelabs.com [216.82.255.55]) by red.ext.ti.com (8.13.7/8.13.7) with ESMTP id r5MHioKf028466 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sat, 22 Jun 2013 12:44:50 -0500 Received: from [216.82.253.67:16306] by server-16.bemta-7.messagelabs.com id EA/B1-03224-292E5C15; Sat, 22 Jun 2013 17:44:50 +0000 X-Env-Sender: prabhakar.csengg@gmail.com X-Msg-Ref: server-6.tower-158.messagelabs.com!1371923088!11294155!1 X-Originating-IP: [209.85.220.41] X-SpamReason: No, hits=0.2 required=7.0 tests=ML_RADAR_SPEW_LINKS_14, RCVD_ILLEGAL_IP,spamassassin: X-StarScan-Received: X-StarScan-Version: 6.9.6; banners=-,-,- X-VirusChecked: Checked Received: (qmail 882 invoked from network); 22 Jun 2013 17:44:49 -0000 Received: from mail-pa0-f41.google.com (HELO mail-pa0-f41.google.com) (209.85.220.41) by server-6.tower-158.messagelabs.com with RC4-SHA encrypted SMTP; 22 Jun 2013 17:44:49 -0000 Received: by mail-pa0-f41.google.com with SMTP id bj3so9249705pad.14 for ; Sat, 22 Jun 2013 10:44:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=5ph6hHLlGW4gIQvdi8Q9b6wLVdM8q92axjCi/7iihy0=; b=nlm9DF4A/pqShsnjAG5JoKlw3+uDuePYA7/6v6CuRsmrwGdKgCPbFg9e8OQEVb8v8A l33ndAZgEL30S5RExM65WPgbGgZQpthagt1FMsij0+tDutbBCFG9hLuJJsOMyh58LktJ JWXnn28+xdNreA2OmmsKItjbIjNIr5CzfyzjFTBNkX66urXlDmFfaMbJU7cMU6tuo1Xx fQTRC3tq6BjDpDzNkFAeOnZAgNwq9wlxqPVrA97gx9HuJsgjon7bzaFwttkchFJzX9so 6ve4kAutnfLRAzeJUlR62RFC84MHCSDLmwi7l27ibp7eEZEck0qbv3qv7BqTeqHV/PCY AaZQ== X-Received: by 10.68.75.110 with SMTP id b14mr17402455pbw.89.1371923088681; Sat, 22 Jun 2013 10:44:48 -0700 (PDT) Received: from localhost.localdomain ([1.23.214.121]) by mx.google.com with ESMTPSA id kq2sm11223580pab.19.2013.06.22.10.44.43 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 22 Jun 2013 10:44:47 -0700 (PDT) From: Prabhakar Lad To: Mauro Carvalho Chehab , LMML , Hans Verkuil , Laurent Pinchart Subject: [PATCH v2 1/2] media: i2c: tvp7002: add support for asynchronous probing Date: Sat, 22 Jun 2013 23:14:14 +0530 Message-ID: <1371923055-29623-2-git-send-email-prabhakar.csengg@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1371923055-29623-1-git-send-email-prabhakar.csengg@gmail.com> References: <1371923055-29623-1-git-send-email-prabhakar.csengg@gmail.com> CC: DLOS , LKML , Sakari Ailus , Sylwester Nawrocki , 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 X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/media/i2c/tvp7002.c b/drivers/media/i2c/tvp7002.c index 36ad565..b577548 100644 --- a/drivers/media/i2c/tvp7002.c +++ b/drivers/media/i2c/tvp7002.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -1040,6 +1041,10 @@ static int tvp7002_probe(struct i2c_client *c, const struct i2c_device_id *id) } v4l2_ctrl_handler_setup(&device->hdl); + error = v4l2_async_register_subdev(&device->sd); + if (error) + goto error; + return 0; error: @@ -1064,6 +1069,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