lkml.org 
[lkml]   [2020]   [Jan]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Subjectvcnl3020 hwmon/proximity driver
From
Date
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.

\
 
 \ /
  Last update: 2020-01-28 12:33    [W:2.178 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site