Re: [PATCH 04/24] spi: amlogic-spifc-a1: Support per spi-mem operation frequency switches

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Thanks for the heads up!
Miquèl





[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux