Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 48881cae authored by Wolfgang Muees's avatar Wolfgang Muees Committed by Pierre Ossman
Browse files

mmc_spi: allow setting of spi mode 3



Allow the platform data structures to specify spi mode 3
(if there is a pullup on the clock line or the spi hardware
is not able to serve spi mode 0).

Signed-off-by: default avatarWolfgang Muees <wolfgang.mues@auerswald.de>
Acked-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarPierre Ossman <drzeus@drzeus.cx>
parent b8e2006d
Loading
Loading
Loading
Loading
+5 −3
Original line number Original line Diff line number Diff line
@@ -1204,9 +1204,11 @@ static int mmc_spi_probe(struct spi_device *spi)


	/* MMC and SD specs only seem to care that sampling is on the
	/* MMC and SD specs only seem to care that sampling is on the
	 * rising edge ... meaning SPI modes 0 or 3.  So either SPI mode
	 * rising edge ... meaning SPI modes 0 or 3.  So either SPI mode
	 * should be legit.  We'll use mode 0 since it seems to be a
	 * should be legit.  We'll use mode 0 since the steady state is 0,
	 * bit less troublesome on some hardware ... unclear why.
	 * which is appropriate for hotplugging, unless the platform data
	 * specify mode 3 (if hardware is not compatible to mode 0).
	 */
	 */
	if (spi->mode != SPI_MODE_3)
		spi->mode = SPI_MODE_0;
		spi->mode = SPI_MODE_0;
	spi->bits_per_word = 8;
	spi->bits_per_word = 8;