2 * Copyright (c) 2011 The Chromium OS Authors.
4 * SPDX-License-Identifier: GPL-2.0+
12 int spi_set_wordlen(struct spi_slave *slave, unsigned int wordlen)
14 if (wordlen == 0 || wordlen > 32) {
15 printf("spi: invalid wordlen %u\n", wordlen);
19 slave->wordlen = wordlen;
24 void *spi_do_alloc_slave(int offset, int size, unsigned int bus,
31 struct spi_slave *slave;
33 memset(ptr, '\0', size);
34 slave = (struct spi_slave *)(ptr + offset);
37 slave->wordlen = SPI_DEFAULT_WORDLEN;