Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1722072yba; Thu, 4 Apr 2019 17:17:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqz0CzKGvuEqHQCPIvnhg42UHaxdsjKkDQd9AwTCZc7j9BdlvJhLmBRxHNN42mT3AKL710G4 X-Received: by 2002:a65:654c:: with SMTP id a12mr8882370pgw.101.1554423448091; Thu, 04 Apr 2019 17:17:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554423448; cv=none; d=google.com; s=arc-20160816; b=w8oNJ0p4q2iiHdxsaWAEFMhkf5Ay22/8mSLomTHtRd31YTWG8Nkmafcsij3JrPpwdr YF5OmwuYaFxHbfU5Ei3BDjn6t00I+fx6e0qzmVov7cgT6i6BgOZNTko9hjGC8dKhsiap XcalQjPHsUAcIerwJBRD67aa8xXx7zxp8lr/YboR7X6i+ndyIMAD9kZTkbJYzubShtd7 iwG2heB/xLRl1zGh6fuL8oTEbyCzBb1bQqDSH+/EKWeBsK/cbpGiYhvHUTRZpqXyvybN FLmZDgnolj9A40/MkdtR72X9NdL1Xv4MreJ9cR3u4e7Cn+qWLfdKdzYloPzRkAZQ1vLd OnXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from; bh=7kFmddCnnwdnrAeG+ZW/CtFTmup+QR8mSzFCa6z6xtE=; b=cnRutAoeIhoKeZeiLceIE3IQvZEivXpfQLo9Y8G0sbimiNJCWRB2BUTrkwuY5S6agg V57bqpLFpfozCI4YO9LEG0nu68uC3lgckVq6u54QgBhsv5WiCbosEU07Gyu6Hu3FqyaO YpBKxoL4Ol8FNH8VILLjwJ8RanlWj0oP6Bk/xNxDCYqXkDHEJXfiCZ865pvEM12iavTd wQQF0AXt+0fMRm3JTyEBSjDWKNMT2HilZbMs0NU5koKsMx9KGzTf6ohFMZthqvkR+cF1 5agZjj3bGQgGzJAr+KPT5ejUgBjgHoY32IO9N2L+jPLyk/d3Ji+HwBMhm4H1SwpHYu/0 Wphg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=EnDfCBr7; 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 sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i10si17747675plb.384.2019.04.04.17.17.13; Thu, 04 Apr 2019 17:17:28 -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=@nvidia.com header.s=n1 header.b=EnDfCBr7; 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 sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731224AbfDEAP4 (ORCPT + 99 others); Thu, 4 Apr 2019 20:15:56 -0400 Received: from hqemgate15.nvidia.com ([216.228.121.64]:7960 "EHLO hqemgate15.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730508AbfDEAO1 (ORCPT ); Thu, 4 Apr 2019 20:14:27 -0400 Received: from hqpgpgate102.nvidia.com (Not Verified[216.228.121.13]) by hqemgate15.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Thu, 04 Apr 2019 17:14:16 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate102.nvidia.com (PGP Universal service); Thu, 04 Apr 2019 17:14:27 -0700 X-PGP-Universal: processed; by hqpgpgate102.nvidia.com on Thu, 04 Apr 2019 17:14:27 -0700 Received: from HQMAIL108.nvidia.com (172.18.146.13) by HQMAIL105.nvidia.com (172.20.187.12) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Fri, 5 Apr 2019 00:14:27 +0000 Received: from hqnvemgw02.nvidia.com (172.16.227.111) by HQMAIL108.nvidia.com (172.18.146.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Fri, 5 Apr 2019 00:14:27 +0000 Received: from skomatineni-linux.nvidia.com (Not Verified[10.110.103.48]) by hqnvemgw02.nvidia.com with Trustwave SEG (v7,5,8,10121) id ; Thu, 04 Apr 2019 17:14:26 -0700 From: Sowjanya Komatineni To: , , , , , , , CC: , , , , Subject: [PATCH V2 07/20] spi: tegra114: set bus number based on id Date: Thu, 4 Apr 2019 17:14:06 -0700 Message-ID: <1554423259-26056-7-git-send-email-skomatineni@nvidia.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1554423259-26056-1-git-send-email-skomatineni@nvidia.com> References: <1554423259-26056-1-git-send-email-skomatineni@nvidia.com> X-NVConfidentiality: public MIME-Version: 1.0 Content-Type: text/plain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1554423256; bh=7kFmddCnnwdnrAeG+ZW/CtFTmup+QR8mSzFCa6z6xtE=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:X-NVConfidentiality:MIME-Version: Content-Type; b=EnDfCBr78vOcRHdxMPmY/mlhx+ZDWOKOpbuf29ZwO9YX3NFmGwqdyoS19B5nf3fec pJ7AORgjXKix7Kbaqgv/97d8rcEgenykq1yxRiomJJa3b7BuidHX7njTie1R4j3Q2o 1GpH9OQ/JIN92ko8lPG8NGmT8X5lhhyJHKhpd6Bc30HWEgFzfwMqBezvNt7fna+3jt 34aGuUtB3qr964/fqgQ1RU5JBgEY8jrJtdJ/p3prP4/i3/7VojIalUd/QcQNXQp7lL 8TIzY27hXYyQq81QM69sdkApdGfroOz1tkOf37lFTGKuUkYORzlVu8viDucmA3odm5 XHfoPA1x1IZpA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch sets SPI device id from the device tree as the bus number. Signed-off-by: Sowjanya Komatineni --- drivers/spi/spi-tegra114.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/spi/spi-tegra114.c b/drivers/spi/spi-tegra114.c index 191233eae149..58f5059b339f 100644 --- a/drivers/spi/spi-tegra114.c +++ b/drivers/spi/spi-tegra114.c @@ -1138,6 +1138,7 @@ static int tegra_spi_probe(struct platform_device *pdev) struct tegra_spi_data *tspi; struct resource *r; int ret, spi_irq; + int bus_num; master = spi_alloc_master(&pdev->dev, sizeof(*tspi)); if (!master) { @@ -1158,6 +1159,9 @@ static int tegra_spi_probe(struct platform_device *pdev) master->transfer_one_message = tegra_spi_transfer_one_message; master->num_chipselect = MAX_CHIP_SELECT; master->auto_runtime_pm = true; + bus_num = of_alias_get_id(pdev->dev.of_node, "spi"); + if (bus_num >= 0) + master->bus_num = bus_num; tspi->master = master; tspi->dev = &pdev->dev; -- 2.7.4