Re: ST driver - ad-hoc allocation of trigger interrupt

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

 




On 15 June 2015 16:04:58 BST, simon@xxxxxxxxxxxxx wrote:
>Hi all,
>A friend and I were attempting to get a LSM303DLHC breakout board
>hooked
>up to the expansion header on the RaspPi yesterday - it was him doing
>the
>work and me offering suggestions from afar (unfortunately the blind
>leading the blind)...
>
>Anyhow 'we' got reasonably far and could read raw value and trigger the
>buffer via the 'iio-sysfs-trig'. The problem came when we wanted the
>device to trigger itself at the set sample frequency.
>
>We infer that we need to connect the DRDY signal to a CPU interrupt
>line,
>but can't see how we tell the ST iio driver which one.
>
>I did find this is the source:
>https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/iio/common/st_sensors/st_sensors_trigger.c?id=refs/tags/v4.1-rc8#n21
>
>Which shows that the 'sdata->get_irq_data_ready()' can be pre-defined
>in
>the data structure passed on driver init. But how can we do that from
>the
>command line, or even a little script/app once the kernel is up and
>running?
>
>
>The story of our attempt is documented here:
>https://groups.google.com/forum/?hl=en#!topic/richards-tech-user-forum/BjQpWjTmims
>
>Any suggestions on how we can succeed?

Looks like you basically got there with the DT file at the end. Adhoc arrangements
 like this are often done with device tree overlays (which can be added to a
 running device). A quick Google suggests the raspberry pi uses these for standard hats.

Good luck.

Jonathan

>
>Many thanks,
>Simon.
>
>--
>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

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.
--
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