Re: [PATCH] iio: buffer-dma: Expose data available

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/05/2017 07:11 PM, Matthew Fornero wrote:
> On Tue, Dec 5, 2017 at 10:08 AM Lars-Peter Clausen <lars@xxxxxxxxxx> wrote:
>>> What about the case when the data_available element in
>>> iio_buffer_access_funcs is undefined (e.g. industrialio-buffer-cb)?
>>> Do we modify iio_buffer_data_available() to return 0, do we make the
>>> sysfs function return -ENOENT or -EINVAL, or simply not expose the sysfs
>>> interface for this case?
>>
>> The callback buffer does not support any of the interfaces required for the
>> userspace facing side. E.g. there is no read() callback.
>>
>> For proper support of the userspace interfaces data_available() is required,
>> otherwise read() would never return. So I think this is fine, we'd never
>> register the userspacing interface if it didn't have the data_available
>> callback.
> 
> So there should already be provisions in place for *not* registering the
> cb buffer with user-space, meaning no additional logic would be required
> for exposing / not exposing a "data_available" sysfs attribute, correct?

Yes.
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux