From patchwork Wed Jul 22 17:12:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 247021 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp726707ilg; Wed, 22 Jul 2020 10:14:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwEqDDAxmD4fkgo2U3vmwdsmKKbOWi7+J0ndxOzHgo3TrKC+2M9AiCVbG5zQNrHIaqR34bq X-Received: by 2002:aa7:d0d1:: with SMTP id u17mr471996edo.13.1595438073133; Wed, 22 Jul 2020 10:14:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595438073; cv=none; d=google.com; s=arc-20160816; b=FS1QKo/99XugKdKzk7buHTLqmnVe6TGzAWBCe4hiepoN3rIXy78lvIcjkk1Tmw1vfc TIcsdWpR/0WvYxGDtDt7udKNxuErg3SQaFXfgwLab1qc4XF2+9JAsmXM00ODH3y07kjN 3XgjF+OCNlO6aWpMOPh2pfSzNfUdTYN1reLNACP39oe2KEGGk36lMgWCSScmR4ISVkPh KS4tCxwr+zzHRZJyky3F9Iqk5dMW9srNu83Q3lryIcGbYIrAZ9rWb+AIGrNAbVuA77Da GMMfVBE2n9ANVU4dri+2fY6uZFYSOeJqOhXlt3oOFapvkVlv0NsnRK75j2a9cjN31Lb/ WNXw== 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=XhJmTW18smjU+mGrfD26k5K0gesQeOqkH0uvTr27c84=; b=EHDSULdKWJot71ETZj3UAlWbIttQHtuQDOe7LZv8UE3PDODdcAfG24WX3TGWdtTkaF 3IPR+1sDoNk0JDznA9JINGCIEKD2STCCAnEzEgJI/7NpTb+EBAe3sCMo2xqwHQO5qArN VuB2bCaqHwv3UG+ME/jmKbtuhiE+LV9U7v9ZuWUI0yue3XhE+HvOZ/E7OCKQuS6oqNE0 iqInyVx5pXPJTiT8JVIQ8qN1Bx1KFi1DC4wpJPWTsrNbN150kampCLq4c+roh3aMmi7k VlMrpbKvfSFBkej7pT18ddIQKcQ3Ti40YAfOoOw7pe1nCI7znoJqHpwombda6gTEnPp0 JQMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MPeO1shU; 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 a3si400729eju.177.2020.07.22.10.14.32; Wed, 22 Jul 2020 10:14:33 -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=MPeO1shU; 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 S1732116AbgGVROb (ORCPT + 6 others); Wed, 22 Jul 2020 13:14:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:33958 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731843AbgGVROa (ORCPT ); Wed, 22 Jul 2020 13:14:30 -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 C0863207DD; Wed, 22 Jul 2020 17:14:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595438069; bh=hy/4WcXA8LfPbW1/1mwdmw2sETcGcxYhBgoiA4NkpNk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MPeO1shUeWP79+OKhz4U3ivTkzvcuwJK3St7YyHLgXmxiXcTwJNIS/BxLbU/262jI iM2t55zF7t5neRyCr6JF0nQLNF8N5x3MBQKFgTmN2sFXR4ZoAxBWmKaXc7PRcqOJ2v a3rq2Zscl28zw1QPhLbKLNqTfy1h3jyKgGLiGvyk= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jacopo Mondi , Akinobu Mita , Jonathan Cameron Subject: [PATCH 1/3] dt-bindings: iio: adc: maxim,max11100 yaml conversion Date: Wed, 22 Jul 2020 18:12:22 +0100 Message-Id: <20200722171224.989138-2-jic23@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200722171224.989138-1-jic23@kernel.org> References: <20200722171224.989138-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 Straight forward conversion for this SPI ADC. Added limits on spi-max-frequency from datasheet (0.1 to 4.8MHz) Cc: Jacopo Mondi Signed-off-by: Jonathan Cameron --- .../devicetree/bindings/iio/adc/max11100.txt | 18 ------- .../bindings/iio/adc/maxim,max11100.yaml | 49 +++++++++++++++++++ 2 files changed, 49 insertions(+), 18 deletions(-) -- 2.27.0 Reviewed-by: Jacopo Mondi Reviewed-by: Rob Herring diff --git a/Documentation/devicetree/bindings/iio/adc/max11100.txt b/Documentation/devicetree/bindings/iio/adc/max11100.txt deleted file mode 100644 index b7f7177b8aca..000000000000 --- a/Documentation/devicetree/bindings/iio/adc/max11100.txt +++ /dev/null @@ -1,18 +0,0 @@ -* Maxim max11100 Analog to Digital Converter (ADC) - -Required properties: - - compatible: Should be "maxim,max11100" - - reg: the adc unit address - - vref-supply: phandle to the regulator that provides reference voltage - -Optional properties: - - spi-max-frequency: SPI maximum frequency - -Example: - -max11100: adc@0 { - compatible = "maxim,max11100"; - reg = <0>; - vref-supply = <&adc0_vref>; - spi-max-frequency = <240000>; -}; diff --git a/Documentation/devicetree/bindings/iio/adc/maxim,max11100.yaml b/Documentation/devicetree/bindings/iio/adc/maxim,max11100.yaml new file mode 100644 index 000000000000..0cf87556ef82 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/maxim,max11100.yaml @@ -0,0 +1,49 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/maxim,max11100.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Maxim MAX11100 ADC + +maintainers: + - Jacopo Mondi + +description: | + Single channel 16 bit ADC with SPI interface. + +properties: + compatible: + const: maxim,max11100 + + reg: + maxItems: 1 + + vref-supply: + description: External reference, needed to establish input scaling. + + spi-max-frequency: + minimum: 100000 + maximum: 4800000 + +additionalProperties: false + +required: + - compatible + - reg + - vref-supply + +examples: + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + + adc@0 { + compatible = "maxim,max11100"; + reg = <0>; + vref-supply = <&adc_vref>; + spi-max-frequency = <240000>; + }; + }; +... From patchwork Wed Jul 22 17:12:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 247024 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp726907ilg; Wed, 22 Jul 2020 10:14:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxwShjttWJSyJEw2tVb5oxSpI/iuZ2hBuDzuFK4jePJQoPnd0iZtisC3G/hAu9o96cIEGXm X-Received: by 2002:a17:906:2851:: with SMTP id s17mr531697ejc.347.1595438085979; Wed, 22 Jul 2020 10:14:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595438085; cv=none; d=google.com; s=arc-20160816; b=CuWRJIJowfDiIPoOyHWPeyP9E6TUsxvZncC57AV5Yzyawn4nBKUoqg9HdimPYUfM6N wNobiTKavaFgLzwVOFdX+sGXCoPnuxt2tbJhVUwQ9aYVLHW3xAaRWNa/7t743GlpKE1e AfiCebW9te/p64jfCsVK2f2tDnXU4ep7pIG6vEu9wMzts6D81RVvnUSNE5eEADRyyuzE VnMTLSIaed2K9CDiMDWzm9wMdULGQAO7dN9A90DCyY6zE7R1ipemNgtM8c9vXNr7iAid ELJOO8VRe2KLPd1NV1TheYFinJBPSWGuE/al72EzO31k7auaoPf0LRhM73AM3MhSb/hr AdDw== 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=+BBALFMu/kt1eJO2MoK67pjSth76+iLZoRlX/0osB1w=; b=Le9wawA45FObrJ5hx9N66TAOirXQBpemy6mic3tekrUgG8Vaa4V+io8DLCf+pFmaiU 1QCAWHw/w1CXKwdLYU2mgbn2tnYETGZZTj4Wlj4Z1j2M4SXd7QKZxpKw/p+DORc4HKDu u8EZpaitZiJcIC8Y1p/CnyyuioCmazpoKpNTG9J4waBJMnn6NizHzxkOijB1vIpXYjaU t5enDcYlrAGw45HXCRRPKNwVzvfFUebBCSNWa36KN4bhHcDcFAuM9413syvrO9rDCTLW kz3/mHFBRzl76tlj1HpxZ+pEawiWCbahA6NxS8MfdzmaNqSapnI7YbvnLB3tue4QTbjI c/qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jjCF2fFU; 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 f16si359890ejb.557.2020.07.22.10.14.45; Wed, 22 Jul 2020 10:14:45 -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=jjCF2fFU; 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 S1732119AbgGVROl (ORCPT + 6 others); Wed, 22 Jul 2020 13:14:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:34010 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731843AbgGVROc (ORCPT ); Wed, 22 Jul 2020 13:14: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 511F7207BB; Wed, 22 Jul 2020 17:14:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595438071; bh=IOWXQ0+Gcf0WPynRUbszW7WMZRxWBmRVXPa2pXzJin4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jjCF2fFUUww+UIt4vB7RiBe6GDO1s+x1JZbJLYdIX58+qe03sK+A9TW7NjIeKAXBR ECXosqEFK85Fe7clrfCygFUuhacfV9y0ZBbb9FidxnzHnnJUunNMQe4oROioq/x8/Q GZX1rthbo1O6dRY4QALNMhEOISzKUhrgsmkzmVv8= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jacopo Mondi , Akinobu Mita , Jonathan Cameron Subject: [PATCH 2/3] dt-bindings: iio: adc: maxim,max1118 yaml conversion Date: Wed, 22 Jul 2020 18:12:23 +0100 Message-Id: <20200722171224.989138-3-jic23@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200722171224.989138-1-jic23@kernel.org> References: <20200722171224.989138-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 device with a simple conversion. Special handling needed for the max1118 which is the only supported part that has an external reference voltage. Cc: Akinobu Mita Signed-off-by: Jonathan Cameron --- .../devicetree/bindings/iio/adc/max1118.txt | 21 ------- .../bindings/iio/adc/maxim,max1118.yaml | 59 +++++++++++++++++++ 2 files changed, 59 insertions(+), 21 deletions(-) -- 2.27.0 diff --git a/Documentation/devicetree/bindings/iio/adc/max1118.txt b/Documentation/devicetree/bindings/iio/adc/max1118.txt deleted file mode 100644 index cf33d0b15a6d..000000000000 --- a/Documentation/devicetree/bindings/iio/adc/max1118.txt +++ /dev/null @@ -1,21 +0,0 @@ -* MAX1117/MAX1118/MAX1119 8-bit, dual-channel ADCs - -Required properties: - - compatible: Should be one of - * "maxim,max1117" - * "maxim,max1118" - * "maxim,max1119" - - reg: spi chip select number for the device - - (max1118 only) vref-supply: The regulator supply for ADC reference voltage - -Recommended properties: - - spi-max-frequency: Definition as per - Documentation/devicetree/bindings/spi/spi-bus.txt - -Example: -adc@0 { - compatible = "maxim,max1118"; - reg = <0>; - vref-supply = <&vdd_supply>; - spi-max-frequency = <1000000>; -}; diff --git a/Documentation/devicetree/bindings/iio/adc/maxim,max1118.yaml b/Documentation/devicetree/bindings/iio/adc/maxim,max1118.yaml new file mode 100644 index 000000000000..ca24b8b23cde --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/maxim,max1118.yaml @@ -0,0 +1,59 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/maxim,max1118.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Maxim MAX1118 and similar ADCs + +maintainers: + - Akinobu Mita + +description: | + Dual channel 8bit ADCs. + +properties: + compatible: + enum: + - maxim,max1117 + - maxim,max1118 + - maxim,max1119 + + reg: + maxItems: 1 + + spi-max-frequency: + maximum: 5000000 + +required: + - compatible + - reg + +allOf: + - if: + properties: + compatible: + contains: + const: maxim,max1118 + then: + properties: + vref-supply: + description: External reference, needed to establish input scaling + + required: + - vref-supply + +examples: + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + + adc@0 { + compatible = "maxim,max1118"; + reg = <0>; + vref-supply = <&adc_vref>; + spi-max-frequency = <1000000>; + }; + }; +... From patchwork Wed Jul 22 17:12:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 247023 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp726839ilg; Wed, 22 Jul 2020 10:14:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyiSnY7pRIU5z7CRcvkkZq1MObKCNF5XKUvUU9CQ7bGWQqNI24b29nxdott8Rx97w2c8xgH X-Received: by 2002:a50:afa2:: with SMTP id h31mr432416edd.303.1595438082154; Wed, 22 Jul 2020 10:14:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595438082; cv=none; d=google.com; s=arc-20160816; b=Gm678cStRxZNYuxTMJIw9waqr3nwfsf4d3qGbeV/ZHt4wPoXNMyodTI3+slye4sVoY 7a4ovybhbypStE0Tj2uIaEZsuV5iNHt7+GSVey+Q02vNec7UvRC9HpLE57mBUyeQmzml euozts96tsgFlSMwF6T1pyxDrkjip10JjCigAxunV9MRrs55O6wPTVCskBFjcYahZMnn GwSnK4jqStM9yW3kkAByKDHpFdxTuVN5zNJr6uKIBkzNmPcSyZEamx33HouNhsPrpOzu wD2TOy92giPx+kWWYDviJL1q1fj9gHAbPKObfW4hMtPvo6XGFr6b9CitP4yvC4R8PUMC WsdQ== 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=lZhmSp4iBSqgIW4APaRyOFC+GeyKtBC/WAZ5RjeWE8w=; b=inQRfdcdKWnAvf4CJAMCwSKdzBOyHkT2wtHBoFXqnHWj84xqBmk7b+m7MxBIUY7xWf 994rnHt0sZRVQgxkC1n3GNJ5gUDkMHpfRuO2yjirMh528OJH7Hm2HBWBe7xJ+K9YzieZ R5ze9OaaAPbSF5SMl5YtomdmE/XWLEaSrIJ51EAjtRBF6jf1trdffP+CGCfub8U+lHxm 5mUjAUxL2+k/5pm6RMk09xye8NMNpf2X1L58UWok4OZgh1pWrD6JyrtactKcYoTtg5Na Q8F7sb15p9ReNDOMm+zHbgf6Ku9gQkjwzMNNZOVUqNyN8ptFJTyB7G+oVGbHsv4KAQeb 3bkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=B2+LcZtT; 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 g4si411665edf.452.2020.07.22.10.14.41; Wed, 22 Jul 2020 10:14:42 -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=B2+LcZtT; 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 S1731379AbgGVROk (ORCPT + 6 others); Wed, 22 Jul 2020 13:14:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:34064 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732119AbgGVROe (ORCPT ); Wed, 22 Jul 2020 13:14:34 -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 EAB1A207E8; Wed, 22 Jul 2020 17:14:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595438073; bh=GjUjbdMOXzZ7zvnhgBI+PToZohDSdnP4YTbKBRVL5jM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=B2+LcZtTM7P4Ebp9YHQDDBobTMNE4Ez9FgqBH3xoPwAJI8s5dTTQRhCuYmptflQ3k XhGuCwx4YhhW7lTRgSJ3qHCLis14h9uxj0YcJXC4GUjKgwqd6sZKdjqK8vIu/tPk9T Wq4OwtahMXvsx0WDvsVMCyYZPCfJjdnvWNKuwtOE= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jacopo Mondi , Akinobu Mita , Jonathan Cameron Subject: [PATCH 3/3] dt-bindings: iio: adc: maxim,max9611 yaml conversions Date: Wed, 22 Jul 2020 18:12:24 +0100 Message-Id: <20200722171224.989138-4-jic23@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200722171224.989138-1-jic23@kernel.org> References: <20200722171224.989138-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 Straight forward conversion of this binding for this current sense amplifier and ADC. Cc: Jacopo Mondi Signed-off-by: Jonathan Cameron --- .../devicetree/bindings/iio/adc/max9611.txt | 27 ---------- .../bindings/iio/adc/maxim,max9611.yaml | 49 +++++++++++++++++++ 2 files changed, 49 insertions(+), 27 deletions(-) -- 2.27.0 Reviewed-by: Jacopo Mondi Reviewed-by: Rob Herring diff --git a/Documentation/devicetree/bindings/iio/adc/max9611.txt b/Documentation/devicetree/bindings/iio/adc/max9611.txt deleted file mode 100644 index ab4f43145ae5..000000000000 --- a/Documentation/devicetree/bindings/iio/adc/max9611.txt +++ /dev/null @@ -1,27 +0,0 @@ -* Maxim max9611/max9612 current sense amplifier with 12-bits ADC interface - -Maxim max9611/max9612 is an high-side current sense amplifier with integrated -12-bits ADC communicating over I2c bus. -The device node for this driver shall be a child of a I2c controller. - -Required properties - - compatible: Should be "maxim,max9611" or "maxim,max9612" - - reg: The 7-bits long I2c address of the device - - shunt-resistor-micro-ohms: Value, in micro Ohms, of the current sense shunt - resistor - -Example: - -&i2c4 { - csa: adc@7c { - compatible = "maxim,max9611"; - reg = <0x7c>; - - shunt-resistor-micro-ohms = <5000>; - }; -}; - -This device node describes a current sense amplifier sitting on I2c4 bus -with address 0x7c (read address is 0xf9, write address is 0xf8). -A sense resistor of 0,005 Ohm is installed between RS+ and RS- current-sensing -inputs. diff --git a/Documentation/devicetree/bindings/iio/adc/maxim,max9611.yaml b/Documentation/devicetree/bindings/iio/adc/maxim,max9611.yaml new file mode 100644 index 000000000000..a9fc05e6b62c --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/maxim,max9611.yaml @@ -0,0 +1,49 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/maxim,max9611.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Maxim MAX9611 and similar current sense amplifiers with integrated ADCs + +maintainers: + - Jacopo Mondi + +description: | + These devices combine a high-side current sense amplifier with a 12 bit ADC. + They have an i2c interface. + +properties: + compatible: + enum: + - maxim,max9611 + - maxim,max9612 + + reg: + maxItems: 1 + + shunt-resistor-micro-ohms: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + Value in micro Ohms of the shunt resistor connected between the RS+ and + RS- inputs, across which the current is measured. Value needed to compute + the scaling of the measured current. + +required: + - compatible + - reg + - shunt-resistor-micro-ohms + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + adc@7c { + compatible = "maxim,max9611"; + reg = <0x7c>; + shunt-resistor-micro-ohms = <5000>; + }; + }; +...