From patchwork Wed Jul 25 16:38:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Todor Tomov X-Patchwork-Id: 142873 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp1029122ljj; Wed, 25 Jul 2018 09:40:03 -0700 (PDT) X-Google-Smtp-Source: AAOMgpda0s7+IXBiXqIoAxjTsDNQpFyjxBwaX4eVhSIorqY6/zXBLl92/6PKEf96Ky25BweVSCT+ X-Received: by 2002:a17:902:925:: with SMTP id 34-v6mr22051560plm.103.1532536802899; Wed, 25 Jul 2018 09:40:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532536802; cv=none; d=google.com; s=arc-20160816; b=I3rkKlQRSbn5nVpWoHmvG0/TjexKrb+APZSzLWytMC1zswkmYiRzVTX9aqSVUvJjX0 kdCxry2/Fhe8TayxyDidoFTqQv338ew4XgWNd1cJ9Vipu6oqJJXunWz18duUaEW1utY9 LoIju9U9aIKNLM6/LoQ3TyebbF0V1evwPGMrnm/lgvNDC+9t8B9s2eMQ7hDaqdXGGsdo LoKUJvQuFhTw4OHGpjtVv1Ck5OpW6McRzQSKx4P0mo1d5s0yWzuVGAJWrP2xpW+RUNQM v2ykrQEYBnUyYgRFROaEageO0LHIBbchOeKl/5TYJegUDtAaKY53IOL9tMznixQxF8S5 fNog== 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 m18-v6si14077778pgi.688.2018.07.25.09.40.02; Wed, 25 Jul 2018 09:40:02 -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 S1730837AbeGYRv3 (ORCPT + 31 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(-) -- 2.7.4 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);