Skip to content

Commit fdfece9

Browse files
Chenhongrenjhedberg
authored andcommitted
drivers: spi: it8xxx2: remove cs gpio support
This commit removes gpio-based cs support as it8xxx2 spi only supports transactions using the dedicated cs pin. Signed-off-by: Ren Chen <[email protected]>
1 parent b694f03 commit fdfece9

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

drivers/spi/spi_it8xxx2.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,7 @@ static void spi_it8xxx2_complete(const struct device *dev, const int status)
210210
struct spi_context *ctx = &data->ctx;
211211

212212
spi_context_complete(ctx, dev, status);
213-
if (spi_cs_is_gpio(ctx->config)) {
214-
spi_context_cs_control(ctx, false);
215-
}
213+
216214
/* Permit to enter power policy and idle mode. */
217215
pm_policy_state_lock_put(PM_STATE_STANDBY, PM_ALL_SUBSTATES);
218216
chip_permit_idle();
@@ -328,10 +326,6 @@ static int spi_it8xxx2_next_xfer(const struct device *dev)
328326
return 0;
329327
}
330328

331-
if (spi_cs_is_gpio(ctx->config)) {
332-
spi_context_cs_control(ctx, true);
333-
}
334-
335329
if (spi_context_longest_current_buf(ctx) > SPI_CMDQ_DATA_LEN_MAX) {
336330
return -EINVAL;
337331
}
@@ -522,7 +516,7 @@ static DEVICE_API(spi, spi_it8xxx2_driver_api) = {
522516
static struct spi_it8xxx2_data spi_it8xxx2_data_##n = { \
523517
SPI_CONTEXT_INIT_LOCK(spi_it8xxx2_data_##n, ctx), \
524518
SPI_CONTEXT_INIT_SYNC(spi_it8xxx2_data_##n, ctx), \
525-
SPI_CONTEXT_CS_GPIOS_INITIALIZE(DT_DRV_INST(n), ctx)}; \
519+
}; \
526520
\
527521
DEVICE_DT_INST_DEFINE(n, &spi_it8xxx2_init, NULL, &spi_it8xxx2_data_##n, \
528522
&spi_it8xxx2_cfg_##n, POST_KERNEL, \

0 commit comments

Comments
 (0)