I have a customized SPI driver that pulses some GPIOs to handshake with the SPI master.
On a 4.1.15 kernel the driver can pulse a GPIO line and the timing is consistent when bus frequency scaling is enabled.
Am now using a 5.10.72 kernel and I see consistent timing when bus frequency scaling is disabled, but
once I enable it, the GPIO signal pulses can vary by 20-50us and this is causing problems on the SPI master.
Is there a way I can disable bus frequency scaling when the driver is busy with a transfer or otherwise achieve the timing that I was seeing on the 4.1 kernel?
The bus frequency scaling is needed to reduce power consumption.
The pulse routines are implemented like this:
local_irq_save(flags);
gpiod_set_value(s->gpio_cts, 0);
udelay(3);
gpiod_set_value(s->gpio_cts, 1);
local_irq_restore(flags);
Thanks