pxa2xx_spi: fix for SPI_CS_HIGH
Commit a7bb3909b3293d503211d7f6af8ed62c1644b686 introduces chipselect GPIO, and configures the CS polarity using SPI_CS_HIGH spi->mode flag, but the SPI_CS_HIGH is not allowed by setup().
drivers/spi/pxa2xx_spi.c +1 -1
@@ -1186,7 +1186,7 @@ static int transfer(struct spi_device *spi, struct spi_message *msg) }/* the spi->mode bits understood by this driver: */ -#define MODEBITS (SPI_CPOL | SPI_CPHA) +#define MODEBITS (SPI_CPOL | SPI_CPHA | SPI_CS_HIGH)static int setup_cs (struct spi_device *spi,struct chip_data *chip,struct pxa2xx_spi_chip *chip_info)
Signature · 1 line
Daniel Ribeiro
Quoted 5 lines · Daniel Ribeiro
Commit
a7bb3909b3293d503211d7f6af8ed62c1644b686introduces chipselect GPIO, and configures the CS polarity usingSPI_CS_HIGHspi->modeflag, but theSPI_CS_HIGHis not allowed bysetup().Signed-off-by Daniel Ribeiro <[email protected]>
This doesn't need to merge before 2.6.31, right? (That is, is is true that nothing in mainline is yet *relyings* on CS_HIGH working with this driver?)
Assuming that's true, this patch needs to be updated to apply properly against modebits changes in the MM tree.
Quoted 19 lines
drivers/spi/pxa2xx_spi.c +1
-1@@ -1186,7 +1186,7 @@ static int transfer(struct spi_device *spi, struct spi_message *msg) }/* the spi->mode bits understood by this driver: */ -#define MODEBITS (SPI_CPOL | SPI_CPHA) +#define MODEBITS (SPI_CPOL | SPI_CPHA | SPI_CS_HIGH)static int setup_cs (struct spi_device *spi,struct chip_data *chip,struct pxa2xx_spi_chip *chip_info)Signature · 2 lines
-- Daniel Ribeiro
------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com
Em Sex, 2009-05-08 às 09:33 -0700, David Brownell escreveu:
Quoted 3 lines
This doesn't need to merge before 2.6.31, right? (That is, is is true that nothing in mainline is yet *relyings* on
CS_HIGHworking with this driver?)
2.6.31 is ok! :)
Quoted 2 lines
Assuming that's true, this patch needs to be updated to apply properly against modebits changes in the MM tree.
Done. Applies after spi-move-more-spi_setup-functionality-into-core.patch.
--
Commit a7bb3909b3293d503211d7f6af8ed62c1644b686 introduces chipselect GPIO, and configures the CS polarity using SPI_CS_HIGH spi->mode flag. Add SPI_CS_HIGH to the allowed modes.
drivers/spi/pxa2xx_spi.c +1 -1
@@ -1482,7 +1482,7 @@ drv_data->ssp = ssp;/* the spi->mode bits understood by this driver: */ - master->mode_bits =SPI_CPOL |SPI_CPHA ; + master->mode_bits =SPI_CPOL |SPI_CPHA |SPI_CS_HIGH ; master->bus_num = pdev->id; master->num_chipselect = platform_info->num_chipselect;
Signature · 13 lines
Daniel Ribeiro ------------------------------------------------------------------------------ The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com _______________________________________________ spi-devel-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/spi-devel-general