Re: [PATCH v4 3/8] spi: stm32: Add 'SPI_SIMPLEX_RX', 'SPI_3WIRE_RX' support for stm32f4

2020-05-25 Thread Mark Brown
On Sat, May 23, 2020 at 09:35:06AM +0800, dillon min wrote: > - if (ctlr->flags & (SPI_CONTROLLER_MUST_RX | SPI_CONTROLLER_MUST_TX)) { > + if ((ctlr->flags & (SPI_CONTROLLER_MUST_RX | SPI_CONTROLLER_MUST_TX)) > && > + !(msg->spi->mode & SPI_3WIRE)) { > ma

Re: [PATCH v4 3/8] spi: stm32: Add 'SPI_SIMPLEX_RX', 'SPI_3WIRE_RX' support for stm32f4

2020-05-23 Thread dillon min
On Fri, May 22, 2020 at 10:57 PM dillon min wrote: > > hi Mark, > > Thanks for reviewing. > > On Fri, May 22, 2020 at 7:36 PM Mark Brown wrote: > > > > On Mon, May 18, 2020 at 07:09:20PM +0800, dillon.min...@gmail.com wrote: > > > > > 2, use stm32 spi's "In full-duplex (BIDIMODE=0 and RXONLY=0)",

Re: [PATCH v4 3/8] spi: stm32: Add 'SPI_SIMPLEX_RX', 'SPI_3WIRE_RX' support for stm32f4

2020-05-23 Thread dillon min
hi Mark, Thanks for reviewing. On Fri, May 22, 2020 at 7:36 PM Mark Brown wrote: > > On Mon, May 18, 2020 at 07:09:20PM +0800, dillon.min...@gmail.com wrote: > > > 2, use stm32 spi's "In full-duplex (BIDIMODE=0 and RXONLY=0)", as tx_buf is > > null, we must add dummy data sent out before read da

Re: [PATCH v4 3/8] spi: stm32: Add 'SPI_SIMPLEX_RX', 'SPI_3WIRE_RX' support for stm32f4

2020-05-23 Thread dillon min
On Sat, May 23, 2020 at 12:29 AM Mark Brown wrote: > > On Fri, May 22, 2020 at 11:59:25PM +0800, dillon min wrote: > > > but, after spi-core create a dummy tx_buf or rx_buf, then i can't get > > the correct spi_3wire direction. > > actually, this dummy tx_buf is useless for SPI_3WIRE. it's has mea

Re: [PATCH v4 3/8] spi: stm32: Add 'SPI_SIMPLEX_RX', 'SPI_3WIRE_RX' support for stm32f4

2020-05-22 Thread Mark Brown
On Fri, May 22, 2020 at 11:59:25PM +0800, dillon min wrote: > but, after spi-core create a dummy tx_buf or rx_buf, then i can't get > the correct spi_3wire direction. > actually, this dummy tx_buf is useless for SPI_3WIRE. it's has meaning > for SPI_SIMPLE_RX mode, > simulate SPI_FULL_DUMPLEX Oh,

Re: [PATCH v4 3/8] spi: stm32: Add 'SPI_SIMPLEX_RX', 'SPI_3WIRE_RX' support for stm32f4

2020-05-22 Thread Mark Brown
On Mon, May 18, 2020 at 07:09:20PM +0800, dillon.min...@gmail.com wrote: > 2, use stm32 spi's "In full-duplex (BIDIMODE=0 and RXONLY=0)", as tx_buf is > null, we must add dummy data sent out before read data. > so, add stm32f4_spi_tx_dummy() to handle this situation. There are flags SPI_CONTROLLE

[PATCH v4 3/8] spi: stm32: Add 'SPI_SIMPLEX_RX', 'SPI_3WIRE_RX' support for stm32f4

2020-05-19 Thread dillon . minfei
From: dillon min in l3gd20 driver startup, there is a setup failed error return from stm32 spi driver " [2.687630] st-gyro-spi spi0.0: supply vdd not found, using dummy regulator [2.696869] st-gyro-spi spi0.0: supply vddio not found, using dummy regulator [2.7