linux-hwmon.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ivan Mikhaylov <i.mikhaylov@yadro.com>
To: unlisted-recipients:; (no To-header on input)
Cc: Jonathan Cameron <jic23@kernel.org>,
	Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	Jean Delvare <jdelvare@suse.com>,
	Guenter Roeck <linux@roeck-us.net>, <linux-hwmon@vger.kernel.org>,
	<linux-iio@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	Ivan Mikhaylov <i.mikhaylov@yadro.com>
Subject: vcnl3020 hwmon/proximity driver
Date: Tue, 28 Jan 2020 14:31:49 +0300	[thread overview]
Message-ID: <cb21d1285e04a8a7a3817398629431f69aeebf2f.camel@yadro.com> (raw)

Hello, I want to make driver for vcnl3020 but not sure where should I put it.
It's similar to vcnl40xx series which is already in iio/light/vcnl4000.c
but it perfectly fits with hwmon intrusion detection concept
(intrusion[0-*]_alarm), so I'm a little bit confused.

vcnl3020 - proximity sensor which mostly using for intrusion detection
vcnl4020 - light and proximity sensor

Doc's links:
https://www.vishay.com/docs/84150/vcnl3020.pdf
https://www.vishay.com/docs/83476/vcnl4020.pdf

That's what I think about possible ways:

1. just iio/proximity/vcnl3020.c
2. extend functionality inside vcnl4000.c with ifdefs and dts stuff and maybe
   rename it with generalization inside
3. hwmon driver for intrusion detection inside drivers/hwmon
4. both iio/proximity/vcnl3020.c and hwmon/vcnl3020.c
   Example: hwmon/wm8350-hwmon.c + mfd/wm8350-core.c
   So, just make proximity driver, do the depend in Kconfig for hwmon driver
   on proximity driver and use proximity driver calls if would be needed.

Maybe there any other good ways to deal with it? I'd be prefer 4.

Thanks.


             reply	other threads:[~2020-01-28 11:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-28 11:31 Ivan Mikhaylov [this message]
2020-01-28 13:22 ` vcnl3020 hwmon/proximity driver Guenter Roeck
2020-01-28 15:31   ` Ivan Mikhaylov
2020-01-28 16:28     ` Guenter Roeck

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=cb21d1285e04a8a7a3817398629431f69aeebf2f.camel@yadro.com \
    --to=i.mikhaylov@yadro.com \
    --cc=jdelvare@suse.com \
    --cc=jic23@kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=pmeerw@pmeerw.net \
    /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).