brintos

brintos / linux-shallow public Read only

0
0
Text · 2.3 KiB · f8a932b Raw
88 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)2%YAML 1.23---4$id: http://devicetree.org/schemas/iio/light/sharp,gp2ap002.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Sharp GP2AP002A00F and GP2AP002S00F proximity and ambient light sensors8 9maintainers:10  - Linus Walleij <linus.walleij@linaro.org>11 12description: |13  Proximity and ambient light sensor with IR LED for the proximity14  sensing and an analog output for light intensity. The ambient light15  sensor output is not available on the GP2AP002S00F variant.16 17properties:18  compatible:19    enum:20      - sharp,gp2ap002a00f21      - sharp,gp2ap002s00f22 23  reg:24    maxItems: 125 26  interrupts:27    maxItems: 128    description: an interrupt for proximity, usually a GPIO line29 30  vdd-supply:31    description: VDD power supply a phandle to a regulator32 33  vio-supply:34    description: VIO power supply a phandle to a regulator35 36  io-channels:37    maxItems: 138    description: ALSOUT ADC channel to read the ambient light39 40  io-channel-names:41    const: alsout42 43  sharp,proximity-far-hysteresis:44    $ref: /schemas/types.yaml#/definitions/uint845    description: |46      Hysteresis setting for "far" object detection, this setting is47      device-unique and adjust the optical setting for proximity detection48      of a "far away" object in front of the sensor.49 50  sharp,proximity-close-hysteresis:51    $ref: /schemas/types.yaml#/definitions/uint852    description: |53      Hysteresis setting for "close" object detection, this setting is54      device-unique and adjust the optical setting for proximity detection55      of a "close" object in front of the sensor.56 57required:58  - compatible59  - reg60  - interrupts61  - sharp,proximity-far-hysteresis62  - sharp,proximity-close-hysteresis63 64additionalProperties: false65 66examples:67  - |68    #include <dt-bindings/interrupt-controller/irq.h>69 70    i2c {71      #address-cells = <1>;72      #size-cells = <0>;73 74      light-sensor@44 {75        compatible = "sharp,gp2ap002a00f";76        reg = <0x44>;77        interrupts = <18 IRQ_TYPE_EDGE_FALLING>;78        vdd-supply = <&vdd_regulator>;79        vio-supply = <&vio_regulator>;80        io-channels = <&adc_channel>;81        io-channel-names = "alsout";82        sharp,proximity-far-hysteresis = /bits/ 8 <0x2f>;83        sharp,proximity-close-hysteresis = /bits/ 8 <0x0f>;84      };85    };86 87...88