Commit f6be2835 authored by Tomasz Bursztyka's avatar Tomasz Bursztyka Committed by Carles Cufi
Browse files

drivers: Apply SPI API change to relevant places



Mostly drivers, but also one sample and one test.

Signed-off-by: default avatarTomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
parent f8cc93de
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -130,8 +130,7 @@ static const struct device *spi_dev;

static struct spi_config spi_conf = {
	.frequency = DT_INST_PROP(0, spi_max_frequency),
	.operation = (SPI_OP_MODE_MASTER | SPI_TRANSFER_MSB | SPI_WORD_SET(8) |
		      SPI_LINES_SINGLE),
	.operation = (SPI_OP_MODE_MASTER | SPI_TRANSFER_MSB | SPI_WORD_SET(8)),
	.slave     = 0,
	.cs        = NULL,
};
+1 −2
Original line number Diff line number Diff line
@@ -430,8 +430,7 @@ static const struct ssd1306_config ssd1306_config = {
	.bus = I2C_DT_SPEC_INST_GET(0),
#elif DT_INST_ON_BUS(0, spi)
	.bus = SPI_DT_SPEC_INST_GET(
		0, SPI_OP_MODE_MASTER | SPI_TRANSFER_MSB |
		SPI_WORD_SET(8) | SPI_LINES_SINGLE, 0),
		0, SPI_OP_MODE_MASTER | SPI_TRANSFER_MSB | SPI_WORD_SET(8), 0),
	.data_cmd = GPIO_DT_SPEC_INST_GET(0, data_cmd_gpios),
#endif
	.reset = GPIO_DT_SPEC_INST_GET_OR(0, reset_gpios, { 0 })
+1 −1
Original line number Diff line number Diff line
@@ -669,7 +669,7 @@ static const struct flash_driver_api spi_flash_at45_api = {
	static const struct spi_flash_at45_config inst_##idx##_config = {    \
		.bus = SPI_DT_SPEC_INST_GET(				     \
			idx, SPI_OP_MODE_MASTER | SPI_TRANSFER_MSB |	     \
			SPI_WORD_SET(8) | SPI_LINES_SINGLE, 0),		     \
			SPI_WORD_SET(8), 0),				     \
		IF_ENABLED(INST_HAS_RESET_GPIO(idx),			\
			(.reset = &reset_##idx,))			\
		IF_ENABLED(INST_HAS_WP_GPIO(idx),			\
+1 −2
Original line number Diff line number Diff line
@@ -378,8 +378,7 @@ static int mcp23s17_init(const struct device *dev)
		.bus = SPI_DT_SPEC_INST_GET(				 \
			inst,						 \
			SPI_OP_MODE_MASTER | SPI_MODE_CPOL |		 \
			SPI_MODE_CPHA | SPI_WORD_SET(8) |		 \
			SPI_LINES_SINGLE, 0),				 \
			SPI_MODE_CPHA | SPI_WORD_SET(8), 0),		 \
	};								 \
									 \
	static struct mcp23s17_drv_data mcp23s17_##inst##_drvdata = {	 \
+1 −2
Original line number Diff line number Diff line
@@ -32,8 +32,7 @@ LOG_MODULE_REGISTER(lpd880x);
 */
#define LPD880X_SPI_OPERATION (SPI_OP_MODE_MASTER | \
			       SPI_TRANSFER_MSB |   \
			       SPI_WORD_SET(8) |    \
			       SPI_LINES_SINGLE)
			       SPI_WORD_SET(8))

struct lpd880x_config {
	struct spi_dt_spec bus;
Loading