* [RESENT PATCH] spi: xilinx: Use standard num-cs binding
@ 2015-03-05 13:10 Michal Simek
0 siblings, 0 replies; only message in thread
From: Michal Simek @ 2015-03-05 13:10 UTC (permalink / raw)
To: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
monstr-pSz03upnqPeHXe+LvDLADg
Cc: Mark Brown, Sören Brinkmann,
linux-spi-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
Use standard num-cs binding property and setup
"xlnx,num-ss-bits" as deprecated.
Signed-off-by: Michal Simek <michal.simek-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
---
drivers/spi/spi-xilinx.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/spi/spi-xilinx.c b/drivers/spi/spi-xilinx.c
index 133f53a9c1d4..69313407b690 100644
--- a/drivers/spi/spi-xilinx.c
+++ b/drivers/spi/spi-xilinx.c
@@ -374,8 +374,15 @@ static int xilinx_spi_probe(struct platform_device *pdev)
num_cs = pdata->num_chipselect;
bits_per_word = pdata->bits_per_word;
} else {
- of_property_read_u32(pdev->dev.of_node, "xlnx,num-ss-bits",
- &num_cs);
+ if (of_property_read_u32(pdev->dev.of_node, "num-cs",
+ &num_cs)) {
+ if (!of_property_read_u32(pdev->dev.of_node,
+ "xlnx,num-ss-bits",
+ &num_cs)) {
+ dev_err(&pdev->dev,
+ "property name 'xlnx,num-ss-bits' is deprecated.\n");
+ }
+ }
}
if (!num_cs) {
--
1.8.2.3
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-03-05 13:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-05 13:10 [RESENT PATCH] spi: xilinx: Use standard num-cs binding Michal Simek
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).