Re: [PATCH v1 1/5] dt-bindings: iio: light: Document Avago APDS9900/9901 ALS/Proximity sensor

From: David Lechner

Date: Sat Apr 18 2026 - 12:22:39 EST


On 4/18/26 9:47 AM, Svyatoslav Ryhel wrote:
> Document Avago APDS-9900/9901 combined ALS/IR-LED/Proximity sensor.

I think we can just add this to iio/light/tsl2772.yaml. It already has
avago,apds9930 which looks similar.

>
> Signed-off-by: Svyatoslav Ryhel <clamor95@xxxxxxxxx>
> ---
> .../bindings/iio/light/avago,apds9900.yaml | 83 +++++++++++++++++++
> 1 file changed, 83 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/iio/light/avago,apds9900.yaml
>
> diff --git a/Documentation/devicetree/bindings/iio/light/avago,apds9900.yaml b/Documentation/devicetree/bindings/iio/light/avago,apds9900.yaml
> new file mode 100644
> index 000000000000..f5fb79439e56
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/light/avago,apds9900.yaml
> @@ -0,0 +1,83 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/iio/light/avago,apds9900.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Avago APDS-9900/9901 combined ALS/IR-LED/Proximity sensor
> +
> +maintainers:
> + - Svyatoslav Ryhel <clamor95@xxxxxxxxx>
> +
> +description: |
> + The APDS-9900/9901 provides digital ambient light sensing (ALS),
> + IR LED and a complete proximity detection system in a single
> + 8 pin package over I2C interface.
> + Datasheet at https://docs.broadcom.com/doc/AV02-2867EN
> +
> +properties:
> + compatible:
> + enum:
> + - avago,apds9900
> + - avago,apds9901
> +
> + reg:
> + maxItems: 1
> +
> + interrupts:
> + maxItems: 1
> +
> + vdd-supply: true
> +
> + avago,pdrive-microamp:

In tsl2772, this is called led-max-microamp.

> + description:
> + The LED drive current is controlled by a regulated current
> + sink on the LDR pin. This feature eliminates the need to use
> + a current limiting resistor to control LED current. The LED
> + drive current can be configured for 12.5 mA, 25 mA, 50 mA
> + or 100 mA. For higher LED drive requirements, an external
> + P type transistor can be used to control the LED current.
> + enum: [12500, 25000, 50000, 100000]
> + default: 100000
> +
> + avago,ppcount:

This sounds like something that should be programmed at runtime, not
fixed to a single value in the devicetree. One can easily imaging an
application where the sensitivity needs to be changed as the environment
changes.

> + $ref: /schemas/types.yaml#/definitions/uint32
> + description:
> + The number of LED pulses can be programmed to a value of 1 to
> + 255 pulses as needed. Increasing the number of LED pulses at a
> + given current will increase the sensor sensitivity. Sensitivity
> + grows by the square root of the number of pulses. Each pulse
> + has a 16 mS period.
> + minimum: 1
> + maximum: 255
> + default: 1
> +