Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp643226imm; Thu, 5 Jul 2018 06:37:45 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdSeLyRSdoaxVj9hq6RpSo3luD3EtaywWXY4lEEy+GHnTInDEB0eTUNLVc4ZJFlhPqJt95l X-Received: by 2002:a65:4344:: with SMTP id k4-v6mr5615894pgq.409.1530797865053; Thu, 05 Jul 2018 06:37:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530797865; cv=none; d=google.com; s=arc-20160816; b=0/ImMvBgQF5CAtyWio1HHa923aVnaR3zDczzSqfEPIoN3oxMcn98UX3YpDVj0j5InU oSS4m6/dI7uk9e8y25yXAiJTfdeSjy80h5TDcS9YQuSakKg6S/EJSdEU6UrKxdDr8A4E 7KHc/YPba9GtBpvFvpC0JUwKwoWXT7opjtz9Sw9Gxk7yh0VhJImXSUl4ZlErca9MnmIn VR3N+5mkqTWvhi/wciyqX+caE7k1ymi5ABxzkDDCB50fu8Vbd0jb3vdp7SiOjHvcENr2 ojwVqrnWzYfRedy5dNsutQaaImOI4CpS40spZ4mLJkgPhnKVsgwQKHhr1o6Ryln+FPvf qZWA== 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=cHOrgNHXiFZzsmVGin5QdyMb1hSGNOMxmeJOjwaVnY72C5GLsGo0EXgMFzAQINrgHU Mp3ot+QMTo67WHjfIz9IDJQrfAOhAeylEFEpAKXd/pQM3fyqetN+P//ILfgPe7RTQvqM ztr1nCPEDLqaJZmKJghh0ScdswNCESNTsHyHgNga1uCvYggPtjJA47gYmTfVxO0Rdw9d H2N9qaOVMGcTflJjvDyjvDbjL+DEU5w6VNgRcjfTtZSEG+dtNAbuoVi/fbxYk10gYVEU i5hPi3YwGvi/8lsl/IEmFVp/nv/0227cHLHh2kNtF/tRM23HBQ8jSaBXZqxGiv6JgiT/ pT3Q== 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 d22-v6si6571433pfd.182.2018.07.05.06.37.30; Thu, 05 Jul 2018 06:37:45 -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 S1753967AbeGENe6 (ORCPT + 99 others); Thu, 5 Jul 2018 09:34:58 -0400 Received: from ns.mm-sol.com ([37.157.136.199]:41332 "EHLO extserv.mm-sol.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753838AbeGENdX (ORCPT ); Thu, 5 Jul 2018 09:33:23 -0400 Received: from mms-0439.qualcomm.mm-sol.com (unknown [37.157.136.206]) by extserv.mm-sol.com (Postfix) with ESMTPSA id 23A8BCD69; Thu, 5 Jul 2018 16:33:18 +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 v2 33/34] media: camss: csid: Add support for events triggered by user controls Date: Thu, 5 Jul 2018 16:33:04 +0300 Message-Id: <1530797585-8555-34-git-send-email-todor.tomov@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1530797585-8555-1-git-send-email-todor.tomov@linaro.org> References: <1530797585-8555-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