iio:light: Add Dyna-Image AP3223 ambient light and proximity driver
Subsystems (2)
PATCH v2 1/2 iio:light: Add Dyna-Image AP3223 ambient light and proximity driver
Minimal implementation with support for raw light and proximity reading.
This is based on the driver provided by the vendor
(which was an input driver). Authors of the
driver from the vendor included
* John Huang <[email protected]>
* Templeton Tsai <[email protected]>
* Vic Lee <[email protected]>
v2
* Using regmap framework
* Error handling
* Code cleanups following comments
--- drivers/iio/light/Kconfig | 11 + drivers/iio/light/Makefile | 1 + drivers/iio/light/ap3223.c | 706 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 718 insertions(+) create mode 100644 drivers/iio/light/ap3223.c
drivers/iio/light/Kconfig +11 -0
@@ -27,6 +27,17 @@ config AL3320A To compile this driver as a module, choose M here: the module will be called al3320a. +config AP3223 + tristate "AP3223 ambient light and proximity sensor" + depends on I2C + select REGMAP_I2C + help + Say Y here if you want to build a driver for the Dyna Image AP3223 + ambient light and proximity sensor. + + To compile this driver as a module, choose M here: the + module will be called ap3223. + config APDS9300 tristate "APDS9300 ambient light sensor" depends on I2C
drivers/iio/light/Makefile +1 -0
@@ -5,6 +5,7 @@ # When adding new entries keep the list in alphabetical order obj-$(CONFIG_ADJD_S311) += adjd_s311.o obj-$(CONFIG_AL3320A) += al3320a.o +obj-$(CONFIG_AP3223) += ap3223.o obj-$(CONFIG_APDS9300) += apds9300.o obj-$(CONFIG_CM32181) += cm32181.o obj-$(CONFIG_CM3232) += cm3232.o
drivers/iio/light/ap3223.c new file +706 -0
706 lines not on this page · raw message
Signature · 1 line
2.6.0.rc2.230.g3dd15c0
PATCH v2 2/2 iio:light:tsl2563: Add DT support
* Add Device Tree support for the Dyna Image AP3223 ambient light sensor and
* proximity driver,
* Document the binding and
* Add a vendor prefix for Dyna Image
v2
* Seperating the device tree changes from code
--- Documentation/devicetree/bindings/iio/light/ap3223.txt | 18 ++++++++++++++++++ Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 2 files changed, 19 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/light/ap3223.txt
Documentation/devicetree/bindings/iio/light/ap3223.txt new file +18 -0
@@ -0,0 +1,18 @@ +* Dyna Image AP3223 ambient light sensor and proximity sensor + +http://www.dyna-image.com/english/product/optical-sensor-detail.php?cpid=2&dpid=8 + +Required properties: + + - compatible : should be "dynaimage,ap3223" + - reg : the I2C address of the sensor + +Example: + +ap3223@1c { + compatible = "dynaimage,ap3223"; + reg = <0x1c>; + + pinctrl-0 = <&ap3223_pins>; + pinctrl-names = "default"; +};
Documentation/devicetree/bindings/vendor-prefixes.txt +1 -0
@@ -46,6 +46,7 @@ digilent Diglent, Inc. dlg Dialog Semiconductor dlink D-Link Corporation dmo Data Modul AG +dynaimage Dyna-Image ebv EBV Elektronik edt Emerging Display Technologies elan Elan Microelectronic Corp.
Signature · 1 line
2.6.0.rc2.230.g3dd15c0
Re: [PATCH v2 2/2] iio:light:tsl2563: Add DT support
Quoted 2 lines · Suresh Rajashekara
* Add Device Tree support for the Dyna Image AP3223 ambient light sensor
and
Quoted 8 lines
* proximity driver,
* Document the binding and
* Add a vendor prefix for Dyna Imagev2
* Seperating the device tree changes from codeSigned-off-by Suresh Rajashekara <[email protected]>
Please ignore this patch. I have a typo in subject. Will fix and resubmit
Suresh
Re: [PATCH v2 2/2] iio:light:tsl2563: Add DT support
In reply to Suresh RajashekaraHello Suresh,
Quoted 4 lines
* Add Device Tree support for the Dyna Image AP3223 ambient light sensor and
* proximity driver,
* Document the binding and
* Add a vendor prefix for Dyna Image
the mail's subject line should read something like
iio: light: Add AP3223 DT support
tsl2563 is a different driver
Quoted 2 lines
v2
* Seperating the device tree changes from code
Separating
Quoted 45 lines
Signed-off-by Suresh Rajashekara <[email protected]>--- Documentation/devicetree/bindings/iio/light/ap3223.txt | 18 ++++++++++++++++++ Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 2 files changed, 19 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/light/ap3223.txtDocumentation/devicetree/bindings/iio/light/ap3223.txt new file +18
-0@@ -0,0 +1,18 @@ +* Dyna Image AP3223 ambient light sensor and proximity sensor + +http://www.dyna-image.com/english/product/optical-sensor-detail.php?cpid=2&dpid=8 + +Required properties: + + - compatible : should be "dynaimage,ap3223" + - reg : the I2C address of the sensor + +Example: + +ap3223@1c { + compatible = "dynaimage,ap3223"; + reg = <0x1c>; + + pinctrl-0 = <&ap3223_pins>; + pinctrl-names = "default"; +};Documentation/devicetree/bindings/vendor-prefixes.txt +1
-0@@ -46,6 +46,7 @@ digilent Diglent, Inc. dlg Dialog Semiconductor dlink D-Link Corporation dmo Data Modul AG +dynaimage Dyna-Image ebv EBV Elektronik edt Emerging Display Technologies elan Elan Microelectronic Corp.
Signature · 2 lines
Peter Meerwald +43-664-2444418 (mobile)