summaryrefslogtreecommitdiff
path: root/scripts/gdb/linux
diff options
context:
space:
mode:
authorThéo Lebrun <theo.lebrun@bootlin.com>2024-03-06 18:59:25 +0100
committerAndi Shyti <andi.shyti@kernel.org>2024-03-12 11:50:44 +0100
commit7489cd43a2ea26c963c422c08e943a4a616fdb15 (patch)
treed7917c7d85376333edf3f106449725486085f571 /scripts/gdb/linux
parenta9f5cd892354425dcba67692e0afe3af6a2b4b1f (diff)
i2c: nomadik: support short xfer timeouts using waitqueue & hrtimer
Replace the completion by a waitqueue for synchronization from IRQ handler to task. For short timeouts, use hrtimers, else use timers. Usecase: avoid blocking the I2C bus for too long when an issue occurs. The threshold picked is one jiffy: if timeout is below that, use hrtimers. This threshold is NOT configurable. Implement behavior but do NOT change fetching of timeout. This means the timeout is unchanged (200ms) and the hrtimer case will never trigger. A waitqueue is used because it supports both desired timeout approaches. See wait_event_timeout() and wait_event_hrtimeout(). An atomic boolean serves as synchronization condition. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Andi Shyti <andi.shyti@kernel.org> Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Diffstat (limited to 'scripts/gdb/linux')
0 files changed, 0 insertions, 0 deletions