linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/4] iio: vcnl4000: add support for vcnl4200
@ 2018-07-25 15:18 Tomas Novotny
  2018-07-25 15:18 ` [PATCH v3 1/4] iio: vcnl4000: make the driver extendable Tomas Novotny
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Tomas Novotny @ 2018-07-25 15:18 UTC (permalink / raw)
  To: linux-iio
  Cc: Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
	Peter Meerwald-Stadler, Tomas Novotny

From: Tomas Novotny <tomas@novotny.cz>

VCNL4200 is another proximity and ambient light sensor from Vishay. I'm
adding support for that sensor to vcnl4000 driver, which currently supports
VCNL4000/10/20.

The VCNL4200 is a bit different from VCNL4000/10/20. Common things are:
- integrated proximity and ambient light sensor
- SMBus compatible I2C interface
- Vishay VCNL4xxx series...

Different things are:
- totally different register map
- 8-bit vs. 16-bit registers. The 16-bit values are in two 8-bit registers
  on VCNL4000. 16-bit value is in one register on VCNL4200.
- VCNL4000 has flags when the measurement is finished
- blocking read is implemented for vcnl4200 (there is no 'ready' flag, just
  interrupts)

It is tested on VCNL4020 and VCNL4200.

Changes in v3:
- improve commit message of 2/4 (clearly state that it is groundwork for
  another change)
- add vcnl4020 device id to the list of supported ids

Changes in v2:
- reading light and proximity values for vcnl4200 is blocking (if you
  request new value too early)
- patches 2 and 3 were added; original patch 2 is now patch 4
- vcnl4010 id is handled (patch 2)
- warn user on incorrect usage of vcnl40{0,1}0 id (patch 3)
- minor stuff (add parenthesis, switch instead of if, rename sensors to
  channels, fix return)

Tomas Novotny (4):
  iio: vcnl4000: make the driver extendable
  iio: vcnl4000: add VCNL4010 and VCNL4020 device id
  iio: vcnl4000: warn on incorrectly specified device id
  iio: vcnl4000: add support for VCNL4200

 drivers/iio/light/Kconfig    |   5 +-
 drivers/iio/light/vcnl4000.c | 220 ++++++++++++++++++++++++++++++++++++++-----
 2 files changed, 197 insertions(+), 28 deletions(-)

-- 
2.12.3

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-07-29 13:06 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-25 15:18 [PATCH v3 0/4] iio: vcnl4000: add support for vcnl4200 Tomas Novotny
2018-07-25 15:18 ` [PATCH v3 1/4] iio: vcnl4000: make the driver extendable Tomas Novotny
2018-07-29 11:20   ` Jonathan Cameron
2018-07-25 15:18 ` [PATCH v3 2/4] iio: vcnl4000: add VCNL4010 and VCNL4020 device id Tomas Novotny
2018-07-29 11:35   ` Jonathan Cameron
2018-07-25 15:18 ` [PATCH v3 3/4] iio: vcnl4000: warn on incorrectly specified " Tomas Novotny
2018-07-29 11:35   ` Jonathan Cameron
2018-07-25 15:18 ` [PATCH v3 4/4] iio: vcnl4000: add support for VCNL4200 Tomas Novotny
2018-07-29 11:36   ` Jonathan Cameron

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).