linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] spi: spi-mpc512x-psc: init mode bits supported by the driver
@ 2013-01-14 20:27 Anatolij Gustschin
       [not found] ` <1358195221-18488-1-git-send-email-agust-ynQEQJNshbs@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Anatolij Gustschin @ 2013-01-14 20:27 UTC (permalink / raw)
  To: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

The driver should setup mode bits it supports, otherwise
adding an SPI device might fail even if the driver supports
the requested SPI mode.

Signed-off-by: Anatolij Gustschin <agust-ynQEQJNshbs@public.gmane.org>
---
 drivers/spi/spi-mpc512x-psc.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/spi/spi-mpc512x-psc.c b/drivers/spi/spi-mpc512x-psc.c
index 88e5441..89480b2 100644
--- a/drivers/spi/spi-mpc512x-psc.c
+++ b/drivers/spi/spi-mpc512x-psc.c
@@ -438,6 +438,7 @@ static int mpc512x_psc_spi_do_probe(struct device *dev, u32 regaddr,
 		master->num_chipselect = pdata->max_chipselect;
 	}
 
+	master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH | SPI_LSB_FIRST;
 	master->setup = mpc512x_psc_spi_setup;
 	master->transfer = mpc512x_psc_spi_transfer;
 	master->cleanup = mpc512x_psc_spi_cleanup;
-- 
1.7.5.4


------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412

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

end of thread, other threads:[~2013-04-09 17:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-14 20:27 [PATCH 1/2] spi: spi-mpc512x-psc: init mode bits supported by the driver Anatolij Gustschin
     [not found] ` <1358195221-18488-1-git-send-email-agust-ynQEQJNshbs@public.gmane.org>
2013-01-14 20:27   ` [PATCH 2/2] spi: spi-mpc512x-psc: add support for gpio chip selects Anatolij Gustschin
     [not found]     ` <1358195221-18488-2-git-send-email-agust-ynQEQJNshbs@public.gmane.org>
2013-02-05 14:18       ` Grant Likely
2013-03-11 22:45         ` Anatolij Gustschin
2013-03-11 23:23         ` [PATCH v2] " Anatolij Gustschin
     [not found]           ` <1363044215-24061-1-git-send-email-agust-ynQEQJNshbs@public.gmane.org>
2013-04-01 15:29             ` [PATCH v2 RESEND] " Anatolij Gustschin
     [not found]               ` <20130409165322.GS9243@opensource.wolfsonmicro.com>
     [not found]                 ` <20130409165322.GS9243-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2013-04-09 17:04                   ` Anatolij Gustschin
2013-02-05 14:16   ` [PATCH 1/2] spi: spi-mpc512x-psc: init mode bits supported by the driver Grant Likely

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).