On 12/13/24 11:44 AM, Miquel Raynal wrote: > Hi Tudor, > > On 11/11/2024 at 13:42:31 GMT, Tudor Ambarus <tudor.ambarus@xxxxxxxxxx> wrote: > >> On 10/25/24 5:14 PM, Miquel Raynal wrote: >>> Every ->exec_op() call correctly configures the spi bus speed to the >>> maximum allowed frequency for the memory using the constant spi default >>> parameter. Since we can now have per-operation constraints, let's use >>> the value that comes from the spi-mem operation structure instead. In >>> case there is no specific limitation for this operation, the default spi >>> device value will be given anyway. >>> >>> The per-operation frequency capability is thus advertised to the spi-mem >>> core. >> >> I see the driver sets ctrl->min_speed_hz = SPIFC_A1_MIN_HZ; >> >> Do you want to introduce a struct spi_controller_mem_ops.supports_op and >> check that the spimem op freq is not below the controller's minimum freq? > > I was about to do that but I think we can do better. I am already tuning > the max frequency depending on the op. I can just check in the default > supports_op hook that the operation max frequency is not below the > controller's minimum. So all drivers with this kind of limitation will > be covered. > Sounds good!