Skip to contentSkip to conversation

LTR301 ALS support

PATCH Superseded Kuppuswamy Sathyanarayanan 1 participant 2 messages Apr 11, 2015 IIO

v5 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

v5 cover LTR301 ALS support

Following patch adds support for Liteon 301 Ambient light sensor.

Please let me know your review comments.

v1:
Extended LTR501 driver to support both LTR301 and LTR501 device.

v2:
1. Handled device id NULL case in probe
2. Changed pr_warn to dev_warn

v3:
1. Sent v2 before by mistake. So sending the final version of v2 as v3.

v4:
1. Addressed minor comments from Peter Meerwald
2. Changed invalid chip id errno from ENOSYS to ENODEV
3. Fixed channel id index number
4. Removed unused variable.

v5:
1. Rebased this patch on top of Daniel's LTR559 patchset
(http://marc.info/?l=linux-kernel&m=142779827617036&w=2)
2. Added info and channel members to chip_info struture.

Kuppuswamy Sathyanarayanan (1):
iio: ltr301: Add support for ltr301

 drivers/iio/light/Kconfig  |  2 +-
 drivers/iio/light/ltr501.c | 99 +++++++++++++++++++++++++++++++++-------------
 2 files changed, 72 insertions(+), 29 deletions(-)
Signature · 1 line
1.9.1
#1 lore raw

PATCH v5 1/1 iio: ltr301: Add support for ltr301

Added support for Liteon 301 Ambient light sensor. Since LTR-301 and LTR-501 are register compatible(and even have same part id), LTR-501 driver has been extended to support both devices. LTR-501 is similar to LTR-301 in ALS sensing, But the only difference is, LTR-501 also supports proximity sensing.

LTR-501 - ALS + Proximity combo
LTR-301 - ALS sensor.

---
 drivers/iio/light/Kconfig  |  2 +-
 drivers/iio/light/ltr501.c | 99 +++++++++++++++++++++++++++++++++-------------
 2 files changed, 72 insertions(+), 29 deletions(-)
drivers/iio/light/Kconfig +1 -1
index a224afd..215e4a3 100644
@@ -159,7 +159,7 @@ config LTR501
 	select IIO_TRIGGERED_BUFFER
 	help
 	 If you say yes here you get support for the Lite-On LTR-501ALS-01
-	 ambient light and proximity sensor.
+	 ambient light and proximity sensor or LTR-301 ambient light sensor.
 
 	 This driver can also be built as a module.  If so, the module
          will be called ltr501.
drivers/iio/light/ltr501.c +71 -28

165 lines not on this page · raw message

Signature · 1 line
1.9.1