From patchwork Mon Nov 12 16:00:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akinobu Mita X-Patchwork-Id: 10678909 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 877B3139B for ; Mon, 12 Nov 2018 16:01:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 76DD62A19B for ; Mon, 12 Nov 2018 16:01:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6B3D22A1F7; Mon, 12 Nov 2018 16:01:26 +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 1ABC62A1C0 for ; Mon, 12 Nov 2018 16:01:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729582AbeKMBzQ (ORCPT ); Mon, 12 Nov 2018 20:55:16 -0500 Received: from mail-pf1-f194.google.com ([209.85.210.194]:38354 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726221AbeKMBzP (ORCPT ); Mon, 12 Nov 2018 20:55:15 -0500 Received: by mail-pf1-f194.google.com with SMTP id v76-v6so1704349pfa.5 for ; Mon, 12 Nov 2018 08:01:24 -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=5Ydt5QJ8sWh77EvnYvkrFWjLMwTvWl9QkCrhDj25rC8=; b=pYLFJL3+mqn6qr3GYBwmP8Fy/DdYkheJsMM98xsDFwhHteWgIlLZX9+SSN1++l3hJh jqetD88u3NAzJDka+r50KjNp/UYKoCbwXi18j2UpzwrYd4bYgMdmlKTRq8pQO/g4AYkf CaZ+1A0zsheWpYesd9wFgHLDKFzFZnXFJQBE2JZW/zJl7EUu7lIVDN1KirWEfa2AIcRB k+BGyYtOJsrMEzxbSvkL7A/FSUdhkyGx/RE5qPa7dI9zkTG2rMDqB77dzFA3j+s5lkB0 U0omd2AThwA3jGTwhrLjW0rtD+ZaVKTcPuAn7tDRnsPuo/3BZAXgvoWYgHIPBTm3i7kn x5Og== 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=5Ydt5QJ8sWh77EvnYvkrFWjLMwTvWl9QkCrhDj25rC8=; b=dwmrwDQl8j8b9JU13ZH/Geh3SdzHFhzB85i69AhSmAiv47Y/m7O5pGxP/JlRZQ+TTa wldXhx3atww9dtgI6HJnf3o+8ggNcBQ+s3dy8WQ/CrOq7E6hdHwVnK+qMo9rkbriYv8/ NroIIF/w1spCwSJ++V1YbBimiLQwJIhfvXoYDC75ROLqJ6tgI4j1RDCAFKL6OiyO1N5r FnGGmuZBucfIHZrLOkTCDSA9L1qJPaseRqMhLfIPInt24ptn52JjQfzM75rbc8MLRQyJ 1KSQCTvLTF4tMcVz8VjCgIBgkZpjt2oMUxU9AJR9d87t+IS4oE95MgfyaMVIYJOoJD5i xzRA== X-Gm-Message-State: AGRZ1gI9Yn+BHLJgTHkzx5ErbJUWBf+SGYueOgJw5BnfRgP/58Jjjruv btWNr3wHT8bPOBsnCPM6a3p16NGw X-Google-Smtp-Source: AJdET5fJ8QxY4nTNjX1VrDin/4LOV8aY7vkOMw2AZyR3lDFzGHfz3Y35RH9vrP0byz5fp4GiJUY6iw== X-Received: by 2002:a63:4101:: with SMTP id o1mr1255386pga.447.1542038484269; Mon, 12 Nov 2018 08:01:24 -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.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 12 Nov 2018 08:01:23 -0800 (PST) From: Akinobu Mita To: linux-media@vger.kernel.org Cc: Akinobu Mita , Steve Longerbeam , Sakari Ailus , Mauro Carvalho Chehab Subject: [PATCH 5/7] media: ov5640: support log_status ioctl and event interface Date: Tue, 13 Nov 2018 01:00:52 +0900 Message-Id: <1542038454-20066-6-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 ov5640's v4l2 controls. Cc: Steve Longerbeam Cc: Sakari Ailus Cc: Mauro Carvalho Chehab Signed-off-by: Akinobu Mita --- drivers/media/i2c/ov5640.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c index eaefdb5..a91d917 100644 --- a/drivers/media/i2c/ov5640.c +++ b/drivers/media/i2c/ov5640.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include @@ -2641,6 +2642,9 @@ static int ov5640_s_stream(struct v4l2_subdev *sd, int enable) static const struct v4l2_subdev_core_ops ov5640_core_ops = { .s_power = ov5640_s_power, + .log_status = v4l2_ctrl_subdev_log_status, + .subscribe_event = v4l2_ctrl_subdev_subscribe_event, + .unsubscribe_event = v4l2_event_subdev_unsubscribe, }; static const struct v4l2_subdev_video_ops ov5640_video_ops = { @@ -2795,7 +2799,8 @@ static int ov5640_probe(struct i2c_client *client, v4l2_i2c_subdev_init(&sensor->sd, client, &ov5640_subdev_ops); - sensor->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; + sensor->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | + V4L2_SUBDEV_FL_HAS_EVENTS; sensor->pad.flags = MEDIA_PAD_FL_SOURCE; sensor->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR; ret = media_entity_pads_init(&sensor->sd.entity, 1, &sensor->pad);