1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
4 $id: http://devicetree.org/schemas/iio/light/sharp,gp2ap002.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Sharp GP2AP002A00F and GP2AP002S00F proximity and ambient light sensors
10 - Linus Walleij <linus.walleij@linaro.org>
13 Proximity and ambient light sensor with IR LED for the proximity
14 sensing and an analog output for light intensity. The ambient light
15 sensor output is not available on the GP2AP002S00F variant.
28 description: an interrupt for proximity, usually a GPIO line
31 description: VDD power supply a phandle to a regulator
34 description: VIO power supply a phandle to a regulator
38 description: ALSOUT ADC channel to read the ambient light
43 sharp,proximity-far-hysteresis:
44 $ref: /schemas/types.yaml#/definitions/uint8
46 Hysteresis setting for "far" object detection, this setting is
47 device-unique and adjust the optical setting for proximity detection
48 of a "far away" object in front of the sensor.
50 sharp,proximity-close-hysteresis:
51 $ref: /schemas/types.yaml#/definitions/uint8
53 Hysteresis setting for "close" object detection, this setting is
54 device-unique and adjust the optical setting for proximity detection
55 of a "close" object in front of the sensor.
61 - sharp,proximity-far-hysteresis
62 - sharp,proximity-close-hysteresis
66 #include <dt-bindings/interrupt-controller/irq.h>
73 compatible = "sharp,gp2ap002a00f";
75 interrupts = <18 IRQ_TYPE_EDGE_FALLING>;
76 vdd-supply = <&vdd_regulator>;
77 vio-supply = <&vio_regulator>;
78 io-channels = <&adc_channel>;
79 io-channel-names = "alsout";
80 sharp,proximity-far-hysteresis = /bits/ 8 <0x2f>;
81 sharp,proximity-close-hysteresis = /bits/ 8 <0x0f>;