From patchwork Mon Nov 12 16:00:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akinobu Mita X-Patchwork-Id: 10678911 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 53EFC139B for ; Mon, 12 Nov 2018 16:01:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 43C902A1F0 for ; Mon, 12 Nov 2018 16:01:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 386E42A1F8; Mon, 12 Nov 2018 16:01:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DA2562A1F7 for ; Mon, 12 Nov 2018 16:01:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729616AbeKMBzS (ORCPT ); Mon, 12 Nov 2018 20:55:18 -0500 Received: from mail-pg1-f196.google.com ([209.85.215.196]:45448 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726221AbeKMBzS (ORCPT ); Mon, 12 Nov 2018 20:55:18 -0500 Received: by mail-pg1-f196.google.com with SMTP id y4so4244000pgc.12 for ; Mon, 12 Nov 2018 08:01:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=d+rEwTb/rEJN769GdNj0Ksmvy8IimyExDfy5XDhxFV0=; b=SktTakR/M+vDEjK/QHEcmhnABiUKcHxBf/C8AeiKGx5GQkZOSQJyKxni7GCpOCtHJV EOuwI/aau1yMrSjyZQM1eB4n7/jejD6W4posj5FmxlbfdWaJzyXDzT5BAQqN+bqnkXte U1WNjBD7NVspcFAzCtkpBGDn+uyx5Pi5ciBxWU2GRcTDUx0Zg1mAM1k89fmObevzYjwb Xb2O091UojIOcqOGUqGtPqjtu4t8mBVxoGwBo5WYjfJjfUph0Pvvh7EMto7EB8nXDp/R W6DN4/odLoMGVZpYOyGI0T2EhaPJ+hAa4pHF5VRfzMsW8lT6EeTe9/ZeatL20m9KJYBj OIYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=d+rEwTb/rEJN769GdNj0Ksmvy8IimyExDfy5XDhxFV0=; b=mZAUFbSONeMrxmD0r8/F0CEVoyhNIAme9gxDLMM7+bIHw0/wouu/SddsPPy4elnUlT cdrqK7gYkEhxyrBGvDA3KC/2y4svmbSvIqLBb6ALCwfx/MA2XjkqhS8/uLVl1M0w4hFu yUloMxOP2VdI3XrKJm4m2YwYPQYtvFzsKSUDpK7TkmKXhfFppvftLRSxK1iz2MO0ZyOO e3EJ6RU4JN5s22DE3qm34zjiev4nfCmkorHMxpe6DR7iQPL+bu0djPwOT+QdFZRiXUpX C5C8V/FR62qx3ueQzG/CbKmtTH+kbQ8JYapc91Hk2yC4UkR9EvpU1MqKEq2yVyAW4JkL TO2g== X-Gm-Message-State: AGRZ1gIlEvEFoNaW5+jSOuKZh+iRUh2i8anVtA8xTSnU7CFEZQ5sp/a1 Ub7AEd9t+H7PWvyUElaKEp5ljkbm X-Google-Smtp-Source: AJdET5fY54rI3DEUCKnJURh/a3Bj93Xx832dvPA/JYdt2gP36A8qkRHTmfsc0jH0YI4jRTzB7hCG4Q== X-Received: by 2002:aa7:87d0:: with SMTP id i16-v6mr1444582pfo.20.1542038487353; Mon, 12 Nov 2018 08:01:27 -0800 (PST) Received: from mita-MS-7A45.lan ([240f:34:212d:1:4c9:76a6:795e:e9ef]) by smtp.gmail.com with ESMTPSA id v74-v6sm26777610pfk.12.2018.11.12.08.01.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 12 Nov 2018 08:01:26 -0800 (PST) From: Akinobu Mita To: linux-media@vger.kernel.org Cc: Akinobu Mita , Jonathan Corbet , Sakari Ailus , Mauro Carvalho Chehab Subject: [PATCH 6/7] media: ov7670: support log_status ioctl and event interface Date: Tue, 13 Nov 2018 01:00:53 +0900 Message-Id: <1542038454-20066-7-git-send-email-akinobu.mita@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1542038454-20066-1-git-send-email-akinobu.mita@gmail.com> References: <1542038454-20066-1-git-send-email-akinobu.mita@gmail.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This adds log_status ioctl and event interface for ov7670's v4l2 controls. Cc: Jonathan Corbet Cc: Sakari Ailus Cc: Mauro Carvalho Chehab Signed-off-by: Akinobu Mita --- drivers/media/i2c/ov7670.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/media/i2c/ov7670.c b/drivers/media/i2c/ov7670.c index bc68a3a..a70a6ff 100644 --- a/drivers/media/i2c/ov7670.c +++ b/drivers/media/i2c/ov7670.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -1651,6 +1652,9 @@ static int ov7670_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh) static const struct v4l2_subdev_core_ops ov7670_core_ops = { .reset = ov7670_reset, .init = ov7670_init, + .log_status = v4l2_ctrl_subdev_log_status, + .subscribe_event = v4l2_ctrl_subdev_subscribe_event, + .unsubscribe_event = v4l2_event_subdev_unsubscribe, #ifdef CONFIG_VIDEO_ADV_DEBUG .g_register = ov7670_g_register, .s_register = ov7670_s_register, @@ -1773,7 +1777,7 @@ static int ov7670_probe(struct i2c_client *client, #ifdef CONFIG_VIDEO_V4L2_SUBDEV_API sd->internal_ops = &ov7670_subdev_internal_ops; - sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; + sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS; #endif info->clock_speed = 30; /* default: a guess */