From patchwork Mon Nov 12 16:00:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akinobu Mita X-Patchwork-Id: 10678907 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 D003713BF for ; Mon, 12 Nov 2018 16:01:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C043C2A161 for ; Mon, 12 Nov 2018 16:01:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B4CF92A1F0; Mon, 12 Nov 2018 16:01:23 +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 5DA812A1E4 for ; Mon, 12 Nov 2018 16:01:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729574AbeKMBzN (ORCPT ); Mon, 12 Nov 2018 20:55:13 -0500 Received: from mail-pf1-f196.google.com ([209.85.210.196]:42221 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726221AbeKMBzN (ORCPT ); Mon, 12 Nov 2018 20:55:13 -0500 Received: by mail-pf1-f196.google.com with SMTP id 64so54666pfr.9 for ; Mon, 12 Nov 2018 08:01:22 -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=sm8Jso/p0wOmQCwPX0We73sgfZFKM26BV10d21ejhcg=; b=qeVqMUCHhF+pk4Z10ZlJr7eJBhm1i//lyGP/sfv8g9oR9FF/wGW3/1uUOgn38pYzEr ftl7TRRXwVHI73g0zcBgaQXBvP3OHqrwoYx7mmY1cznwdafuXoWTn9E/c3qyzXD92vPT H8ppNIh35Ebw7MP1ba1w5/+cv5jlcorPVrkmHmxt76p8hB1G9PcdFOQ5nLIYNehGvEjk E54AlXXdkD42qTno/zPMJj626APGfiBm0me49p/u9ZPW70lOZREeC0jDKYBhfcvFsRw3 CC0PupKtFicZF+Iti/xmXI4nNtBddT5/hLL4GI16lQjhSTNXctycmaSgM49Oa4CHqpKu XwTg== 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=sm8Jso/p0wOmQCwPX0We73sgfZFKM26BV10d21ejhcg=; b=GxWuYoftFUhFDT3/9/v+sI2uznrYynkgZGkvK7y+0Zem+HF37DhT5xKwxf9xb6xkDS NTMHLrLU8FweHDt/9GeD5gMUiE1f7PYcUORfzLjMqmIoPgAcfKK6hoGUBejvWkkU5Qw5 WkQRQqXzjPFO6m6iu5777xfwvGvFc4K4RUMK0UndPxbkozy5zPjzU4bEOdbzfJll0c57 QR9MethF4CwyBeux56n2k3mEw+Mjh/EYnUaiU2UjqSmprv4GvMAFB3IGPOYD7+Qpkymi ZvaDYHtkx2Odjj9BZHGqdJBuCEISDFTmLRH02A0DUYXCDy+o9u9p0m5nALjrC0czlDkg ZDvw== X-Gm-Message-State: AGRZ1gJcGnAPhCffiP66yNIsfqU8YteJjwgfAuQc6PMmuntht0Uhxx6l 54mmA/jywNfVvazpG7kmpTwSlKwP X-Google-Smtp-Source: AJdET5eqwymf+WoffFouC8ZGiGdGo/4Gdfy2EnanQMEy9Lz1Dhp2ZX3P7MwwYZyRw734TV5JiXCJXQ== X-Received: by 2002:a63:bd01:: with SMTP id a1-v6mr1317105pgf.58.1542038481563; Mon, 12 Nov 2018 08:01:21 -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.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 12 Nov 2018 08:01:20 -0800 (PST) From: Akinobu Mita To: linux-media@vger.kernel.org Cc: Akinobu Mita , Sakari Ailus , Mauro Carvalho Chehab Subject: [PATCH 4/7] media: ov2640: support log_status ioctl and event interface Date: Tue, 13 Nov 2018 01:00:51 +0900 Message-Id: <1542038454-20066-5-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 ov2640's v4l2 controls. Cc: Sakari Ailus Cc: Mauro Carvalho Chehab Signed-off-by: Akinobu Mita --- drivers/media/i2c/ov2640.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/media/i2c/ov2640.c b/drivers/media/i2c/ov2640.c index 4992d77..d8e91bc 100644 --- a/drivers/media/i2c/ov2640.c +++ b/drivers/media/i2c/ov2640.c @@ -26,6 +26,7 @@ #include #include +#include #include #include #include @@ -1096,6 +1097,9 @@ static const struct v4l2_ctrl_ops ov2640_ctrl_ops = { }; static const struct v4l2_subdev_core_ops ov2640_subdev_core_ops = { + .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 = ov2640_g_register, .s_register = ov2640_s_register, @@ -1190,7 +1194,8 @@ static int ov2640_probe(struct i2c_client *client, goto err_clk; v4l2_i2c_subdev_init(&priv->subdev, client, &ov2640_subdev_ops); - priv->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; + priv->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | + V4L2_SUBDEV_FL_HAS_EVENTS; mutex_init(&priv->lock); v4l2_ctrl_handler_init(&priv->hdl, 3); priv->hdl.lock = &priv->lock;