linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] spi/spi-fsl-espi.c: Add spi cs polarity support
@ 2015-12-07  7:07 Andreas Werner
  2016-01-06 13:00 ` Andreas Werner
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Werner @ 2015-12-07  7:07 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-spi, broonie

Add CS polarity flag to be able to set the CS polarity
via the DT property spi-cs-high.

Signed-off-by: Andreas Werner <andreas.werner@men.de>
---
 drivers/spi/spi-fsl-espi.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/spi/spi-fsl-espi.c b/drivers/spi/spi-fsl-espi.c
index c27124a..2dc70953 100644
--- a/drivers/spi/spi-fsl-espi.c
+++ b/drivers/spi/spi-fsl-espi.c
@@ -495,7 +495,7 @@ static int fsl_espi_setup(struct spi_device *spi)
 			&reg_base->csmode[spi->chip_select]);
 	/* mask out bits we are going to set */
 	cs->hw_mode &= ~(CSMODE_CP_BEGIN_EDGECLK | CSMODE_CI_INACTIVEHIGH
-			 | CSMODE_REV);
+			 | CSMODE_REV | CSMODE_POL_1);
 
 	if (spi->mode & SPI_CPHA)
 		cs->hw_mode |= CSMODE_CP_BEGIN_EDGECLK;
@@ -503,6 +503,8 @@ static int fsl_espi_setup(struct spi_device *spi)
 		cs->hw_mode |= CSMODE_CI_INACTIVEHIGH;
 	if (!(spi->mode & SPI_LSB_FIRST))
 		cs->hw_mode |= CSMODE_REV;
+	if (!(spi->mode & SPI_CS_HIGH))
+		cs->hw_mode |= CSMODE_POL_1;
 
 	/* Handle the loop mode */
 	loop_mode = mpc8xxx_spi_read_reg(&reg_base->mode);
-- 
2.6.2


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

* Re: [PATCH] spi/spi-fsl-espi.c: Add spi cs polarity support
  2015-12-07  7:07 [PATCH] spi/spi-fsl-espi.c: Add spi cs polarity support Andreas Werner
@ 2016-01-06 13:00 ` Andreas Werner
  2016-01-06 17:31   ` Mark Brown
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Werner @ 2016-01-06 13:00 UTC (permalink / raw)
  To: linux-kernel; +Cc: broonie, andreas.werner, linux-spi

Hi,
any comments for this patches?

Regards
Andy

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

* Re: [PATCH] spi/spi-fsl-espi.c: Add spi cs polarity support
  2016-01-06 13:00 ` Andreas Werner
@ 2016-01-06 17:31   ` Mark Brown
  0 siblings, 0 replies; 3+ messages in thread
From: Mark Brown @ 2016-01-06 17:31 UTC (permalink / raw)
  To: Andreas Werner; +Cc: linux-kernel, andreas.werner, linux-spi

[-- Attachment #1: Type: text/plain, Size: 563 bytes --]

On Wed, Jan 06, 2016 at 02:00:40PM +0100, Andreas Werner wrote:
> Hi,
> any comments for this patches?
> 
> Regards
> Andy

Please don't send content free pings and please allow a reasonable time
for review.  People get busy, go on holiday, attend conferences and so 
on so unless there is some reason for urgency (like critical bug fixes)
please allow at least a couple of weeks for review.  Sending content
free pings just adds to the mail volume (if they are seen at all) and if 
something has gone wrong you'll have to resend the patches anyway.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

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

end of thread, other threads:[~2016-01-06 17:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-07  7:07 [PATCH] spi/spi-fsl-espi.c: Add spi cs polarity support Andreas Werner
2016-01-06 13:00 ` Andreas Werner
2016-01-06 17:31   ` Mark Brown

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