On Wed, Jun 15, 2016 at 06:56:10PM -0400, Kamal Dasu wrote: > I was looking at spi_flash_read() caled from m25p80_read() and spi > core implementation. I have a case where when we have very small reads > or unaligned buffers and addresses passed then I have to fall back to > using standard MSPI reads. How best to handle this ?. One of the > options without having to replicate code involves a minor change to > m25p80 driver as shown below. That looks reasonable. Another option might be to provide a way for m25p80 to discover the constraints itself. > >> Currently not used. But I did not see a good way to be able to send > >> commands, like finding the ID, setting 3/4 byte addressing mode , quad > >> mode, on a PM resume(). Are you suggesting I make a driver similar to > >> m25p80 ?. > > I am suggesting you implement the standard flash interfaces and as a > > result directly use m25p80. > Are you suggesting to use something like spi_read_then_write() in > cases where I want to set the addressing and single/quad modes ?. Or an explicit series of transfers.