Skip to content

Commit 1fe3de3

Browse files
yezhonghui2024Donny9
authored andcommitted
sim/spi: delete invaild cs change with ioctl transfer
delete invaild cs Signed-off-by: yezhonghui <[email protected]>
1 parent b64b63b commit 1fe3de3

File tree

1 file changed

+4
-21
lines changed

1 file changed

+4
-21
lines changed

arch/sim/src/sim/posix/sim_linuxspi.c

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -194,27 +194,10 @@ static int linux_spi_lock(struct spi_dev_s *dev, bool lock)
194194
static void linux_spi_select(struct spi_dev_s *dev, uint32_t devid,
195195
bool selected)
196196
{
197-
if (!selected)
198-
{
199-
struct linux_spi_dev_s *priv = (struct linux_spi_dev_s *)dev;
200-
201-
/* Some members of struct spi_ioc_transfer transfer_data is default 0:
202-
* @speed_hz = 0, thus it's ignored, MAX_SEPPD_HZ will be used.
203-
* @bits_per_word = 0, thus it's ignored, BITS_PER_WORD will be used.
204-
* @delay_usecs = 0, thus thers's no delay before next transfer.
205-
*/
206-
207-
struct spi_ioc_transfer transfer_data =
208-
{
209-
.tx_buf = (unsigned long)NULL,
210-
.rx_buf = (unsigned long)NULL,
211-
.len = 0,
212-
.cs_change = false,
213-
};
214-
215-
host_uninterruptible(ioctl, priv->file, SPI_IOC_MESSAGE(1),
216-
&transfer_data);
217-
}
197+
/**
198+
* linux kernel not supported cs changed command, so the map is not fitting
199+
* and it will send len zero to impact transmission, now we delete it
200+
* */
218201
}
219202

220203
/****************************************************************************

0 commit comments

Comments
 (0)