From patchwork Sun Aug 9 11:17:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 247574 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp3995685ilo; Sun, 9 Aug 2020 04:20:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy+tCBaegGT/SCquc/62oxsOIMLSDZE6xbOVUmIPVkj+4aPiTQYPN89ddShrcXoe35t9V6f X-Received: by 2002:a17:906:248f:: with SMTP id e15mr16375996ejb.296.1596972019255; Sun, 09 Aug 2020 04:20:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596972019; cv=none; d=google.com; s=arc-20160816; b=DZJMEdA1kTcc9sWS5pN1ZA1oVOyablpp1ewW7bTGalsR9x4IPC20vWn/cVTn8uWfXz DctH1R8bRZRz/0u48EX+86CZYvYAl0P2nA6FNgJJxKpk5Bpr1DqeWhRu4odiE+jnRfAK Hj8dksC+MedFudiGCqfLyakWlzl6KjF3ksLsmETd9aF5omjBETqy+lHryTnYENdyCkh8 mp90uJzJYhvMUgAVhv3tE+wFCZAF4ZlMJ8Tc22zB8FJsUgC1Sh0qdHI2J8sjL22xmXFo s9FVoxpcmruO5ux81sNDVkH4rLEtb7gkI/Ehd0xsDsx+HnJCc1IOKs1n6n3r+IBdqksd A8cw== 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=tMkafMsx6o5Ri6ndV3AE2+CRZXqfv1CszpmjYxvfUuI=; b=totIG791aYhY+S2f9t5ys0kpas+VjjuidS0U6nFZOhOXWca3ffUY4X3MHA4axqUd2X CiKcyTcTf0nVY8Kcqo57aNP/JAHun8tCj8o+2RhnJKUsSVOltMItKbq2eAHd9R0hGKzq RlU3Tqg8+ky/Mym12XizIMSqOqJsJ6N58G4KLhG2tLveWAWTvhQdHv+aUvLQbawUMg92 0fKMEfNG0tKCybGnPIgPphcJ4RKLanQ8/RcldPQAQJzx2O3QKi9yLcjKtZlln+hYMR4U qhSbRVVNmUj/9cWb9SvJqGbU8ARw8Jkc42XJ/0uIOLqOWsjInuFUy0tg1MGyAmp16mFq tkPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=o3SGvmQ8; 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 dt16si8833177ejb.353.2020.08.09.04.20.19; Sun, 09 Aug 2020 04:20:19 -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=o3SGvmQ8; 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 S1726439AbgHILUS (ORCPT + 6 others); Sun, 9 Aug 2020 07:20:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:54284 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726350AbgHILUS (ORCPT ); Sun, 9 Aug 2020 07:20:18 -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 63DF5206D8; Sun, 9 Aug 2020 11:20:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596972017; bh=Cbyhs/Xet1hHvl6FhTjFIxhhezZP6HgWsZoUKNXnESw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=o3SGvmQ8Bk2IGmKQFKQgD9GJBqSzw64tcmZUmSJF2n++bMGZttlFPyIiwKnERK5l0 NNCKlnW0t5Nw4yDDV5sYIj8F8a0wOaNSwZswCGpowhyIBvCKuA6zhrnraGo7ptiWNG ENWEW24JWurXJ9gDYprYSOnG3CGPbMmxFJsXxlxU= From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Rob Herring , devicetree@vger.kernel.org, Jonathan Cameron , Phil Reid Subject: [PATCH 13/13] dt-bindings: iio: adc: ti,tlc4541 binding conversion Date: Sun, 9 Aug 2020 12:17:53 +0100 Message-Id: <20200809111753.156236-14-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200809111753.156236-1-jic23@kernel.org> References: <20200809111753.156236-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 Simple binding so easy to convert. Dropped the stated value of maximum spi bus frequency as it does not seem to correspond to the datasheet. The value of 200kHz is the max sampling frequency of the ADC, not the clock frequency of the SPI bus. Added #io-channel-cells to allow use as a provider of channels to other devices via the consumer binding. Signed-off-by: Jonathan Cameron Cc: Phil Reid --- .../bindings/iio/adc/ti,tlc4541.yaml | 52 +++++++++++++++++++ .../bindings/iio/adc/ti-tlc4541.txt | 17 ------ 2 files changed, 52 insertions(+), 17 deletions(-) -- 2.28.0 Reviewed-By: Phil Reid Reviewed-by: Rob Herring diff --git a/Documentation/devicetree/bindings/iio/adc/ti,tlc4541.yaml b/Documentation/devicetree/bindings/iio/adc/ti,tlc4541.yaml new file mode 100644 index 000000000000..6c2539b3d707 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/ti,tlc4541.yaml @@ -0,0 +1,52 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/ti,tlc4541.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Texas Instruments TLC4541 and similar ADCs + +maintainers: + - Phil Reid + +description: | + 14/16bit single channel ADC with SPI interface. + +properties: + compatible: + enum: + - ti,tlc3541 + - ti,tlc4541 + + reg: + maxItems: 1 + + spi-max-frequency: true + + vref-supply: true + + "#io-channel-cells": + const: 1 + +required: + - compatible + - reg + - vref-supply + +additionalProperties: false + +examples: + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + + adc@0 { + compatible = "ti,tlc4541"; + reg = <0>; + vref-supply = <&vdd_supply>; + spi-max-frequency = <200000>; + #io-channel-cells = <1>; + }; + }; +... diff --git a/Documentation/devicetree/bindings/iio/adc/ti-tlc4541.txt b/Documentation/devicetree/bindings/iio/adc/ti-tlc4541.txt deleted file mode 100644 index 6b2692723a04..000000000000 --- a/Documentation/devicetree/bindings/iio/adc/ti-tlc4541.txt +++ /dev/null @@ -1,17 +0,0 @@ -* Texas Instruments' TLC4541 - -Required properties: - - compatible: Should be one of - * "ti,tlc4541" - * "ti,tlc3541" - - reg: SPI chip select number for the device - - vref-supply: The regulator supply for ADC reference voltage - - spi-max-frequency: Max SPI frequency to use (<= 200000) - -Example: -adc@0 { - compatible = "ti,tlc4541"; - reg = <0>; - vref-supply = <&vdd_supply>; - spi-max-frequency = <200000>; -};