From patchwork Sat Sep 5 17:29:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 249166 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp2420740ilg; Sat, 5 Sep 2020 10:32:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxy+X8FLAXce8j81Ak4ozjI0l/JhXM7upOpv+4OzvsZcWFKmxTOSjbY2TKJjIh9RucEN8MZ X-Received: by 2002:a17:906:a141:: with SMTP id bu1mr13315999ejb.303.1599327168519; Sat, 05 Sep 2020 10:32:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599327168; cv=none; d=google.com; s=arc-20160816; b=gIR2aDhjgXOU+rMnJ9hQZlKRVZ95yUthObf9cQ3SbNxjRLfEQUvLUBOx0fRqnIuAm8 mH7TNjs6O71h6eU08IlDYGb6H6qDzY2Cw3/RuDwr+RBUvgW4O4KT0YCkA49J+njGfljS 8qDcn257fonVxXFD6Uk7fkpHcyRoUGy0EEtDzFNXhprS06ruOdezs5Jwo+l0JSQORkpD bhqUywkUU3WQOeYTe/bh3kJFXfg1T+rVV2Xn/QFfYGnknCvp4CXyjXz7QgDdm0WbVQuG 5gCJgbchA5xRY1EJcRaiPwtdZLtAD2HBqE5uHxwl5tbh6uQqmqUxPGX85M1yFFajTxjM AcAA== 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=OGeK8oI82WGGt8MTttN5Y2zat78nWFEwsIpwqhX/hCf2Az464LDYZ58yP2gDKuHftL SFrM7pS0M5uVmpdiUBhX6d+CsSoP4oijGe+vF3N84oLjXDPh9cOkCAVprS9ftmH0Fg36 sv2xx9vOTxj9GeO4+UO1Yg7sYa8eM0Y1G+o6A9xH9MZZxBqTn9EVn2K7GV2cfeWzCNRY GoLAbzyOIKrQeuClVl7TTEtwBFklwr7X2OjSl/2Gbl/hFlUc7uPdvM3Uw4rHmct0+sS8 ojfQdLYgQVZH/w0Zsv8O9m9gOszDZD4Bzp/NO37o6QgCsJmUQnSrF7A4gPtTeurVN/4H rfUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=n6ht+dl7; 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 u17si5687486ejk.29.2020.09.05.10.32.48; Sat, 05 Sep 2020 10:32:48 -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=n6ht+dl7; 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 S1728387AbgIERco (ORCPT + 6 others); Sat, 5 Sep 2020 13:32:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:60288 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728393AbgIERch (ORCPT ); Sat, 5 Sep 2020 13:32:37 -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 80280208DB; Sat, 5 Sep 2020 17:32:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599327156; bh=4WGAK8AbbHJfYhD9ddvP6Zim7kuzGr7UghvSwQy6YRo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=n6ht+dl7eb8KORmudM5jKs+Bl2/heHXE20ZZwYcba7EAyV9JwWg7ZqSYtPHzhNuuI +YHqLTKf6Ia+pL46Ml/SSh9xPN6SEMLzFvEsC9OS9lLeFxVscUzY4wvw/VjhHB+609 TZtWGykiG1aVGxfHsS+ZVIKXYwE5DW6iPlPj6jvA= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Alexandre Belloni , Maxime Ripard Subject: [PATCH 07/20] dt-bindings:iio:adc:nuvoton,nau7802 yaml conversion Date: Sat, 5 Sep 2020 18:29:51 +0100 Message-Id: <20200905173004.216081-8-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200905173004.216081-1-jic23@kernel.org> References: <20200905173004.216081-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 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>; -};