Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adi: ad4020: Add reset_buffer convenience decorator
Functions that need to write to the device may fail if there is an active (enabled) IIO buffer at the moment. That's because the same physical SPI lines cannot both provide data to the host controller and receive configuration at the same time. Driver developers (and the Linux IIO subsystem) prevent such concurrent access by locking a mutex and not allowing buffered readings until configuration transfers end. Conversely, attempts to do direct transfers while a buffer is enabled return -EBUSY. Decorate functions that do direct device access to reset (and disable) the read buffer, thus allowing the device configuration to happen. Signed-off-by: Marcelo Schmitt <[email protected]>
- Loading branch information