Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp999570imm; Wed, 25 Jul 2018 09:42:49 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfJkct8sjK/aJYvrlmqHpQMUn35knq4mYoknb32+8bRjguiMcBU6IpLpPsTR3Fen50mOydP X-Received: by 2002:a63:82c7:: with SMTP id w190-v6mr21245383pgd.253.1532536969260; Wed, 25 Jul 2018 09:42:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532536969; cv=none; d=google.com; s=arc-20160816; b=fRr5nVYHZb73QqSyw9zEjhDuQIsy1zEbg8Hs77mMFKBDB7Ts2bla0pT/8lhRSwfmvU YNZpHP7dY+SsDyTskZpnWOKVg+9fGjrlCKJMKhnxrmJ5LDKgt1H0TYiO6t89cRWCwkX3 tp0XDXrQ//blTqaCDnJ/DervxLRx62/ahY33jmnzXcoVoMZ+piTQ3/huuuH7JazpP+n5 jyuf/QF1v6Z/vVJU0aLi7JiWhbCGDFe5xIhO9049/UVtJBHtDbR9vZZdlFQdC/eCwTIx C7hHmPxvMD9uXBMEDVNPeOAKr5Ia9fS/6jQ0zvtERjlL7dti+5lChZRpi20kEUi7d0IQ 4QbQ== 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=tUmcbqisjtzFmeuQ2KSQuQYRu3KYrYQWhXOw5r5qzJQ=; b=ekPph7h1XDigmbsVtzL6y02FjilR87IyVyb7XU0B85Dc9Iu8fd2ElZwOfqQumr0rKr RalMq4Oec2zZWXlhxw5BE+rqdHPv3jGqvaQyPHdWq0z13fnr/7+bIdlQM8fxPV2j939X h/10jIEEr4LEJ+cAJZWV0koOznryTSzq86xajXwmEdGWKBvYFqg0dPrUKNxsCyq+tSNE wP09NihMQbF3jgM/+YH6U3xV7QcUVjStfE+EDnMIlal+pQSa71onnCtkpLY98lMJiCsW K5twzfqCApWT80aU7K/C7BVYypQthDg0R4Z2zVOF+Y+42X5q5EEuyYYGjU33rscwk9XG uXjQ== 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 m3-v6si14329366pgr.108.2018.07.25.09.42.34; Wed, 25 Jul 2018 09:42:49 -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 S1730721AbeGYRv3 (ORCPT + 99 others); Wed, 25 Jul 2018 13:51:29 -0400 Received: from ns.mm-sol.com ([37.157.136.199]:35587 "EHLO extserv.mm-sol.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729502AbeGYRv2 (ORCPT ); Wed, 25 Jul 2018 13:51:28 -0400 Received: from mms-0439.qualcomm.mm-sol.com (unknown [37.157.136.206]) by extserv.mm-sol.com (Postfix) with ESMTPSA id E1E50CD74; Wed, 25 Jul 2018 19:38:54 +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 v4 34/34] media: camss: csid: Add support for events triggered by user controls Date: Wed, 25 Jul 2018 19:38:43 +0300 Message-Id: <1532536723-19062-35-git-send-email-todor.tomov@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1532536723-19062-1-git-send-email-todor.tomov@linaro.org> References: <1532536723-19062-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 Acked-by: Sakari Ailus --- 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 6e141af..729b318 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" @@ -1273,6 +1274,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 = { @@ -1318,7 +1321,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