iio: jsa1212: Add JSA1212 proximity/ALS sensor
v6 cover iio: jsa1212: Add JSA1212 proximity/ALS sensor
Please let me know your review comments.
PATCH v6 changes:
Addressed comments from Peter & Hartmut. Mainly,
1. Removed duplicate header files
2. Renamed IRDR settings macro names
3. Simplified endian conversion expression
4. Refactored the code in many sections to remove unncessary breaks statements and returns.
5. Renamed jsa1212 priv data variable name in probe function.
PATCH v5 changes:
1. Removed irq.h and interrupt.h.
2. Disabled the device under error condition when reading data.
3. Added TODO and slave address info in file header.
PATCH v4 changes:
1. Removed unused register defines
2. Used standard endian conversion function instead of custom one.
3. Replaced register default value constants with appropriate bit value macros.
4. Removed iio user interfaces before powering off the device in remove function.
PATCH v3 changes:
1. Replaced status flags with bool values.
2. Added regmap suppport to avoid adding custom i2c register update routine.
3. Also addressed some minor comments from Jonathan Cameron
PATCH v2 changes:
1. Combined ALS/PXS enable/disable functions into a single routine.
2. Removed extra debug messages.
3. Also addressed review comments from Peter Meerwald
Kuppuswamy Sathyanarayanan (1):
iio: jsa1212: Add JSA1212 proximity/ALS sensor
drivers/iio/light/Kconfig | 10 + drivers/iio/light/Makefile | 1 + drivers/iio/light/jsa1212.c | 470 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 481 insertions(+) create mode 100644 drivers/iio/light/jsa1212.c
Signature · 1 line
1.9.1
PATCH v6 1/1 iio: jsa1212: Add JSA1212 proximity/ALS sensor
This patch adds a new driver for solteam opto JSA1212 proximity and ambient light sensor.
Basic details of the chip can be found here.
http://www.solteamopto.com.tw/detail.php?ms=3&po_unit=2&pt_unit=29&p_unit=120
--- drivers/iio/light/Kconfig | 10 + drivers/iio/light/Makefile | 1 + drivers/iio/light/jsa1212.c | 470 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 481 insertions(+) create mode 100644 drivers/iio/light/jsa1212.c
drivers/iio/light/Kconfig +10 -0
@@ -99,6 +99,16 @@ config HID_SENSOR_PROX To compile this driver as a module, choose M here: the module will be called hid-sensor-prox. +config JSA1212 + tristate "JSA1212 ALS and proximity sensor driver" + depends on I2C + help + Say Y here if you want to build a IIO driver for JSA1212 + proximity & ALS sensor device. + + To compile this driver as a module, choose M here: + the module will be called jsa1212. + config SENSORS_LM3533 tristate "LM3533 ambient light sensor" depends on MFD_LM3533
drivers/iio/light/Makefile +1 -0
@@ -11,6 +11,7 @@ obj-$(CONFIG_GP2AP020A00F) += gp2ap020a00f.o obj-$(CONFIG_HID_SENSOR_ALS) += hid-sensor-als.o obj-$(CONFIG_HID_SENSOR_PROX) += hid-sensor-prox.o obj-$(CONFIG_ISL29125) += isl29125.o +obj-$(CONFIG_JSA1212) += jsa1212.o obj-$(CONFIG_SENSORS_LM3533) += lm3533-als.o obj-$(CONFIG_LTR501) += ltr501.o obj-$(CONFIG_SENSORS_TSL2563) += tsl2563.o
drivers/iio/light/jsa1212.c new file +470 -0
470 lines not on this page · raw message
Signature · 1 line
1.9.1