Lines Matching +full:spi +full:- +full:cpol
8 * SPDX-License-Identifier: GPL-2.0+
12 #include <spi.h>
16 /*-----------------------------------------------------------------------
40 /*-----------------------------------------------------------------------
59 ss->mode = mode; in spi_setup_slave()
63 return &ss->slave; in spi_setup_slave()
81 * Make sure the SPI clock is in idle state as defined for in spi_claim_bus()
84 if (ss->mode & SPI_CPOL) in spi_claim_bus()
97 /*-----------------------------------------------------------------------
98 * SPI transfer
100 * This writes "bitlen" bits out the SPI MOSI port and simultaneously clocks
101 * "bitlen" bits in the SPI MISO port. That's just the way SPI works.
120 int cpol = ss->mode & SPI_CPOL; in spi_xfer() local
121 int cpha = ss->mode & SPI_CPHA; in spi_xfer()
125 slave->bus, slave->cs, *(uint *)txd, *(uint *)rxd, bitlen); in spi_xfer()
147 SPI_SCL(!cpol); in spi_xfer()
151 SPI_SCL(!cpol); in spi_xfer()
153 SPI_SCL(cpol); in spi_xfer()
159 SPI_SCL(cpol); in spi_xfer()
163 * bits over to left-justify them. Then store the last byte in spi_xfer()
168 tmpdin <<= 8 - (bitlen % 8); in spi_xfer()