From patchwork Mon Nov 12 16:00:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akinobu Mita X-Patchwork-Id: 10678901 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 A04BE13BF for ; Mon, 12 Nov 2018 16:01:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 905D42A137 for ; Mon, 12 Nov 2018 16:01:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 84FCF2A1D3; Mon, 12 Nov 2018 16:01:15 +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 23CD02A137 for ; Mon, 12 Nov 2018 16:01:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729499AbeKMBzE (ORCPT ); Mon, 12 Nov 2018 20:55:04 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:40681 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726221AbeKMBzE (ORCPT ); Mon, 12 Nov 2018 20:55:04 -0500 Received: by mail-pl1-f196.google.com with SMTP id q19-v6so4544508pll.7 for ; Mon, 12 Nov 2018 08:01:14 -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=GWZBJTZaoA3d82xYlqSK4Qp3HIaDK1rzG0Mx8GIyqA0=; b=e4sD7yYJl1+h4a/VYQQson1Kf/OK05v8b7VeFvu2Hn6ok94hz+JBrx68qDbiI4bmE5 2AQjjJ+3IZCj5uE65sg6AKX1WQUwEGHh9UqefNVJjFlOnBo97gCI7WPuhCAkKqm1XX2R 4tiEApR2Aro1DCSqlG19byTiRsZlZinueRpFuDbNLye+K/lL5TFnQvj/+tvSBYjOYSgF aG1Oz6BnpSkahoZhyXTfxYsYRMlPYk5qo4MMhnzbMUF1D5AujYKoOfyNYsMbqeqiD6dn zWwvFbvhzAy7aGgtc+wKstlZj0Ssu0FlduZM1M7KddrwvYuD+tFs4QSi1D4Vac4RZ5Y5 pFPA== 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=GWZBJTZaoA3d82xYlqSK4Qp3HIaDK1rzG0Mx8GIyqA0=; b=NP96REHrbEU8eh/M/QAQRYb52vL9tFr7REN/5vHiI5Uysv33LavqfGOj9szz48RWX0 dt/zdOPxFpn/0+UvaOyxqUBvPPVioIJybbyIZ4beCk3ts+qI6/dxkIjy/g81ysXi5PMF 31JObcplCEpBj9NtR56pFKSYHhqA9MjZ0llYxsfn/fQgLGMDvR0Az+4rg2glhLJ1Nen3 xTurSN5A8k8kBWB4jype8SnZeX/yHptN4+uvw0yR8u8+M/xfuUDA/G5zKku4GqXQF1rv TMu/Ng+yeAWMLaTNVwxIOm2lslVsmjuc2Z/HiLHynNyW11IQp5LvRMFmyI/8Y0bqCruf CMgw== X-Gm-Message-State: AGRZ1gIOGwu7u9878+7J+GQTnnZup/g5cBAVjP15kDHUBsVFHPbmspHA 58UK0x7ex9gF0vMp1zVWluMb6XMb X-Google-Smtp-Source: AJdET5c3qQrA+N7s+CacLOYMzByPdDER5VfPza2ltZOANw6r1VblOj9MMjYSqrkrL8SQQHa7X1gaZw== X-Received: by 2002:a17:902:7042:: with SMTP id h2mr1461363plt.341.1542038473484; Mon, 12 Nov 2018 08:01:13 -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.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 12 Nov 2018 08:01:13 -0800 (PST) From: Akinobu Mita To: linux-media@vger.kernel.org Cc: Akinobu Mita , Sakari Ailus , Mauro Carvalho Chehab Subject: [PATCH 1/7] media: mt9m111: support log_status ioctl and event interface Date: Tue, 13 Nov 2018 01:00:48 +0900 Message-Id: <1542038454-20066-2-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 mt9m111's v4l2 controls. Cc: Sakari Ailus Cc: Mauro Carvalho Chehab Signed-off-by: Akinobu Mita --- drivers/media/i2c/mt9m111.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/media/i2c/mt9m111.c b/drivers/media/i2c/mt9m111.c index 1395986..f4fc459 100644 --- a/drivers/media/i2c/mt9m111.c +++ b/drivers/media/i2c/mt9m111.c @@ -21,6 +21,7 @@ #include #include #include +#include /* * MT9M111, MT9M112 and MT9M131: @@ -862,6 +863,9 @@ static const struct v4l2_ctrl_ops mt9m111_ctrl_ops = { static const struct v4l2_subdev_core_ops mt9m111_subdev_core_ops = { .s_power = mt9m111_s_power, + .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 = mt9m111_g_register, .s_register = mt9m111_s_register, @@ -976,7 +980,8 @@ static int mt9m111_probe(struct i2c_client *client, mt9m111->ctx = &context_b; v4l2_i2c_subdev_init(&mt9m111->subdev, client, &mt9m111_subdev_ops); - mt9m111->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; + mt9m111->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | + V4L2_SUBDEV_FL_HAS_EVENTS; v4l2_ctrl_handler_init(&mt9m111->hdl, 5); v4l2_ctrl_new_std(&mt9m111->hdl, &mt9m111_ctrl_ops,