Re: [RFC] Staging:IIO: New ABI

Kay Sievers
2010-01-20T16:40:28Z

On Wed, Jan 20, 2010 at 16:37, Greg KH <greg@kroah.com> wrote:
> On Wed, Jan 20, 2010 at 03:13:40PM +0000, Jonathan Cameron wrote:
>> What:        /sys/class/iio/ring_buffer[m]
>> Description:
>>               Link to /sys/class/iio/device[n]/ring_buffer[m]. Ring buffer
>>               numbering may not match that of device as some devices do not
>>               have ring buffers.
>
> Why is this link needed?  Why can't you just look in the device
> directory for a ring buffer?  And wouldn't the ring buffer be 1..n for
> every device?  They shouldn't be "unique" for all iio devices, that
> would be wierd.

I think with the hidden class kobject we successfully prevent any
custom links from being created there. :) The class sysfs layout does
not allow custom links added to its single directory, it confuses
userspace.

Jonathan, if you need anything like this, please consider using a
"bus_type", which has the proper userspace interface. The "class"
interface can not be extended to make such things possible.

Thanks,
Kay