Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp5671160imm; Mon, 23 Jul 2018 04:07:09 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcF8nghVcjKLCl0M5PqpR/HrLjvSqtlz28YL5SaOEsPaQkGcaNmnXYEgkI0URtWRk9OwwcW X-Received: by 2002:a63:214f:: with SMTP id s15-v6mr11652935pgm.267.1532344029937; Mon, 23 Jul 2018 04:07:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532344029; cv=none; d=google.com; s=arc-20160816; b=A0L4+fgVS5VRn9ZsS2hd+URJpTdUrktZS/vu/ad3Pq1KlZSZrz1FmEGLHLoDRBm70Z c6NsU/C+dYbkmPhSTBR7zuzeZLZKkGsu8PKIhWQAH0UzIyXo4T10ps4zSrIZrv6q/Ng/ G6D7upunoBdSH8jEFOTvJzDoERtccpLczy5f1LYldUFstRLzuOhhdT+EOZQ900YdWUkk bl255O3thdfhNOavurm1wlEY4bsk7DJELyxQIG793rT5BD+pLS8qGVS+uFY1/oumUGOk V0nRxjwZvLD0Ro/v8x0QXw8Oam+uIABdc7uv/G+S+19d5rC8cX29Hd0TF9ZwLmKK27PD 77/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=bJwHCNWRDS8wWSUR9r9XAhZmEL+YrbN5g9nw+OvUm7E=; b=rauWwQOgvVUXv2RMTjojQTKqZpN5cEjfRfqK+h38DHtWjJ3RsaJR7v5VZ4n1A/VPFi /mM43+dXf/d7lcldh8VHgMXoDbQNreygQvudRb99MMXiS218iwC5Qb5Sa3EsAeWi2Xhj W2IjQKXtCcpD3ZTQJLYiBeQ0vOMDiubmxxxV83ZMxHbgeSkrEvBoVXk7zisPXPMagWPu xUiWmvYKhzDkP/d2sqw2Vg+5N3mS8YP8g8va9SuavNKzMQxKrqdQE7sVBvCs1usaZqLG xqsAo8Px9SHne1lTAZSktLpoHodHwSOsUfhnv+9Gli0PLzckGt7htYWz+XLH3pWDHeiB WjlQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e9-v6si8121576plk.130.2018.07.23.04.06.55; Mon, 23 Jul 2018 04:07:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388297AbeGWMEt (ORCPT + 99 others); Mon, 23 Jul 2018 08:04:49 -0400 Received: from ns.mm-sol.com ([37.157.136.199]:39958 "EHLO extserv.mm-sol.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388179AbeGWMEs (ORCPT ); Mon, 23 Jul 2018 08:04:48 -0400 Received: from mms-0439.qualcomm.mm-sol.com (unknown [37.157.136.206]) by extserv.mm-sol.com (Postfix) with ESMTPSA id 42979CD71; Mon, 23 Jul 2018 14:04:03 +0300 (EEST) From: Todor Tomov To: mchehab@kernel.org, sakari.ailus@linux.intel.com, hans.verkuil@cisco.com, laurent.pinchart+renesas@ideasonboard.com, linux-media@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Todor Tomov Subject: [PATCH v3 34/35] media: camss: csid: Add support for events triggered by user controls Date: Mon, 23 Jul 2018 14:02:51 +0300 Message-Id: <1532343772-27382-35-git-send-email-todor.tomov@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1532343772-27382-1-git-send-email-todor.tomov@linaro.org> References: <1532343772-27382-1-git-send-email-todor.tomov@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Changing a user control value can trigger an event to other users. Add support for that. Signed-off-by: Todor Tomov --- drivers/media/platform/qcom/camss/camss-csid.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/qcom/camss/camss-csid.c b/drivers/media/platform/qcom/camss/camss-csid.c index a581377..b50eb96 100644 --- a/drivers/media/platform/qcom/camss/camss-csid.c +++ b/drivers/media/platform/qcom/camss/camss-csid.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include "camss-csid.h" @@ -1266,6 +1267,8 @@ static int csid_link_setup(struct media_entity *entity, static const struct v4l2_subdev_core_ops csid_core_ops = { .s_power = csid_set_power, + .subscribe_event = v4l2_ctrl_subdev_subscribe_event, + .unsubscribe_event = v4l2_event_subdev_unsubscribe, }; static const struct v4l2_subdev_video_ops csid_video_ops = { @@ -1311,7 +1314,8 @@ int msm_csid_register_entity(struct csid_device *csid, v4l2_subdev_init(sd, &csid_v4l2_ops); sd->internal_ops = &csid_v4l2_internal_ops; - sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; + sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | + V4L2_SUBDEV_FL_HAS_EVENTS; snprintf(sd->name, ARRAY_SIZE(sd->name), "%s%d", MSM_CSID_NAME, csid->id); v4l2_set_subdevdata(sd, csid); -- 2.7.4