From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Subject: Re: [PATCH] iio: buffer-dma: Expose data available To: Jonathan Cameron , mfornero@gmail.com Cc: linux-iio@vger.kernel.org, Matt Fornero References: <1512161180-30116-1-git-send-email-mfornero@gmail.com> <20171202115257.5e561988@archlinux> From: Lars-Peter Clausen Message-ID: Date: Tue, 5 Dec 2017 10:32:08 +0100 MIME-Version: 1.0 In-Reply-To: <20171202115257.5e561988@archlinux> Content-Type: text/plain; charset=utf-8 List-ID: On 12/02/2017 12:52 PM, Jonathan Cameron wrote: > On Fri, 1 Dec 2017 15:46:20 -0500 > mfornero@gmail.com wrote: > >> From: Matt Fornero >> >> Add a sysfs attribute that exposes the buffer data available to >> userspace. This attribute can be checked at runtime to determine the >> overall buffer fill level (across all allocated DMA buffers). >> >> Signed-off-by: Matt Fornero > > Seems sensible to me. > > Lars? I guess one question is whether this should be generic. iio_dma_buffer_data_available() is a generic function and not specific to the DMA buffers, so it would work just fine for FIFO based buffers as well.