From patchwork Mon Jul 23 11:02:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Todor Tomov X-Patchwork-Id: 142571 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp5909348ljj; Mon, 23 Jul 2018 04:04:12 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdZKIjOoY3abN8vBKxxNX6O0Mm7kPjMg9vKVJJKBcSAXqzGYAdkUgHA5gskGdEXX3Ezbdwu X-Received: by 2002:a63:a5c:: with SMTP id z28-v6mr11716679pgk.209.1532343852335; Mon, 23 Jul 2018 04:04:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532343852; cv=none; d=google.com; s=arc-20160816; b=Ijc6NLaeJwviE5g6alpbeP4fN20x49wgkt485IB5FhWZEfQNUbw7I5sL/nqByctC20 MHmkX3Av5LW5EsNzNzB9shPDmS4b9af3ttZvFnVI37v0cIlkMlkcsouIywELlLsQu5uj wNGuCLbMcE9TpsW1W7wK3faZ+Ja43eFSgPWCw8T59fBDhX5oDaukMkTWiX/yzeoiuQ8N eXGC36pq0jzvmI/qFIGo4nZaz77JCI+imOIG7EHYGWcDjl3SK95u/JG0SrAJy8JXmNu3 xVj3pl19c8yuvt9LrP2DgE7mWthVPch+l4RaqSvtLZzI9wwl08RPOd2lvOrVF8NlMTj6 XDxg== 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=Sti5P2wuj6oBJt2PkubQjPnfFVoy9YlOsIzXhF6UnehbrQcudB2qf0B+z3Zo9JtxXD H0PHbFIzD0uaLF8v7aVu+Emrr06V2bmWv+DAnNaTpfAKydVCPF9sDIT0CEfIlcK5EMnX RIPFOfRqbdqKp1V767CEkoPs/rUxSxVzOndAe9ii9ueDAlTkuWzYvZRSmmYMLksTB7bu 6xa+r6N4/Opp9Vsh+Su+jPCN1deHi/qLXeNkbmx9bhpsIewCU1m1muMhbASRidvGddaq cg5+iizElghV5sLQzmv71zMj5G+SOC8NjnP43OhhrKtDsU4uMEc/uPUX8x7OwaENGUQE feAQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-media-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-media-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 e66-v6si8296772pfk.198.2018.07.23.04.04.12; Mon, 23 Jul 2018 04:04:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-media-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-media-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-media-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 S2388284AbeGWMEt (ORCPT + 4 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-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@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(-) -- 2.7.4 Acked-by: Sakari Ailus 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);