Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1168135ybl; Wed, 8 Jan 2020 12:13:49 -0800 (PST) X-Google-Smtp-Source: APXvYqzehEgWP2K22MT8jItJFmaztzF2hsV5Cjg2xorvwM6WH8mMsZvsTVkPD8aGvhYbMNFDtGok X-Received: by 2002:aca:6108:: with SMTP id v8mr307222oib.96.1578514429604; Wed, 08 Jan 2020 12:13:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578514429; cv=none; d=google.com; s=arc-20160816; b=hp7+/3yPT8D+bnuYDtjxfCO3LBimJXeyTAcK6c4ttoKB95kAr7b/xl//tSzEHRehqo +jGwUxtD+go5epPNZ4wuAOHg66MQCRSG2BGdufpchwwCoQzglIcO4Da6C65xOjAnQ5oD p/VMWIsMhAfey1RJnjrGaGTtBlUKTfJc/IP/wVDLabpNxVwUWcb0YSGIBqM6AtoKnPC4 0E6Fm9FXyCQ09yoC4uW72rpk3PL3c40b7/jxmSJouisWj+p0IfU2lWW3d5C0sOREq2Ou gMEyXg2L2wfa54rWXgk3wYl57EmasTsVJqfZqS0yw7Km/eck4rw87K18ABaYl8vWwIEb 0QKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=k7+Uq6HkxozZICbgNkuKzFsXaFY2bmpVlgViuwauvZs=; b=cGXAVmtG7+PPFMyNq4pthbN1A5JgNiPZ84zQ6YD9iF7xFA6nQhKdtzaJLoHdhBtiVF bwW4n2WrbEmygGt51JrFMUalI4L4G8r4ScQoyVPmgOtJAvu25lVJejXPY6BcVWP0pDIS CwMCakXdd5CGjuKKE7L5MXis8Z4VpjV3TfVjGrMgsWJcTPW59ZmOEQ5xpvUOprpOwjJ0 b0sC2R8T59pUWk5Th6QuJ9eWJg1XxMzqq/I4yPRseNu55Pd3G7eZAYcg+ZBX/peb5WV9 yJccVIb7ohNX8uwc7HUkXDxBAvWqdPbdcgjCy+9DMsPSpGOcoXdd3S38EWaWHLQ1qzXx 31WA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b18si2332562oib.170.2020.01.08.12.13.37; Wed, 08 Jan 2020 12:13:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726694AbgAHUMb (ORCPT + 99 others); Wed, 8 Jan 2020 15:12:31 -0500 Received: from mail-oi1-f195.google.com ([209.85.167.195]:44766 "EHLO mail-oi1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726583AbgAHUMa (ORCPT ); Wed, 8 Jan 2020 15:12:30 -0500 Received: by mail-oi1-f195.google.com with SMTP id d62so3794443oia.11 for ; Wed, 08 Jan 2020 12:12:29 -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=k7+Uq6HkxozZICbgNkuKzFsXaFY2bmpVlgViuwauvZs=; b=ugqUWp62PdPRw/bmo3yzCFmORpSr6TbBWssPI3eX832SFqBLZcMVS93RK0NfQGlz6e J+iQlFiZabZHicWI8jozaQcjRf/ZAh+9VbJbw1B2amHTBFsXMb6vh+BZE//FizYdBZ8a ljS4fFs0Hllxei+zq6ZBCPpVLEbbnuJ0Ecol2YnogC6+o5257wrmmztfi5ZxfiKBo5dp r6NPmJibGUW3l6E9IkiQJ3p/4nPRQJ7LKhG+LNDXd3n641NAwaY6dXdRauBgmWatfA7c 8Hjg3A79FmDNMcuvLLkkgOKsQ2SR4LRaXs6GUjMaCYRX3X49aF6RTJO4nAOl2e9yz5zJ LX5Q== X-Gm-Message-State: APjAAAXlxsGTlzsIf8vvHdljomb7Ch8Fj6YB8JWdHHriZt87FLuMhaH4 ApRVt9I904QW+E7LstKfvy7Jgyc= X-Received: by 2002:aca:815:: with SMTP id 21mr324138oii.52.1578514348775; Wed, 08 Jan 2020 12:12:28 -0800 (PST) Received: from rob-hp-laptop (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id s145sm1419952oie.44.2020.01.08.12.12.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jan 2020 12:12:27 -0800 (PST) Received: from rob (uid 1000) (envelope-from rob@rob-hp-laptop) id 220333 by rob-hp-laptop (DragonFly Mail Agent v0.11); Wed, 08 Jan 2020 14:12:26 -0600 Date: Wed, 8 Jan 2020 14:12:26 -0600 From: Rob Herring To: Artur Rojek Cc: Dmitry Torokhov , Mark Rutland , Jonathan Cameron , Paul Cercueil , linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 4/5] dt-bindings: input: Add docs for ADC driven joystick. Message-ID: <20200108201226.GA10350@bogus> References: <20200105001639.142061-1-contact@artur-rojek.eu> <20200105001639.142061-4-contact@artur-rojek.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200105001639.142061-4-contact@artur-rojek.eu> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jan 05, 2020 at 01:16:38AM +0100, Artur Rojek wrote: > Add documentation for the adc-joystick driver, used to provide support > for joysticks connected over ADC. > > Signed-off-by: Artur Rojek > Tested-by: Paul Cercueil > --- > .../bindings/input/adc-joystick.yaml | 100 ++++++++++++++++++ > 1 file changed, 100 insertions(+) > create mode 100644 Documentation/devicetree/bindings/input/adc-joystick.yaml > > diff --git a/Documentation/devicetree/bindings/input/adc-joystick.yaml b/Documentation/devicetree/bindings/input/adc-joystick.yaml > new file mode 100644 > index 000000000000..97ae797348c7 > --- /dev/null > +++ b/Documentation/devicetree/bindings/input/adc-joystick.yaml > @@ -0,0 +1,100 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +# Copyright 2019-2020 Artur Rojek > +%YAML 1.2 > +--- > +$id: "http://devicetree.org/schemas/bindings/input/adc-joystick.yaml#" > +$schema: "http://devicetree.org/meta-schemas/core.yaml#" > + > +title: ADC attached joystick > + > +maintainers: > + - Artur Rojek > + > +description: | > + Bindings for joystick devices connected to ADC controllers supporting > + the Industrial I/O subsystem. > + > +properties: > + compatible: > + const: adc-joystick > + > + io-channels: > + description: | > + List of phandle and IIO specifier pairs. > + Each pair defines one ADC channel to which a joystick axis is connected. > + See Documentation/devicetree/bindings/iio/iio-bindings.txt for details. > + > +required: > + - compatible > + - io-channels > + > +additionalProperties: false > + > +patternProperties: > + "^axis@([0-9])$": A unit-address means there should be a 'reg' property. I'd just do axis-x and axis-y instead. > + type: object > + description: | > + Represents a joystick axis bound to the given ADC channel. > + For each entry in the io-channels list, one axis subnode with a matching > + index must be specified. > + > + properties: > + linux,abs-code: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: EV_ABS specific event code generated by the axis. Existing 'linux,code' should be used here. > + > + linux,abs-range: Drop 'linux,' here and on the rest of these. > + $ref: /schemas/types.yaml#/definitions/uint32-array > + items: > + - description: minimum value > + - description: maximum value > + description: | > + Minimum and maximum values produced by the axis. > + For an ABS_X axis this will be the left-most and right-most > + inclination of the joystick. If min > max, it is left to userspace to > + treat the axis as inverted. > + This property is interpreted as two signed 32 bit values. > + > + linux,abs-fuzz: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: | > + Amount of noise in the input value. > + Omitting this property indicates the axis is precise. > + > + linux,abs-flat: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: | > + Axial "deadzone", or area around the center position, where the axis > + is considered to be at rest. > + Omitting this property indicates the axis always returns to exactly > + the center position. > + > + required: > + - linux,abs-code > + - linux,abs-range > + > + additionalProperties: false > + > +examples: > + - | > + #include > + #include > + > + joystick: adc-joystick { > + compatible = "adc-joystick"; > + io-channels = <&adc INGENIC_ADC_TOUCH_XP>, > + <&adc INGENIC_ADC_TOUCH_YP>; > + > + axis@0 { > + linux,abs-code = ; > + linux,abs-range = <3300 0>; > + linux,abs-fuzz = <4>; > + linux,abs-flat = <200>; > + }; > + axis@1 { > + linux,abs-code = ; > + linux,abs-range = <0 3300>; > + linux,abs-fuzz = <4>; > + linux,abs-flat = <200>; > + }; > + }; > -- > 2.24.1 >