On Tue, Oct 04, 2016 at 11:56:05PM +0200, Hauke Mehrtens wrote: > On 10/04/2016 05:13 AM, Mark Brown wrote: > >> +static void hw_finish_message(const struct intel_ssc_spi *spi) > >> +{ > >> + /* Disable interrupts */ > >> + intel_ssc_spi_writel(spi, 0, SPI_IRNEN); > >> + > >> + /* Disable transmitter and receiver */ > >> + intel_ssc_spi_maskl(spi, 0, SPI_CON_TXOFF | SPI_CON_RXOFF, SPI_CON); > >> +} > > This needs to be done per message or just when the hardware idles? > I can not find anything suggesting that this is needed after every > message, just when the hardware is idle we should do it. Make it an unprepare_transfer_hardware() then and let the core figure out when to call it. > Thanks for the hint, I will set bits_per_word_mask. Then I do not have > to manually check if the mask is supported any more, is that correct? Yes. > >> +static int intel_ssc_spi_transfer_one_message(struct spi_master *master, > >> + struct spi_message *msg) > > Why not implement transfer_one()? This seems to just duplicate the > > standard implementation. > Yes I will look into this. The chip documentation says that we should > not change the clock while a chip select is active becasue this could be > interpreed as data by the device. How should I handle the speed_hz > member in the transfer? Return an error (you need to do that regardless of open coding or not).
Attachment:
signature.asc
Description: PGP signature