From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1B160C2D0D2 for ; Wed, 18 Dec 2019 23:52:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E110E2465E for ; Wed, 18 Dec 2019 23:52:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576713177; bh=wbRaZtzUbckUTqVMcTXbqO3o2lKJ7/fUsmejmRSH5jw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=TZazqL2tZ8ys32gqUJ4DGVOs+mgFLKDyAsVtjhJvY5ST/uCYfcSqInyecX9RrzlYN uSkY04XZ3ufu47uAN6SxgQcD/oG/+Q8Lp3tYNhzqujQyZ5XTOQnYHT7DTGtnEcdaTF IGs7WPn6H5ZodCtyvXd8isClzyfnQPFcAbQD0X6E= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726616AbfLRXw4 (ORCPT ); Wed, 18 Dec 2019 18:52:56 -0500 Received: from mail-ot1-f67.google.com ([209.85.210.67]:43255 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726561AbfLRXw4 (ORCPT ); Wed, 18 Dec 2019 18:52:56 -0500 Received: by mail-ot1-f67.google.com with SMTP id p8so4619877oth.10; Wed, 18 Dec 2019 15:52:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=upTnIcIu5vXgr/U3LW+h6pgWAnb1nRIxYnJwMc85zdo=; b=LXpsiD4oTKbrYqn8/GHCGICohWfGDI30nIOme0JHO5Vkl7mU1a2n/2DAW/TKCQbxZg WguUtlX69KI1MM9JB/EAkLwYwTvjU/1zwCjJj/5bsJ6DI9vXVNE8oqbZpQ7Lv3cMv2Nc 1DDmiB0f77TzCLqk3AWkp9FDCIwWg6mjT2gN8M3opjHbBlCaBALzRzjA7Y2IBkFHaAHe cSEdTV/D73rYElK2J1sWcx2Fh7dSVJjBg0FKjwD9QJnSp4Antgn0JDiwbIcJje74gcQf g2xgVCET5KT+maK1KlAvEDhlnxu32fPvh8HRj+hJfOBa8QI/WVaFSIuit1tC+tHVKzLw 1+hw== X-Gm-Message-State: APjAAAXNmwm/bcntuXGk0n8pzMOwvdZf45A83SpeaW20mNK9TIx5lNVe Ca0lmpP49m9VqXfBf9RGLQ== X-Google-Smtp-Source: APXvYqyyri2C2KUfkCWtaDSlXF3NDr5pX9GjBMF7k4cC2tFr+H6V5d6jbaP0Cat8KCIYFYChKIS/yA== X-Received: by 2002:a05:6830:20cf:: with SMTP id z15mr5461285otq.277.1576713173789; Wed, 18 Dec 2019 15:52:53 -0800 (PST) Received: from localhost (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id 4sm1457087otu.0.2019.12.18.15.52.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Dec 2019 15:52:53 -0800 (PST) Date: Wed, 18 Dec 2019 17:52:52 -0600 From: Rob Herring To: Jeff LaBundy Cc: "lee.jones@linaro.org" , "dmitry.torokhov@gmail.com" , "thierry.reding@gmail.com" , "jic23@kernel.org" , "devicetree@vger.kernel.org" , "linux-input@vger.kernel.org" , "u.kleine-koenig@pengutronix.de" , "linux-pwm@vger.kernel.org" , "knaack.h@gmx.de" , "lars@metafoo.de" , "pmeerw@pmeerw.net" , "linux-iio@vger.kernel.org" , "mark.rutland@arm.com" Subject: Re: [PATCH v2 1/7] dt-bindings: Add bindings for Azoteq IQS620A/621/622/624/625 Message-ID: <20191218235252.GA19438@bogus> References: <1575851866-18919-1-git-send-email-jeff@labundy.com> <1575851866-18919-2-git-send-email-jeff@labundy.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1575851866-18919-2-git-send-email-jeff@labundy.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Mon, Dec 09, 2019 at 12:38:32AM +0000, Jeff LaBundy wrote: > 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 > --- > Changes in v2: > - Removed "prox" child node and moved "keys" and "pwm" child nodes to their > own bindings > - Replaced linux,fw-file property with more common firmware-name property > - Converted all bindings to YAML Good job for first go. > > .../devicetree/bindings/input/iqs62x-keys.yaml | 126 +++++++++++++++ > Documentation/devicetree/bindings/mfd/iqs62x.yaml | 177 +++++++++++++++++++++ > .../devicetree/bindings/pwm/iqs620a-pwm.yaml | 30 ++++ > 3 files changed, 333 insertions(+) > create mode 100644 Documentation/devicetree/bindings/input/iqs62x-keys.yaml > create mode 100644 Documentation/devicetree/bindings/mfd/iqs62x.yaml > create mode 100644 Documentation/devicetree/bindings/pwm/iqs620a-pwm.yaml A couple of minor things below. With those fixed: Reviewed-by: Rob Herring > > diff --git a/Documentation/devicetree/bindings/input/iqs62x-keys.yaml b/Documentation/devicetree/bindings/input/iqs62x-keys.yaml > new file mode 100644 > index 0000000..e9b54e0 > --- /dev/null > +++ b/Documentation/devicetree/bindings/input/iqs62x-keys.yaml > @@ -0,0 +1,126 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/input/iqs62x-keys.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Azoteq IQS620A/621/622/624/625 Keys and Switches > + > +maintainers: > + - Jeff LaBundy > + > +description: | > + The Azoteq IQS620A, IQS621, IQS622, IQS624 and IQS625 multi-function sensors > + feature a variety of self-capacitive, mutual-inductive and Hall-effect sens- > + ing capabilities that can facilitate a variety of contactless key and switch > + applications. > + > + These functions are collectively represented by a "keys" child node from the > + parent MFD driver. See Documentation/devicetree/bindings/mfd/iqs62x.yaml for > + further details and examples. Sensor hardware configuration (self-capacitive > + vs. mutual-inductive, etc.) is selected based on the device's firmware. > + > +properties: > + compatible: > + enum: > + - azoteq,iqs620a-keys > + - azoteq,iqs621-keys > + - azoteq,iqs622-keys > + - azoteq,iqs624-keys > + - azoteq,iqs625-keys > + > + linux,keycodes: > + allOf: > + - $ref: /schemas/types.yaml#/definitions/uint32-array > + - minItems: 1 > + maxItems: 16 > + description: | > + Specifies the numeric keycodes associated with each available touch or > + proximity event according to the following table. An 'x' indicates the > + event is supported for a given device. Specify 0 for unused events. > + > + ------------------------------------------------------------------------- > + | # | Event | IQS620A | IQS621 | IQS622 | IQS624 | IQS625 | > + ------------------------------------------------------------------------- > + | 0 | CH0 Touch | x | x | x | x | x | > + | | Antenna 1 Touch* | x | | | | | > + ------------------------------------------------------------------------- > + | 1 | CH0 Proximity | x | x | x | x | x | > + | | Antenna 1 Prox.* | x | | | | | > + ------------------------------------------------------------------------- > + | 2 | CH1 Touch | x | x | x | x | x | > + | | Ant. 1 Deep Touch* | x | | | | | > + ------------------------------------------------------------------------- > + | 3 | CH1 Proximity | x | x | x | x | x | > + ------------------------------------------------------------------------- > + | 4 | CH2 Touch | x | | | | | > + ------------------------------------------------------------------------- > + | 5 | CH2 Proximity | x | | | | | > + | | Antenna 2 Prox.* | x | | | | | > + ------------------------------------------------------------------------- > + | 6 | Metal (+) Touch** | x | x | | | | > + | | Ant. 2 Deep Touch* | x | | | | | > + ------------------------------------------------------------------------- > + | 7 | Metal (+) Prox.** | x | x | | | | > + | | Antenna 2 Touch* | x | | | | | > + ------------------------------------------------------------------------- > + | 8 | Metal (-) Touch** | x | x | | | | > + ------------------------------------------------------------------------- > + | 9 | Metal (-) Prox.** | x | x | | | | > + ------------------------------------------------------------------------- > + | 10 | SAR Active*** | x | | x | | | > + ------------------------------------------------------------------------- > + | 11 | SAR Quick Rel.*** | x | | x | | | > + ------------------------------------------------------------------------- > + | 12 | SAR Movement*** | x | | x | | | > + ------------------------------------------------------------------------- > + | 13 | SAR Filter Halt*** | x | | x | | | > + ------------------------------------------------------------------------- > + | 14 | Wheel Up | | | | x | | > + ------------------------------------------------------------------------- > + | 15 | Wheel Down | | | | x | | > + ------------------------------------------------------------------------- > + * Two-channel SAR. Replaces CH0-2 plus metal touch and proximity events > + if enabled via firmware. > + ** "+" and "-" refer to the polarity of a channel's delta (LTA - counts), > + where "LTA" is defined as the channel's long-term average. > + *** One-channel SAR. Replaces CH0-2 touch and proximity events if enabled > + via firmware. > + > +required: > + - compatible > + - linux,keycodes Add: additionalProperties: false > + > +if: > + properties: > + compatible: > + contains: > + enum: > + - azoteq,iqs620a-keys > + - azoteq,iqs621-keys > + - azoteq,iqs622-keys > +then: > + patternProperties: > + "^hall-switch-(north|south)$": > + type: object > + description: > + Represents north/south-field Hall-effect sensor touch or proximity > + events. Note that north/south-field orientation is reversed on the > + IQS620AXzCSR device due to its flip-chip package. > + > + properties: > + linux,code: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: Numeric switch code associated with the event. > + > + azoteq,use-prox: > + $ref: /schemas/types.yaml#/definitions/flag > + description: > + If present, specifies that Hall-effect sensor reporting should > + use the device's wide-range proximity threshold instead of its > + close-range touch threshold (default). > + > + required: > + - linux,code > + > +... > diff --git a/Documentation/devicetree/bindings/mfd/iqs62x.yaml b/Documentation/devicetree/bindings/mfd/iqs62x.yaml > new file mode 100644 > index 0000000..24e6004 > --- /dev/null > +++ b/Documentation/devicetree/bindings/mfd/iqs62x.yaml > @@ -0,0 +1,177 @@ > +# 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 > + > +description: | > + The Azoteq IQS620A, IQS621, IQS622, IQS624 and IQS625 multi-function sensors > + integrate multiple sensing technologies in a single package. > + > + Link to data sheets: 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 Add: additionalProperties: false > + > +examples: > + - | > + /* > + * Dual capacitive buttons with additional "air button," unipolar lid > + * switch and panel-mounted LED. > + */ > + #include > + #include > + > + 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 = , > + , > + , > + ; > + > + hall-switch-south { > + linux,code = ; > + 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 > + #include > + > + 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>, > + ; > + > + hall-switch-north { > + linux,code = ; > + }; > + > + hall-switch-south { > + linux,code = ; > + }; > + }; > + }; > + }; > + > + - | > + /* Dual capacitive buttons with volume knob. */ > + #include > + #include > + > + 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 = , > + <0>, > + , > + <0>, > + <0>, > + <0>, > + <0>, > + <0>, > + <0>, > + <0>, > + <0>, > + <0>, > + <0>, > + <0>, > + , > + ; > + }; > + }; > + }; > + > +... > diff --git a/Documentation/devicetree/bindings/pwm/iqs620a-pwm.yaml b/Documentation/devicetree/bindings/pwm/iqs620a-pwm.yaml > new file mode 100644 > index 0000000..6b7aaef > --- /dev/null > +++ b/Documentation/devicetree/bindings/pwm/iqs620a-pwm.yaml > @@ -0,0 +1,30 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/pwm/iqs620a-pwm.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Azoteq IQS620A PWM Generator > + > +maintainers: > + - Jeff LaBundy > + > +description: | > + The Azoteq IQS620A multi-function sensor generates a fixed-frequency PWM > + output represented by a "pwm" child node from the parent MFD driver. See > + Documentation/devicetree/bindings/mfd/iqs62x.yaml for further details as > + well as an example. > + > +properties: > + compatible: > + enum: > + - azoteq,iqs620a-pwm > + > + "#pwm-cells": > + const: 2 > + > +required: > + - compatible > + - "#pwm-cells" Add: additionalProperties: false > + > +... > -- > 2.7.4 >