[PATCH v4 04/16] spi: spi-mem: teach spi_mem_adjust_op_freq() about post-config ops

Miquel Raynal miquel.raynal at bootlin.com
Thu Jul 2 06:32:27 PDT 2026


Hi Santhosh,

On 18/06/2026 at 13:07:13 +0530, Santhosh Kumar K <s-k6 at ti.com> wrote:

> When a device exposes both a conservative base speed (spi-max-frequency)
> and a maximum post-configuration speed (spi-max-post-config-frequency),
> operations validated after controller configuration must run at the
> higher rate while all others are capped at the base rate.
>
> Extend spi_mem_adjust_op_freq() with a bypass: if op->max_freq equals
> post_config_max_speed_hz (the value written by execute_tuning on
> success), return immediately leaving op->max_freq unchanged. All other
> ops are capped to max_speed_hz, the always-reachable base rate. This
> integrates the policy into the single existing frequency-adjustment
> point so exec_op(), supports_op(), and calc_op_duration() all behave
> consistently.
>
> Signed-off-by: Santhosh Kumar K <s-k6 at ti.com>

Reviewed-by: Miquel Raynal <miquel.raynal at bootlin.com>



More information about the linux-mtd mailing list