Re: Adding MAX1363 to BBB

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

 



On 31/08/15 17:01, Greg Wilson-Lindberg wrote:
>  
> 
>> -----Original Message-----
>> From: Michael Welling [mailto:mwelling79@xxxxxxxxx] On Behalf 
>> Of Michael Welling
>> Sent: Friday, August 28, 2015 5:32 PM
>> To: Greg Wilson-Lindberg
>> Cc: linux-iio@xxxxxxxxxxxxxxx
>> Subject: Re: Adding MAX1363 to BBB
>>
>> On Fri, Aug 28, 2015 at 04:56:20PM -0700, Greg Wilson-Lindberg wrote:
>>>
>>> I've got the system running, but I get an invalid argument 
>> error on the call to iio_buffer_refill().  I'm basically 
>> using the same code as for the tsadc, just added in a fourth 
>> channel, and none of the setup calls are returning errors, 
>> but the first iio_buffer_refill() call returns an error.  
>> I've dumped out the parameter that is being passed to the 
>> iio_buffer_refill() call and it is the same as the value that 
>> was returned from the iio_device_create_buffer() call.
>>>
>>> I've looked at the libiio source and I don't see anything 
>> obvious that should return invalid argument for the 
>> iio_buffer_refill() call.
>>>
>>
>> I believe that you need to register an interrupt for buffered 
>> access to work.
>>
>> Do you have an interrupt connected and registered?
>>
> 
> Nope, no interrupt.  So I guess I would need to ask, how would I register the interrupt in the Device Tree?
The max1363 (and similar) don't have a dataready interrupt as they
are clocked of the actual clock cycles of the i2c transfers.  So
they only read on demand.

> 
> Or, alternatively, can I just get individual readings through IIO?
Either via sysfs, or by adding a sysfs trigger and poking that.
To add a sysfs trigger you'll need to probe the module, then poke
a number into the add_trigger attribute to create a trigger which can
then be associated with the max1363 (as normal).

Then to 'fire' the trigger write to the trigger_now attribute of the
relevant trigger.

Ideally Daniel will be back soonish with a final version of the
high resolution timer trigger that would also work well here.
(it's rather tied up with some configfs support which wis
trickier!).

Jonathan
>  --
> 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
> 

--
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