From patchwork Thu Oct 20 02:40:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 9385795 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 97AC560487 for ; Thu, 20 Oct 2016 02:42:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 89A022993D for ; Thu, 20 Oct 2016 02:42:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7E2E22998F; Thu, 20 Oct 2016 02:42:21 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 26F3C2993D for ; Thu, 20 Oct 2016 02:42:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757479AbcJTCkV (ORCPT ); Wed, 19 Oct 2016 22:40:21 -0400 Received: from mail-pf0-f175.google.com ([209.85.192.175]:35082 "EHLO mail-pf0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757462AbcJTCkS (ORCPT ); Wed, 19 Oct 2016 22:40:18 -0400 Received: by mail-pf0-f175.google.com with SMTP id s8so26522216pfj.2 for ; Wed, 19 Oct 2016 19:40:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=75xgKQ7XjsZxr8rjKVoT1XQaCBKCmRSZiaAxockmhzw=; b=fg/gbC4iEZ4U7YfjByvA0xESigFXC6WhaVMRGbHBeSHz8sFVPlYdelKxl9oeKr5Sk/ xeqO9whZO0oUCF2INTc93uJlcoFw8eLeXnrNQJ2mqv01qWp4Wwoj8tE0dNJW9dAK/Gsw yugEJrzAC+gENx6ckeD6NaCzCtlDCjENZvfSg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=75xgKQ7XjsZxr8rjKVoT1XQaCBKCmRSZiaAxockmhzw=; b=X7ui/yrd0qM2iCeM1mC3DGtB0mHP7/8d8sFYrXv9SL5IEQ0YYD5cGwBflYog5V5KVL h1bnBSo6Sa85uab6ByFad+uM4NUiAdIL6wLX4Q5KrUYCVV0E9vX6dz94rwFYiXenMGsG K6qm3pqf3M4kng5sJv8Z7JPTM6kBumJ85K6K2vW8hIhRPKMeZf+y+czAnS/GmSHPDJX7 neil4DdX+xX9AywLKyuxeMJk8zbx6Eyfjc/BTz6tS04b7de5/VpDoPI3hS25bfID2Gby KLLU+SejAxyo33sIo1dxiv/awMxSrtyIIS+8URRt9AmU+3cLLtBmbHC+Fv/DmZKiUnnj vLsw== X-Gm-Message-State: AA6/9Rnv42j1DAs343anu8luuf3icRFrceZti6F0H8I7VR1kKQtMKwXc4dcpyYnZAX97B41Y X-Received: by 10.99.216.21 with SMTP id b21mr13944362pgh.110.1476931218240; Wed, 19 Oct 2016 19:40:18 -0700 (PDT) Received: from localhost.localdomain (ip68-111-223-48.sd.sd.cox.net. [68.111.223.48]) by smtp.gmail.com with ESMTPSA id s85sm66780616pfi.17.2016.10.19.19.40.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 19 Oct 2016 19:40:17 -0700 (PDT) From: Bjorn Andersson To: Ohad Ben-Cohen , Bjorn Andersson Cc: linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, Sarangdhar Joshi , linux-arm-msm@vger.kernel.org Subject: [PATCH 02/11] rpmsg: smd: Expose edge registration functions Date: Wed, 19 Oct 2016 19:40:03 -0700 Message-Id: <1476931212-1806-3-git-send-email-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1476931212-1806-1-git-send-email-bjorn.andersson@linaro.org> References: <1476931212-1806-1-git-send-email-bjorn.andersson@linaro.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 The edge registration functions is to be used from a remoteproc driver to register and unregister an edge as the remote processor comes and goes. Signed-off-by: Bjorn Andersson --- drivers/rpmsg/qcom_smd.c | 1 + include/linux/rpmsg/qcom_smd.h | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 include/linux/rpmsg/qcom_smd.h diff --git a/drivers/rpmsg/qcom_smd.c b/drivers/rpmsg/qcom_smd.c index 952338a6296a..aded7352f089 100644 --- a/drivers/rpmsg/qcom_smd.c +++ b/drivers/rpmsg/qcom_smd.c @@ -25,6 +25,7 @@ #include #include #include +#include #include "rpmsg_internal.h" diff --git a/include/linux/rpmsg/qcom_smd.h b/include/linux/rpmsg/qcom_smd.h new file mode 100644 index 000000000000..7c12637a500e --- /dev/null +++ b/include/linux/rpmsg/qcom_smd.h @@ -0,0 +1,33 @@ + +#ifndef _LINUX_RPMSG_QCOM_SMD_H +#define _LINUX_RPMSG_QCOM_SMD_H + +#include + +struct qcom_smd_edge; + +#if IS_ENABLED(CONFIG_RPMSG_QCOM_SMD) + +struct qcom_smd_edge *qcom_smd_register_edge(struct device *parent, + struct device_node *node); +int qcom_smd_unregister_edge(struct qcom_smd_edge *edge); + +#else + +static inline struct qcom_smd_edge * +qcom_smd_register_edge(struct device *parent, + struct device_node *node) +{ + return ERR_PTR(-ENXIO); +} + +static inline int qcom_smd_unregister_edge(struct qcom_smd_edge *edge) +{ + /* This shouldn't be possible */ + WARN_ON(1); + return -ENXIO; +} + +#endif + +#endif