Path: blob/master/Documentation/devicetree/bindings/iio/light/sharp,gp2ap002.yaml
26309 views
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)1%YAML 1.22---3$id: http://devicetree.org/schemas/iio/light/sharp,gp2ap002.yaml#4$schema: http://devicetree.org/meta-schemas/core.yaml#56title: Sharp GP2AP002A00F and GP2AP002S00F proximity and ambient light sensors78maintainers:9- Linus Walleij <linus.walleij@linaro.org>1011description: |12Proximity and ambient light sensor with IR LED for the proximity13sensing and an analog output for light intensity. The ambient light14sensor output is not available on the GP2AP002S00F variant.1516properties:17compatible:18enum:19- sharp,gp2ap002a00f20- sharp,gp2ap002s00f2122reg:23maxItems: 12425interrupts:26maxItems: 127description: an interrupt for proximity, usually a GPIO line2829vdd-supply:30description: VDD power supply a phandle to a regulator3132vio-supply:33description: VIO power supply a phandle to a regulator3435io-channels:36maxItems: 137description: ALSOUT ADC channel to read the ambient light3839io-channel-names:40const: alsout4142sharp,proximity-far-hysteresis:43$ref: /schemas/types.yaml#/definitions/uint844description: |45Hysteresis setting for "far" object detection, this setting is46device-unique and adjust the optical setting for proximity detection47of a "far away" object in front of the sensor.4849sharp,proximity-close-hysteresis:50$ref: /schemas/types.yaml#/definitions/uint851description: |52Hysteresis setting for "close" object detection, this setting is53device-unique and adjust the optical setting for proximity detection54of a "close" object in front of the sensor.5556required:57- compatible58- reg59- interrupts60- sharp,proximity-far-hysteresis61- sharp,proximity-close-hysteresis6263additionalProperties: false6465examples:66- |67#include <dt-bindings/interrupt-controller/irq.h>6869i2c {70#address-cells = <1>;71#size-cells = <0>;7273light-sensor@44 {74compatible = "sharp,gp2ap002a00f";75reg = <0x44>;76interrupts = <18 IRQ_TYPE_EDGE_FALLING>;77vdd-supply = <&vdd_regulator>;78vio-supply = <&vio_regulator>;79io-channels = <&adc_channel>;80io-channel-names = "alsout";81sharp,proximity-far-hysteresis = /bits/ 8 <0x2f>;82sharp,proximity-close-hysteresis = /bits/ 8 <0x0f>;83};84};8586...878889