From patchwork Thu Dec 29 16:27:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 9491335 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 1017662AB8 for ; Thu, 29 Dec 2016 16:28:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F117A1FF60 for ; Thu, 29 Dec 2016 16:28:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E3A5425250; Thu, 29 Dec 2016 16:28:58 +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.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, 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 0BCA61FF60 for ; Thu, 29 Dec 2016 16:28:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753075AbcL2Q25 (ORCPT ); Thu, 29 Dec 2016 11:28:57 -0500 Received: from mail-lf0-f68.google.com ([209.85.215.68]:33523 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753013AbcL2Q24 (ORCPT ); Thu, 29 Dec 2016 11:28:56 -0500 Received: by mail-lf0-f68.google.com with SMTP id y21so32665312lfa.0 for ; Thu, 29 Dec 2016 08:28:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=JpUVthcOdB4vWtRX7qOGZMzbKNEF6IHWQRW9i7aytaM=; b=YKqOwbomYrM0qqR//EI9avR1QUNG2Hv9JzNfwLdDKGrKgtuHFLsnHbHKl/Q4DsuGRH CWnCYxFIV5ufj2K3/05rG96mk/8sQINKkrUOLzZA310GIzr+DzCEnmSKDH+bM7jzKToD ZwMVv3ncJlHqF8dQWMv5QWzUcWz7qqJUEnlWM6eUBDrtWZTtx98nDDGnx08m8+YJaFzN Ptyi6vHfhGOZz2wJRvS6BTAaC2YLOg6x0wUzONsZqdgzogIIg7rS3cL9osdOqj7K1WAF LO3ZFmTUcTelhRKKGiGjKK43fhS4MPXkLGugqfZaahEYq+TjRXziCpGKnwYDjZ+ri+HB lI1w== 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:mime-version :content-transfer-encoding; bh=JpUVthcOdB4vWtRX7qOGZMzbKNEF6IHWQRW9i7aytaM=; b=aRpAPreLHLHiW0saaXHemUQrzQqVrShXHWQLK5YuiQHx7BPohJPbbrznphH8xRYow8 7ZVRIwZQ0lstf2UsZUZy7J2frreBRxkriQsVHBgy1bG/gZ6IFldADQkOzAfhNMZQYKAr RUvCl4O4Q4UaadVijry1b/iX4/iBX9/iLX3CnybQTxTSKp9TrNzR0tEZIi3yFza2yT+/ MrTklnMzWI3MJxoK8eK8F2oxbe47MT1jd0/ie4coW2dClAkOaW0mm7k8iryLfuS5z96u nInothZf8MCMhUCKOZ4rTy6HCx0IAxO0yIbwFiC+GBjPcJKInByDTGogRTneurLx/kSa J0qA== X-Gm-Message-State: AIkVDXJBzCVZLXS0EVRkLRRmFe4kGdZ0BWUNZSQehV0jN+O+f2Rvb3H+y170EyUvA/Dm+Q== X-Received: by 10.25.161.8 with SMTP id k8mr12737970lfe.165.1483028935179; Thu, 29 Dec 2016 08:28:55 -0800 (PST) Received: from linux-samsung.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id i129sm12785225lfd.8.2016.12.29.08.28.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Dec 2016 08:28:54 -0800 (PST) From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= To: Mark Brown , linux-spi@vger.kernel.org Cc: Hauke Mehrtens , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Subject: [PATCH for-next] spi: bcm53xx: set of_node to let DT specify device(s) Date: Thu, 29 Dec 2016 17:27:55 +0100 Message-Id: <20161229162755.9029-1-zajec5@gmail.com> X-Mailer: git-send-email 2.10.1 MIME-Version: 1.0 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Rafał Miłecki Setting of_node of master's dev seems to be a common way of letting it work nicely with DT. This allows specifying device there instead of hardcoding one in the driver code. This was successfully tested with commit 1b47b98acce2 ("ARM: BCM5301X: Add DT entry for SPI controller and NOR flash") Signed-off-by: Rafał Miłecki --- drivers/spi/spi-bcm53xx.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/spi/spi-bcm53xx.c b/drivers/spi/spi-bcm53xx.c index afb5169..0c61ad4 100644 --- a/drivers/spi/spi-bcm53xx.c +++ b/drivers/spi/spi-bcm53xx.c @@ -275,10 +275,6 @@ static int bcm53xxspi_flash_read(struct spi_device *spi, * BCMA **************************************************/ -static struct spi_board_info bcm53xx_info = { - .modalias = "bcm53xxspiflash", -}; - static const struct bcma_device_id bcm53xxspi_bcma_tbl[] = { BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_NS_QSPI, BCMA_ANY_REV, BCMA_ANY_CLASS), {}, @@ -311,6 +307,7 @@ static int bcm53xxspi_bcma_probe(struct bcma_device *core) b53spi->bspi = true; bcm53xxspi_disable_bspi(b53spi); + master->dev.of_node = dev->of_node; master->transfer_one = bcm53xxspi_transfer_one; if (b53spi->mmio_base) master->spi_flash_read = bcm53xxspi_flash_read; @@ -324,9 +321,6 @@ static int bcm53xxspi_bcma_probe(struct bcma_device *core) return err; } - /* Broadcom SoCs (at least with the CC rev 42) use SPI for flash only */ - spi_new_device(master, &bcm53xx_info); - return 0; }