spi/s3c64xx: Add new parameter to cs callback
Since most of the chip-selects are simply going to be like gpio_set_value, it would do good to have the same callback type so that it could simply be made to point at gpio_set_value. Signed-off-by: Jassi Brar <jassi.brar@samsung.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
This commit is contained in:
parent
e6b873c966
commit
fa0fcde66a
1 changed files with 4 additions and 3 deletions
|
@ -300,13 +300,14 @@ static inline void enable_cs(struct s3c64xx_spi_driver_data *sdd,
|
||||||
if (sdd->tgl_spi != spi) { /* if last mssg on diff device */
|
if (sdd->tgl_spi != spi) { /* if last mssg on diff device */
|
||||||
/* Deselect the last toggled device */
|
/* Deselect the last toggled device */
|
||||||
cs = sdd->tgl_spi->controller_data;
|
cs = sdd->tgl_spi->controller_data;
|
||||||
cs->set_level(spi->mode & SPI_CS_HIGH ? 0 : 1);
|
cs->set_level(cs->line,
|
||||||
|
spi->mode & SPI_CS_HIGH ? 0 : 1);
|
||||||
}
|
}
|
||||||
sdd->tgl_spi = NULL;
|
sdd->tgl_spi = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
cs = spi->controller_data;
|
cs = spi->controller_data;
|
||||||
cs->set_level(spi->mode & SPI_CS_HIGH ? 1 : 0);
|
cs->set_level(cs->line, spi->mode & SPI_CS_HIGH ? 1 : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int wait_for_xfer(struct s3c64xx_spi_driver_data *sdd,
|
static int wait_for_xfer(struct s3c64xx_spi_driver_data *sdd,
|
||||||
|
@ -386,7 +387,7 @@ static inline void disable_cs(struct s3c64xx_spi_driver_data *sdd,
|
||||||
if (sdd->tgl_spi == spi)
|
if (sdd->tgl_spi == spi)
|
||||||
sdd->tgl_spi = NULL;
|
sdd->tgl_spi = NULL;
|
||||||
|
|
||||||
cs->set_level(spi->mode & SPI_CS_HIGH ? 0 : 1);
|
cs->set_level(cs->line, spi->mode & SPI_CS_HIGH ? 0 : 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void s3c64xx_spi_config(struct s3c64xx_spi_driver_data *sdd)
|
static void s3c64xx_spi_config(struct s3c64xx_spi_driver_data *sdd)
|
||||||
|
|
Loading…
Reference in a new issue