Path: blob/master/Documentation/devicetree/bindings/iio/light/capella,cm3605.yaml
26309 views
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)1%YAML 1.22---3$id: http://devicetree.org/schemas/iio/light/capella,cm3605.yaml#4$schema: http://devicetree.org/meta-schemas/core.yaml#56title:7Capella Microsystems CM3605 Ambient Light and Short Distance Proximity Sensor89maintainers:10- Linus Walleij <linus.walleij@linaro.org>11- Kevin Tsai <ktsai@capellamicro.com>1213description: |14The CM3605 is an entirely analog part. However, it requires quite a bit of15software logic to interface a host operating system.1617This ALS and proximity sensor was one of the very first deployed in mobile18handsets, notably it is used in the very first Nexus One Android phone from192010.2021properties:22compatible:23const: capella,cm36052425aset-gpios:26maxItems: 127description:28ASET line (drive low to activate the ALS, should be flagged29GPIO_ACTIVE_LOW)3031interrupts:32maxItems: 133description:34Connected to the POUT (proximity sensor out) line. The edge35detection must be set to IRQ_TYPE_EDGE_BOTH so as to detect36movements toward and away from the proximity sensor.3738io-channels:39maxItems: 140description:41ADC channel used for converting the voltage from AOUT to a digital42representation.4344io-channel-names:45const: aout4647vdd-supply: true4849capella,aset-resistance-ohms:50enum: [50000, 100000, 300000, 600000]51description: >52Sensitivity calibration resistance. Note that calibration curves53are only provided for specific allowed values. Default: 100 kOhms.5455required:56- compatible57- aset-gpios58- interrupts59- io-channels60- io-channel-names6162additionalProperties: false6364examples:65- |66#include <dt-bindings/gpio/gpio.h>67#include <dt-bindings/interrupt-controller/irq.h>68light-sensor {69compatible = "capella,cm3605";70vdd-supply = <&foo_reg>;71aset-gpios = <&foo_gpio 1 GPIO_ACTIVE_LOW>;72capella,aset-resistance-ohms = <100000>;73interrupts = <1 IRQ_TYPE_EDGE_BOTH>;74io-channels = <&adc 0x01>;75io-channel-names = "aout";76};77...787980