summaryrefslogtreecommitdiffstats
path: root/block/fops.c
diff options
context:
space:
mode:
authorMichael Walle <michael@walle.cc>2022-02-26 21:45:07 +0100
committerLinus Walleij <linus.walleij@linaro.org>2022-03-15 01:55:59 +0100
commit1f3c85c22db4aecee4080d42fccc336a1bbc5da7 (patch)
tree6aabda675761326837365f62969847842401f3b7 /block/fops.c
parent2560c681999c9d33eb32b208de6a607622867c95 (diff)
downloadlinux-stable-1f3c85c22db4aecee4080d42fccc336a1bbc5da7.tar.gz
linux-stable-1f3c85c22db4aecee4080d42fccc336a1bbc5da7.tar.bz2
linux-stable-1f3c85c22db4aecee4080d42fccc336a1bbc5da7.zip
pinctrl: microchip-sgpio: wait until output is actually set
Right now, when a gpio value is set, the actual hardware pin gets set asynchronously. When linux write the output register, it takes some time until it is actually propagated to the output shift registers. If that output port is connected to an I2C mux for example, the linux driver assumes the I2C bus is already switched although it is not. Fortunately, there is a single shot mode with a feedback: you can trigger the single shot and the hardware will clear that bit once it has finished the clocking and strobed the load signal of the shift registers. This can take a considerable amount of time though. Measuremens have shown that it takes up to a whole burst cycle gap which is about 50ms on the largest setting. Therefore, we have to mark the output bank as sleepable. To avoid unnecessary waiting, just trigger the single shot if the value was actually changed. Signed-off-by: Michael Walle <michael@walle.cc> Link: https://lore.kernel.org/r/20220226204507.2511633-6-michael@walle.cc Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'block/fops.c')
0 files changed, 0 insertions, 0 deletions