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: 78377 Delivered-To: patch@linaro.org Received: by 10.140.97.247 with SMTP id m110csp560359qge; Wed, 19 Oct 2016 19:40:33 -0700 (PDT) X-Received: by 10.99.119.68 with SMTP id s65mr13954235pgc.160.1476931233484; Wed, 19 Oct 2016 19:40:33 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b21si39519762pgh.99.2016.10.19.19.40.33; Wed, 19 Oct 2016 19:40:33 -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; dkim=pass header.i=@linaro.org; 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=pass (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757513AbcJTCkV (ORCPT + 27 others); Wed, 19 Oct 2016 22:40:21 -0400 Received: from mail-pf0-f181.google.com ([209.85.192.181]:34396 "EHLO mail-pf0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757463AbcJTCkT (ORCPT ); Wed, 19 Oct 2016 22:40:19 -0400 Received: by mail-pf0-f181.google.com with SMTP id r16so26558502pfg.1 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=HDUvxeJl4Pjexq2UAHRVV4dIoUE4toVXvxkkBrax5KrCs1U1iAOL2yn3Hn1Lxh+1RS C+PHt4Os22oD6UuPhvsQ6j6AtGYOaEQteIkoHN6BqBUxYnujlHsTokBp17nXTorHxYsK eFEXrr1N8PpPt1uwEV4zZ1YrJnvw2eSWyWF7SC1neYRVVmPx3zNpCmKvhzsHKBer1LPk YRP9pCRWUb4byxO65Z4v9teszmfwaFEryt9WMxK9tO71jpbADz2N9K/vQM2Yl+UUG8OD I13wBCw1ey9HEufGSo2715eTY+wBkWG4GYKjNLgxVwdM0Kybfjo+dWAWZZGdMDVQhgoU PEHw== X-Gm-Message-State: AA6/9RkPrJtp52BOo/STJ5KOn+5ErNxnv1wisF6SPyIb2aDaVFmCX0Jn3Tpy4p7TXvzegeKY 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 -- 2.5.0 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