[PATHC/RFC v3] gp2ap020a00f ambient light/proximity sensor

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This driver supports:
 - reading channels in 'one shot' mode through read_raw callback,
 - four events - rising and falling ambient light events and 
   rising and falling proximity roc events.
 - triggers for all the three channels (triggers can't be enabled
   simultaneosly with proximity detection event)


This is a follow-up of the previous patch and it includes
following improvements (Jonathan and Peter - thanks for the review):
  - changed "Opto" to "ALS" in the driver description
  - switched from HZ to jiffies units for the GP2AP020A00F_DATA_READY_TIMEOUT
  - added proximity detection falling event
  - added lookup table of register settings for different opmodes
  - switched to using regmap
  - added debugfs reg_addr and reg_val attributes
  - switched to using proximity detection/non detection device
    functionality for the proximity events (single event is generated
    upon crossing high and low thresholds)
  - adjusting lux mode depending on the light clear output value

Issues:
  - WARNING: at kernel/irq/handle.c:146 on call to iio_trigger_poll
  - how to deal with the scale value that changes depending on the output
    value?

Thanks,
Jacek

Jacek Anaszewski (1):
  iio: gp2ap020a00f: Add a driver for the device

 .../devicetree/bindings/iio/light/gp2ap020a00f.txt |   20 +
 drivers/iio/light/Kconfig                          |   12 +
 drivers/iio/light/Makefile                         |    1 +
 drivers/iio/light/gp2ap020a00f.c                   | 1547 ++++++++++++++++++++
 4 files changed, 1580 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/iio/light/gp2ap020a00f.txt
 create mode 100644 drivers/iio/light/gp2ap020a00f.c

-- 
1.7.5.4

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux