kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: johannes@johannesthoma.com (Johannes Thoma)
To: kernelnewbies@lists.kernelnewbies.org
Subject: HC-SRO4 ultrasonic distance driver
Date: Thu, 24 Mar 2016 11:38:45 +0100	[thread overview]
Message-ID: <56F3C3B5.6060808@johannesthoma.com> (raw)

Hi all,

I wrote a driver for the popular HC-SRO4 ultrasonic distance sensor. It 
is beta and has been tested
on the Raspberry PI by me and my brother: here is the stand-alone repo:

?https://github.com/johannesthoma/linux-hc-sro4

I would like to contribute it to the linux kernel, however I am a little 
bit nervous reading through
the Documentation/Submitting[Patches][Drivers] documentation (in 
particular the How to piss off
a kernel developer sections ;), so I wanted to ask if I could post the 
patch (it will be against the
char/mics device kernel tree at 
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
, I think this is the correct location) on this list first, maybe 
someone can tell me if the formatting
and the driver are correct..

I also have some driver specific questions:

*) First, does it really belong to drivers/misc ? There are other 
sensors there as well, so I suppose
this location is right.

*) As of now, I've created a new device class "distance" where the sysfs 
control files live in (so
the configuration file is /sys/class/distance/configure ), it works for 
me (tm) but I don't know
if code that creates new device classes would be accepted. Is there 
another solution to put
the control files in? Maybe under /sys/class/gpio?

*) I've filled out the parent device field in 
device_create_with_groups() to NULL, I'm not sure if this
is right. If I put a parent, should it be the GPIO device (the HC_SRO4 
is attached to two GPIO pins)?

*) When I submit the patch, I've read that one should cc the maintainers 
(that would be Arnd Bergmann <arnd@arndb.de> and Greg Kroah-Hartman 
<gregkh@linuxfoundation.org>) but on what list should
I post the patch at all? Is it lkml.org?

Please let me know if it ok to post the patch to this list first.

Thanks a lot,

- Johannes

             reply	other threads:[~2016-03-24 10:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-24 10:38 Johannes Thoma [this message]
2016-03-24 14:07 ` HC-SRO4 ultrasonic distance driver Greg KH
2016-03-24 14:33   ` Johannes Thoma

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56F3C3B5.6060808@johannesthoma.com \
    --to=johannes@johannesthoma.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).