linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] spi/fsl-espi: Add missing cell-index OF property
@ 2012-05-25 13:49 Joakim Tjernlund
       [not found] ` <1337953769-28244-1-git-send-email-Joakim.Tjernlund-SNLAxHN9vbcOP4wsBPIw7w@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Joakim Tjernlund @ 2012-05-25 13:49 UTC (permalink / raw)
  To: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	Kenth Eriksson
  Cc: Joakim Tjernlund

espi does not look for a OF cell-index property which
makes the bus numbering dynamic only. This add an
optional cell-index.

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund-SNLAxHN9vbcOP4wsBPIw7w@public.gmane.org>
---
 drivers/spi/spi-fsl-espi.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/spi/spi-fsl-espi.c b/drivers/spi/spi-fsl-espi.c
index d770f03..c4bea1f 100644
--- a/drivers/spi/spi-fsl-espi.c
+++ b/drivers/spi/spi-fsl-espi.c
@@ -680,6 +680,10 @@ static int of_fsl_espi_get_chipselects(struct device *dev)
 	}
 
 	pdata->max_chipselect = *prop;
+	prop = of_get_property(np, "cell-index", &len);
+	if (prop && len == sizeof(*prop))
+		pdata->bus_num = *prop;
+
 	pdata->cs_control = NULL;
 
 	return 0;
-- 
1.7.3.4


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-05-27  9:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-25 13:49 [PATCH] spi/fsl-espi: Add missing cell-index OF property Joakim Tjernlund
     [not found] ` <1337953769-28244-1-git-send-email-Joakim.Tjernlund-SNLAxHN9vbcOP4wsBPIw7w@public.gmane.org>
2012-05-25 18:52   ` Grant Likely
2012-05-26 16:23     ` Joakim Tjernlund
     [not found]     ` <OFB53233C6.0724FA94-ONC1257A0A.00593F62-C1257A0A.005A0C24@LocalDomain>
2012-05-27  9:28       ` Joakim Tjernlund

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).