[PATCH v7 04/14] spi: cadence: Provide a capability structure

Miquel Raynal miquel.raynal at bootlin.com
Mon Jan 3 01:18:06 PST 2022


Hello,

boris.brezillon at collabora.com wrote on Mon, 3 Jan 2022 09:38:19 +0100:

> On Tue, 21 Dec 2021 17:35:00 +0530
> Pratyush Yadav <p.yadav at ti.com> wrote:
> 
> > > 
> > > Anyway, do you mind if we move forward first? Not that I don't think
> > > that this choice should be discussed further, but I think this can
> > > easily be changed in the near future if there is a desire to
> > > reorganize spi-mem objects. In fact, these capabilities are accessed
> > > through a helper so that hypothetic change would be almost transparent.    
> > 
> > Okay. I would still like to hear other opinions on this, but fine by me 
> > if you want to take this in as-is.  
> 
> I think we discussed that with Miquel, and I remember complaining about
> mixing function pointers and actual data in the spi_mem_ops struct, but
> honestly, it's just cosmetic concern, and I don't think it matters much
> in practice. So I'm fine either way, make it a field of spi_controller
> or spi_mem_ops, spi_mem is definitely not the right place though.

Yeah, I don't like the idea of leaking spi-mem information into the spi
controller structure, while there is a structure (so far only
containing hooks) that is dedicated to spi-mem operations. Extending
this structure to contain capabilities appeared the right choice to me.
But on the other hand this is a controller information anyway so if you
both prefer moving this data into the SPI controller structure I'll find
a way to do it.

Thanks,
Miquèl



More information about the linux-mtd mailing list