Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/iio/light/capella,cm3605.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006 
0007 title:
0008   Capella Microsystems CM3605 Ambient Light and Short Distance Proximity Sensor
0009 
0010 maintainers:
0011   - Linus Walleij <linus.walleij@linaro.org>
0012   - Kevin Tsai <ktsai@capellamicro.com>
0013 
0014 description: |
0015   The CM3605 is an entirely analog part. However, it requires quite a bit of
0016   software logic to interface a host operating system.
0017 
0018   This ALS and proximity sensor was one of the very first deployed in mobile
0019   handsets, notably it is used in the very first Nexus One Android phone from
0020   2010.
0021 
0022 properties:
0023   compatible:
0024     const: capella,cm3605
0025 
0026   aset-gpios:
0027     maxItems: 1
0028     description:
0029       ASET line (drive low to activate the ALS, should be flagged
0030       GPIO_ACTIVE_LOW)
0031 
0032   interrupts:
0033     maxItems: 1
0034     description:
0035       Connected to the POUT (proximity sensor out) line. The edge
0036       detection must be set to IRQ_TYPE_EDGE_BOTH so as to detect
0037       movements toward and away from the proximity sensor.
0038 
0039   io-channels:
0040     maxItems: 1
0041     description:
0042       ADC channel used for converting the voltage from AOUT to a digital
0043       representation.
0044 
0045   io-channel-names:
0046     const: aout
0047 
0048   vdd-supply: true
0049 
0050   capella,aset-resistance-ohms:
0051     enum: [50000, 100000, 300000, 600000]
0052     description: >
0053       Sensitivity calibration resistance. Note that calibration curves
0054       are only provided for specific allowed values. Default: 100 kOhms.
0055 
0056 required:
0057   - compatible
0058   - aset-gpios
0059   - interrupts
0060   - io-channels
0061   - io-channel-names
0062 
0063 additionalProperties: false
0064 
0065 examples:
0066   - |
0067     #include <dt-bindings/gpio/gpio.h>
0068     #include <dt-bindings/interrupt-controller/irq.h>
0069     light-sensor {
0070         compatible = "capella,cm3605";
0071         vdd-supply = <&foo_reg>;
0072         aset-gpios = <&foo_gpio 1 GPIO_ACTIVE_LOW>;
0073         capella,aset-resistance-ohms = <100000>;
0074         interrupts = <1 IRQ_TYPE_EDGE_BOTH>;
0075         io-channels = <&adc 0x01>;
0076         io-channel-names = "aout";
0077     };
0078 ...