From patchwork Wed Oct 3 11:34:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arun Kumar Neelakantam X-Patchwork-Id: 10624649 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 019CB14BD for ; Wed, 3 Oct 2018 11:35:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E74F9287C3 for ; Wed, 3 Oct 2018 11:35:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D83F1287E5; Wed, 3 Oct 2018 11:35:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 85916287C3 for ; Wed, 3 Oct 2018 11:35:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726710AbeJCSXC (ORCPT ); Wed, 3 Oct 2018 14:23:02 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:55232 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726617AbeJCSXB (ORCPT ); Wed, 3 Oct 2018 14:23:01 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 92F3A60C64; Wed, 3 Oct 2018 11:35:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1538566501; bh=nUgIgU3sGUyVGun7lBeMAs0TsBKW0lT54wD28lwzNvk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=X7qjqVMrhWVTLy/dFU2oY7T1KbwUuhYwP2UBkOAaWDpK2c6WZ4nNFped3NmUsI5Kz QYsPidu2ZyzLLFReDP/BW0L0uEpCqLvhSzWaGDo72WaN/jEuguwam5sYI36hM7W4cU 17K4NgXgmI1ZoSaIFpzDjwTSEOhlFjYXG7SDPaCs= Received: from aneelaka-linux.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: aneela@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 5EAD8607BD; Wed, 3 Oct 2018 11:34:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1538566501; bh=nUgIgU3sGUyVGun7lBeMAs0TsBKW0lT54wD28lwzNvk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=X7qjqVMrhWVTLy/dFU2oY7T1KbwUuhYwP2UBkOAaWDpK2c6WZ4nNFped3NmUsI5Kz QYsPidu2ZyzLLFReDP/BW0L0uEpCqLvhSzWaGDo72WaN/jEuguwam5sYI36hM7W4cU 17K4NgXgmI1ZoSaIFpzDjwTSEOhlFjYXG7SDPaCs= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 5EAD8607BD Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=aneela@codeaurora.org From: Arun Kumar Neelakantam To: ohad@wizery.com, bjorn.andersson@linaro.org, clew@codeaurora.org, sricharan@codeaurora.org Cc: linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, Arun Kumar Neelakantam Subject: [PATCH 2/5] rpmsg: Add signal callback to rpmsg char device Date: Wed, 3 Oct 2018 17:04:20 +0530 Message-Id: <1538566463-24627-3-git-send-email-aneela@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1538566463-24627-1-git-send-email-aneela@codeaurora.org> References: <1538566463-24627-1-git-send-email-aneela@codeaurora.org> Sender: linux-remoteproc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-remoteproc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Register a callback to get the signal notifications from rpmsg. Signed-off-by: Arun Kumar Neelakantam --- drivers/rpmsg/rpmsg_char.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/rpmsg/rpmsg_char.c b/drivers/rpmsg/rpmsg_char.c index a76b963..86003d5 100644 --- a/drivers/rpmsg/rpmsg_char.c +++ b/drivers/rpmsg/rpmsg_char.c @@ -5,6 +5,7 @@ * Copyright (c) 2012, PetaLogix * Copyright (c) 2011, Texas Instruments, Inc. * Copyright (c) 2011, Google, Inc. + * Copyright (c) 2018, The Linux Foundation. * * Based on rpmsg performance statistics driver by Michal Simek, which in turn * was based on TI & Google OMX rpmsg driver. @@ -120,6 +121,12 @@ static int rpmsg_ept_cb(struct rpmsg_device *rpdev, void *buf, int len, return 0; } +static int rpmsg_sigs_cb(struct rpmsg_device *rpdev, void *priv, + u32 old, u32 new) +{ + return 0; +} + static int rpmsg_eptdev_open(struct inode *inode, struct file *filp) { struct rpmsg_eptdev *eptdev = cdev_to_eptdev(inode->i_cdev); @@ -136,6 +143,7 @@ static int rpmsg_eptdev_open(struct inode *inode, struct file *filp) return -EINVAL; } + ept->sig_cb = rpmsg_sigs_cb; eptdev->ept = ept; filp->private_data = eptdev;