From patchwork Wed Sep 9 17:59:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 249529 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ecf:0:0:0:0 with SMTP id i15csp56437ilk; Wed, 9 Sep 2020 11:04:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxl6yD/Wm8nFy59DCYLbPVh/dKRQt1oED4Ku+daRmjK6bX64AYLBBCZvh/jPOoyCHRLlkZc X-Received: by 2002:aa7:d558:: with SMTP id u24mr5439176edr.336.1599674698249; Wed, 09 Sep 2020 11:04:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599674698; cv=none; d=google.com; s=arc-20160816; b=eVd7fGFJQoZVL86xRqyt6iQNm0BIKNYunGistzRwewFKvsG1grHp1YG2FfpbU9p59V aMtnl0dHbmtH8jNYJQo3nk1S7/w8BVYKzQ/aZqb1nLrEOTfxDfFm+0R4NF4L+iliCSUj FYJXtA4oDlxmm1S8S2PnmyLdq9J4SPtOBowRz8jK51VuxS2kYJNKnggEZuOc3cZK1r+/ ntJPIfm257K2xUK43T7URIMX5VXb5oHtN0WySBHT/tVwf2+OlZAEBepgOnf9yu+aQFR+ BoqipV/JcMUprNvANVMy8CUrtITe+fyNKSxweooJnze/FaTs10f9P1Bjeak4xorzIygy Zazg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=nbD9Jqa2BW9EnhWE/sCdmNwO23mjhafM9sE8ncIGUIg=; b=xz7fwXniR5Q5ttZok9Iit6lhpbYeMTTkS4lReNg3JhCjMAOxNFR8z+Hv3Jd5s9NK4J zafWD4ZiT9M2ePwjiPjr7n8ZkFZzNcsyqQbBniwBQvXcVy17SRPAWAPZvwA1kQU3hCP5 eWK0A4V25uk6CxI4TaS8dKDGJIoOuiyzuQrLgPtTcqqOnctFowGwgce1vQSNDUomHmnx tvT90f4QG1Lb69PXA7mFI/DLXOorO6tqySSxqUe87OAXKFg8k5+fP10HnU+/MsrNWuZv ak3qLcOuH6bizVMEc0C9p/bW4adL3s7Zz9Zty0PYBFFNYD3e+44iAMmD2O9UlE5H82Xa winw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="Y/dxyfxU"; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n12si1886631ejx.468.2020.09.09.11.04.58; Wed, 09 Sep 2020 11:04:58 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="Y/dxyfxU"; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726226AbgIISEx (ORCPT + 6 others); Wed, 9 Sep 2020 14:04:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:59332 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730145AbgIISCc (ORCPT ); Wed, 9 Sep 2020 14:02:32 -0400 Received: from localhost.localdomain (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6251921D80; Wed, 9 Sep 2020 18:02:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599674550; bh=4WGAK8AbbHJfYhD9ddvP6Zim7kuzGr7UghvSwQy6YRo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Y/dxyfxU3gVeHvDXM4lSieav/NVBX32nX+UQeOXqzPcea3joc90NIbu6Zhjoq7J4n 7f7sPGrsAq6HZ6pLPBPazg01KcI60E5N92rq85SuhwPGCK0NfeGkcXMpM+uQOqC79C VViCI4qM/+CNz16rxiM/SFqN3eCtBvXbhNipk6UA= From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Rob Herring , devicetree@vger.kernel.org, Jonathan Cameron , Alexandre Belloni , Maxime Ripard Subject: [PATCH v2 07/20] dt-bindings:iio:adc:nuvoton, nau7802 yaml conversion Date: Wed, 9 Sep 2020 18:59:33 +0100 Message-Id: <20200909175946.395313-8-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200909175946.395313-1-jic23@kernel.org> References: <20200909175946.395313-1-jic23@kernel.org> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron A simple conversion from txt file to yaml. I added the #io-channel-cells property as optional to allow the channels of this ADCs to be used to provide services to other drivers, for example if an analog accelerometer is connected. Signed-off-by: Jonathan Cameron Cc: Alexandre Belloni Cc: Maxime Ripard --- .../bindings/iio/adc/nuvoton,nau7802.yaml | 50 +++++++++++++++++++ .../bindings/iio/adc/nuvoton-nau7802.txt | 18 ------- 2 files changed, 50 insertions(+), 18 deletions(-) -- 2.28.0 Reviewed-by: Rob Herring diff --git a/Documentation/devicetree/bindings/iio/adc/nuvoton,nau7802.yaml b/Documentation/devicetree/bindings/iio/adc/nuvoton,nau7802.yaml new file mode 100644 index 000000000000..bcd041ea28a8 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/nuvoton,nau7802.yaml @@ -0,0 +1,50 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/nuvoton,nau7802.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Nuvoton NAU7802 I2c Analog to Digital Converter (ADC) + +maintainers: + - Alexandre Belloni + - Maxime Ripard + +properties: + compatible: + const: nuvoton,nau7802 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + nuvoton,vldo: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Internal reference voltage in millivolts to be configured. + minimum: 2400 + maximum: 4500 + + "#io-channel-cells": + const: 1 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + nau7802@2a { + compatible = "nuvoton,nau7802"; + reg = <0x2a>; + nuvoton,vldo = <3000>; + }; + }; +... diff --git a/Documentation/devicetree/bindings/iio/adc/nuvoton-nau7802.txt b/Documentation/devicetree/bindings/iio/adc/nuvoton-nau7802.txt deleted file mode 100644 index e9582e6fe350..000000000000 --- a/Documentation/devicetree/bindings/iio/adc/nuvoton-nau7802.txt +++ /dev/null @@ -1,18 +0,0 @@ -* Nuvoton NAU7802 Analog to Digital Converter (ADC) - -Required properties: - - compatible: Should be "nuvoton,nau7802" - - reg: Should contain the ADC I2C address - -Optional properties: - - nuvoton,vldo: Internal reference voltage in millivolts to be - configured valid values are between 2400 mV and 4500 mV. - - interrupts: IRQ line for the ADC. If not used the driver will use - polling. - -Example: -adc2: nau7802@2a { - compatible = "nuvoton,nau7802"; - reg = <0x2a>; - nuvoton,vldo = <3000>; -};