From patchwork Tue Jan 8 14:51:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akinobu Mita X-Patchwork-Id: 10752169 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 C51F41399 for ; Tue, 8 Jan 2019 14:52:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B331028D35 for ; Tue, 8 Jan 2019 14:52:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A7DC328D38; Tue, 8 Jan 2019 14:52:43 +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 4511128D35 for ; Tue, 8 Jan 2019 14:52:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728723AbfAHOwm (ORCPT ); Tue, 8 Jan 2019 09:52:42 -0500 Received: from mail-pg1-f195.google.com ([209.85.215.195]:36435 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727656AbfAHOwm (ORCPT ); Tue, 8 Jan 2019 09:52:42 -0500 Received: by mail-pg1-f195.google.com with SMTP id n2so1841828pgm.3; Tue, 08 Jan 2019 06:52:41 -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=xyy6mAy8WLdG81KW4F9xjs3/xe6sVsULwWFgQxb2ylw=; b=sjWC4DnzYUy9gBIwqh33/FAGvnw8rd8rSLZWYocYWBCbpQfJ8pB69FdCnfd32UO/KV wRYZ6KKL9TCjAbXmIt13Hsi256lWjC7LDZen8ADq6zJZd5MsepNfAFIKwP9u3tiOBt/d ZQfUDH2zqAmFbhwOL8ZCbw/aRvKe73u/LpopLWaUGuPKg5b61s0tH/k2d71cA0u70NBl yUOByobSbQNhZ++yqFZd1PwK8Svxj8c4s+v0LoCEvc4Tc74kYsJjUm10VT1mRQJ9hzFO BJwSWzvE06A2AEQSMPRU7nMx4gs6RM25z+66ODaWGqbFZnFQccBzAdutmZj0snK0wgCT r/9Q== 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=xyy6mAy8WLdG81KW4F9xjs3/xe6sVsULwWFgQxb2ylw=; b=e3CiQeQXBsGz+P/wycZbaG5WLQlE9ml0cRfuyA43YxinG+aPGFC3tURiy5HBEaiTQ9 vEp0zT9r8Drnc8/THVCJmqAmK3vsh6HPLFyi5fKRdbxjFGQOqPcjWCZvY8Ouyw8LEgbC H9xl3qpn+hPhLzjx3aDFq10mUVFRzRfN5F5dn80Z+1iPJS3Srv7uWJrjTnSDLczD0xlt 7SUQ4UItlWt1IJwYjsyyriESEyURaE12GYO9dB2iJy95vl0U7n8dp7SMbVW328Iy0G9i ZDv9zgmgRwHRHMSJn6lt8I47dGpcbpKD8T422WaN7qjXLMfRpjXfaaXbTJ/I0t/fIk2Y Eyrg== X-Gm-Message-State: AJcUukcEqpeCGRh5KRQ65avsNn5yV0/nm4+MO4L6SauxoDVmrtLqw34/ wu+EAdWOIpYal55ZcsOPPyzGs0WW X-Google-Smtp-Source: ALg8bN4ln+4Q4d021A01BYbaP5oe4hcIl3vUiCLiZXwMUum385b1v4CAMTujpNHke3PfcSCaJxoqPA== X-Received: by 2002:a63:2d82:: with SMTP id t124mr1791570pgt.260.1546959161017; Tue, 08 Jan 2019 06:52:41 -0800 (PST) Received: from localhost.localdomain ([240f:34:212d:1:5cb2:2bb:ff67:c70d]) by smtp.gmail.com with ESMTPSA id n78sm53546990pfk.19.2019.01.08.06.52.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 08 Jan 2019 06:52:40 -0800 (PST) From: Akinobu Mita To: linux-media@vger.kernel.org, devicetree@vger.kernel.org Cc: Akinobu Mita , Guennadi Liakhovetski , Sakari Ailus , Mauro Carvalho Chehab Subject: [PATCH v2 11/13] media: mt9m001: support log_status ioctl and event interface Date: Tue, 8 Jan 2019 23:51:48 +0900 Message-Id: <1546959110-19445-12-git-send-email-akinobu.mita@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1546959110-19445-1-git-send-email-akinobu.mita@gmail.com> References: <1546959110-19445-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 mt9m001's v4l2 controls. Cc: Guennadi Liakhovetski Cc: Sakari Ailus Cc: Mauro Carvalho Chehab Signed-off-by: Akinobu Mita --- * No changes from v1 drivers/media/i2c/mt9m001.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/media/i2c/mt9m001.c b/drivers/media/i2c/mt9m001.c index 5e93c7d..66a0928 100644 --- a/drivers/media/i2c/mt9m001.c +++ b/drivers/media/i2c/mt9m001.c @@ -17,6 +17,7 @@ #include #include +#include #include /* @@ -632,6 +633,9 @@ static const struct v4l2_ctrl_ops mt9m001_ctrl_ops = { }; static const struct v4l2_subdev_core_ops mt9m001_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 = mt9m001_g_register, .s_register = mt9m001_s_register, @@ -720,7 +724,8 @@ static int mt9m001_probe(struct i2c_client *client, return PTR_ERR(mt9m001->reset_gpio); v4l2_i2c_subdev_init(&mt9m001->subdev, client, &mt9m001_subdev_ops); - mt9m001->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; + mt9m001->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | + V4L2_SUBDEV_FL_HAS_EVENTS; v4l2_ctrl_handler_init(&mt9m001->hdl, 4); v4l2_ctrl_new_std(&mt9m001->hdl, &mt9m001_ctrl_ops, V4L2_CID_VFLIP, 0, 1, 1, 0);