[PATCH] misc devices: HC-SRO4 ultrasonic distance driver

Daniel Baluta daniel.baluta at gmail.com
Thu Mar 24 11:52:50 EDT 2016


On Thu, Mar 24, 2016 at 5:02 PM, Johannes Thoma
<johannes at johannesthoma.com> wrote:
>  From 56e8f71c990b92c28a8cb03d859880eab8d06a3d Mon Sep 17 00:00:00 2001
> From: Johannes Thoma <johannes at 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.
>
> 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? :)

Also run ./scripts/checkpatch.pl --strict your.patch.

thanks,
Daniel.



More information about the Kernelnewbies mailing list