Dear Greg, dear Daniel, Thank you for your suggestions, I will port the driver to IIO layer as you suggested and then get back (may take some days). I will also use git-send-mail, since that seems to be the best way to do it. Am 24.03.16 um 16:52 schrieb Daniel Baluta:
On Thu, Mar 24, 2016 at 5:02 PM, Johannes Thoma <johannes@johannesthoma.com> wrote:
From 56e8f71c990b92c28a8cb03d859880eab8d06a3d Mon Sep 17 00:00:00 2001 From: Johannes Thoma <johannes@johannesthoma.com> Date: Mon, 21 Mar 2016 22:11:01 +0100 Subject: [PATCH] HC-SRO4 ultrasonic distance sensor driver
The HC-SRO4 is an ultrasonic distance sensor attached to two GPIO pins. The driver is controlled via sysfs and supports an (in theory) unlimited number of HC-SRO4 devices.
Unlike user land solutions this driver produces precise results even when there is high load on the system. It uses a non-blocking interrupt triggered mechanism to record the length of the echo signal.
Add link to datasheet.
One location is: http://www.micropik.com/PDF/HCSR04.pdf
This patch is against the raspberry pi kernel from https://github.com/raspberrypi/linux.git hash e481b5ceae6c94c7e60f8bb8591cbb362806246e
Note that this patch isn't meant for lkml (yet) see: TODO's:
.) Patch against mainline (or whatever kernel it belongs to) .) Use IIO layer instead of creating random sysfs entries.
So, why aren't you directly using IIO? :)
I will but I just got the hint from greg that I should do so (didn't know about it ;). all the best, - Johannes