linux/Documentation/devicetree/bindings/mfd/iqs62x.yaml
Jeff LaBundy d8a3c488c6 dt-bindings: Add bindings for Azoteq IQS620A/621/622/624/625
This patch adds device tree bindings for the Azoteq IQS620A, IQS621,
IQS622, IQS624 and IQS625 multi-function sensors.

A total of three bindings are presented (one MFD and two child nodes);
they are submitted as a single patch because the child node bindings
have no meaning in the absence of the MFD binding.

Signed-off-by: Jeff LaBundy <jeff@labundy.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2020-03-27 08:25:33 +00:00

180 lines
5.2 KiB
YAML

# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/mfd/iqs62x.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Azoteq IQS620A/621/622/624/625 Multi-Function Sensors
maintainers:
- Jeff LaBundy <jeff@labundy.com>
description: |
The Azoteq IQS620A, IQS621, IQS622, IQS624 and IQS625 multi-function sensors
integrate multiple sensing technologies in a single package.
Link to datasheets: https://www.azoteq.com/
properties:
compatible:
enum:
- azoteq,iqs620a
- azoteq,iqs621
- azoteq,iqs622
- azoteq,iqs624
- azoteq,iqs625
reg:
maxItems: 1
interrupts:
maxItems: 1
firmware-name:
$ref: /schemas/types.yaml#/definitions/string
description:
Specifies the name of the calibration and configuration file selected by
the driver. If this property is omitted, the name is chosen based on the
device name with ".bin" as the extension (e.g. iqs620a.bin for IQS620A).
keys:
$ref: ../input/iqs62x-keys.yaml
pwm:
$ref: ../pwm/iqs620a-pwm.yaml
required:
- compatible
- reg
- interrupts
additionalProperties: false
examples:
- |
/*
* Dual capacitive buttons with proximity-activated function, unipolar lid
* switch and panel-mounted LED.
*/
#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
iqs620a@44 {
compatible = "azoteq,iqs620a";
reg = <0x44>;
interrupt-parent = <&gpio>;
interrupts = <17 IRQ_TYPE_LEVEL_LOW>;
keys {
compatible = "azoteq,iqs620a-keys";
linux,keycodes = <KEY_SELECT>,
<KEY_MENU>,
<KEY_OK>,
<KEY_MENU>;
hall-switch-south {
linux,code = <SW_LID>;
azoteq,use-prox;
};
};
iqs620a_pwm: pwm {
compatible = "azoteq,iqs620a-pwm";
#pwm-cells = <2>;
};
};
};
pwmleds {
compatible = "pwm-leds";
panel {
pwms = <&iqs620a_pwm 0 1000000>;
max-brightness = <255>;
};
};
- |
/* Single inductive button with bipolar dock/tablet-mode switch. */
#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
iqs620a@44 {
compatible = "azoteq,iqs620a";
reg = <0x44>;
interrupt-parent = <&gpio>;
interrupts = <17 IRQ_TYPE_LEVEL_LOW>;
firmware-name = "iqs620a_coil.bin";
keys {
compatible = "azoteq,iqs620a-keys";
linux,keycodes = <0>,
<0>,
<0>,
<0>,
<0>,
<0>,
<KEY_MUTE>;
hall-switch-north {
linux,code = <SW_DOCK>;
};
hall-switch-south {
linux,code = <SW_TABLET_MODE>;
};
};
};
};
- |
/* Dual capacitive buttons with volume knob. */
#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
iqs624@44 {
compatible = "azoteq,iqs624";
reg = <0x44>;
interrupt-parent = <&gpio>;
interrupts = <17 IRQ_TYPE_LEVEL_LOW>;
keys {
compatible = "azoteq,iqs624-keys";
linux,keycodes = <BTN_0>,
<0>,
<BTN_1>,
<0>,
<0>,
<0>,
<0>,
<0>,
<0>,
<0>,
<0>,
<0>,
<0>,
<0>,
<KEY_VOLUMEUP>,
<KEY_VOLUMEDOWN>;
};
};
};
...