From patchwork Wed Mar 22 14:48:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 95748 Delivered-To: patch@linaro.org Received: by 10.182.3.34 with SMTP id 2csp231250obz; Wed, 22 Mar 2017 07:06:26 -0700 (PDT) X-Received: by 10.200.41.33 with SMTP id y30mr36426637qty.47.1490191585994; Wed, 22 Mar 2017 07:06:25 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 29si1174736qtn.48.2017.03.22.07.06.25; Wed, 22 Mar 2017 07:06:25 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 58387642D3; Wed, 22 Mar 2017 14:06:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 0E8DB64317; Wed, 22 Mar 2017 13:51:27 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id AAE3064310; Wed, 22 Mar 2017 13:51:16 +0000 (UTC) Received: from mail-wm0-f47.google.com (mail-wm0-f47.google.com [74.125.82.47]) by lists.linaro.org (Postfix) with ESMTPS id 36EDB642D9 for ; Wed, 22 Mar 2017 13:49:34 +0000 (UTC) Received: by mail-wm0-f47.google.com with SMTP id t189so38383466wmt.1 for ; Wed, 22 Mar 2017 06:49:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=S41fRErygZ0+W4h1TFLqYM5f+oEBqj2RqFYKXlArrwI=; b=qPn84MrJ6AYK+7AFlITzUdWUPpGUEBBJh3lrga3e/HIX8f1eBAJDHNas7PS2mYilwF AfA/TzWMaffwDbeARo6IEUlr2SOuTd/bP0zys49xtGRJyju0+JMSq/BVNlFA6/13o091 H89UcKciEVE+2rozk+OhpWjHKCdc7GgTEmF5G+MuZ5/ksvBCx36nWpFEQKhQfmv1B1R4 9CcYtWLA70W+kH73OaYFzJ9E5cNmhYNmeLS5fTlqgVZEQaDu6JnzXc4OkJRDNpA/xWhA 85VhaiF0XmcGHuEMAMfAhahAsO23cC++GIAwGfTewYhOj8u6WAFnAl+Oiimlo7UiuenZ 1tTQ== X-Gm-Message-State: AFeK/H3gjvmBE87BwK6t6KuU/dVFwocxIGl7dW4s+gf0cSgnwLO5QVaPSLRAv69TTxCuv9UMRjI= X-Received: by 10.25.41.209 with SMTP id p200mr11111581lfp.55.1490190573098; Wed, 22 Mar 2017 06:49:33 -0700 (PDT) Received: from erachmi-ericsson.ki.sw.ericsson.se (c-83-233-76-66.cust.bredband2.com. [83.233.76.66]) by smtp.gmail.com with ESMTPSA id l23sm522305lfk.27.2017.03.22.06.49.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 22 Mar 2017 06:49:32 -0700 (PDT) From: Christophe Milard To: yi.he@linaro.org, bill.fischofer@linaro.org, lng-odp@lists.linaro.org Date: Wed, 22 Mar 2017 15:48:25 +0100 Message-Id: <1490194110-40168-19-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1490194110-40168-1-git-send-email-christophe.milard@linaro.org> References: <1490194110-40168-1-git-send-email-christophe.milard@linaro.org> Subject: [lng-odp] [API-NEXT PATCHv2 18/23] drv: complement parameters to the driver probe() function X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" Of course, when probing a driver, the latter should be given the devio handle to be used. This is what this patch adds. It also adds the index of the devio, hence telling the driver which of the possible ODPDRV_MAX_DEVIOS devios was selected, as this is going to be the first thing the driver needs to know. Signed-off-by: Christophe Milard --- include/odp/drv/spec/driver.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) -- 2.7.4 diff --git a/include/odp/drv/spec/driver.h b/include/odp/drv/spec/driver.h index 394aa92..ad2b8db 100644 --- a/include/odp/drv/spec/driver.h +++ b/include/odp/drv/spec/driver.h @@ -314,9 +314,12 @@ struct odpdrv_driver_param_t { /** Probe function: * Called by ODP to see if the driver can drive a given device - * + * -dev the device to be probed + * -devio is the devio to be used. + * -devio_idx actually tells which devio was selected: it is the + * index in the devios array above. */ - int (*probe)(odpdrv_device_t *dev); + int (*probe)(odpdrv_device_t dev, odpdrv_devio_t devio, int devio_idx); /** unbind function: * Only called with devices whose probe() returned true