From patchwork Sat Oct 31 18:12:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 320098 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp2434050ilc; Sat, 31 Oct 2020 11:15:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw3Q7J++0JKnTzsnlehp0n7+0Kr4V2lg3I5gS+nQbrIHltGX+e9bwxXvr/682agIzBbyUnd X-Received: by 2002:a05:6402:3068:: with SMTP id bs8mr8527158edb.110.1604168107361; Sat, 31 Oct 2020 11:15:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604168107; cv=none; d=google.com; s=arc-20160816; b=tbWnUF8Q0Q26JL0yOwaTeGod8G25EibBj74NR3eGbfOeSMtF2zWOEVYX8TZiNPfF5B +5mu2r1bYSdbAtJ2cj72tioJuZ1b5fOfT9ApBrD/BzNbEr+pVs8bqCFgcrHnDfiM2CY4 swsRgF9mY6iiNrhHPZ3A1Gb69cf36HkkZD+Aa6GaLc+wijWOUgY+rQ/iREhOHVU/rfhl lDFu534Dkpc92Kkxa8c7bEfm/H+wcRJgcGn6LF/+jO/0aBduwIVFC4nUesem4djMgkKL Eg3cqRHj1Bdgqx9Na8qEesFuRohPjGAAxM/NZTMkmnfc4d+pBBKxgcaZ/X9CTFFW2+Ic 38dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=aLHxaSlsZ6HiICs5bOuPnkZYwsMdQ93eWov9toRgSsU=; b=LbpHq5TR7/ewRlpoa568AuGb2CXLI1s/js5ESnNLxk1vSxK+SDjcxp2j8vyaQ7WJBT WuOtwF5y7Zv3IT2DPClAeQ8EWvAPM2bSSQ3dWfm3eT1+ONTXidg2ArQWqJJMvgyPA03H wVMFDISkfjd8JcvEVPdqspQvzpDuB/w9SdUpuIqkFEjdCNrChgp/bxHXdk+0kK/htclt MA/RkbikjSyhGpUHJwPypmH5Tt7eT27RgOWuFxcviZVcB4P8r7NegRLhwPvsOqwdAcqG bMfdoCcZpG3nLf6eFJT2yseScXJ2RbpvPqK2ttNUr2x9gIUbu2TpRl+LoFmIW14UFECa dQ3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=QEjKOf2H; 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 a16si8093688ejk.22.2020.10.31.11.15.07; Sat, 31 Oct 2020 11:15:07 -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=QEjKOf2H; 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 S1728246AbgJaSPE (ORCPT + 6 others); Sat, 31 Oct 2020 14:15:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:46268 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728338AbgJaSPD (ORCPT ); Sat, 31 Oct 2020 14:15:03 -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 42C69206D5; Sat, 31 Oct 2020 18:15:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604168102; bh=3JNkkk9Dl1YomxLvoKDitnSaJq06f+AYRrZkk3n4+0Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QEjKOf2HcUyA6Aq9I6wetNpIMAYeqi8OoS4eauMsN4+1cxcAEKJ4hwJFM74CCh0/v Xf3DcQTwq3A237CjRgqDiuDWJuqt6vQjg92ZReAx2MqzOp04FH6D2JEbEiav6/7PHu c5cKO0SqHozFMAWLr/+T2Hw6/QNunNua1XNF9Rs8= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Miquel Raynal , Philippe Reynes Subject: [PATCH 07/10] dt-bindings:iio:adc:maxim, max1027: Pull out to separate binding doc. Date: Sat, 31 Oct 2020 18:12:39 +0000 Message-Id: <20201031181242.742301-8-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031181242.742301-1-jic23@kernel.org> References: <20201031181242.742301-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron The afe/voltage-divider.yaml example uses this device with 2 properties not provided by trivial-devices.yaml (spi-max-frequency and #io-channel-cells) Solve that by creating a more specific binding doc. Signed-off-by: Jonathan Cameron Cc: Miquel Raynal Cc: Philippe Reynes --- .../bindings/iio/adc/maxim,max1027.yaml | 64 +++++++++++++++++++ .../devicetree/bindings/trivial-devices.yaml | 12 ---- 2 files changed, 64 insertions(+), 12 deletions(-) -- 2.28.0 diff --git a/Documentation/devicetree/bindings/iio/adc/maxim,max1027.yaml b/Documentation/devicetree/bindings/iio/adc/maxim,max1027.yaml new file mode 100644 index 000000000000..09e853c50c76 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/maxim,max1027.yaml @@ -0,0 +1,64 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/maxim,max1027.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Maxim MAX1027 and similar ADCs + +maintainers: + - Miquel Raynal + - Philippe Reynes + +description: | + 300ks/s SPI ADCs with temperature sensors. + +properties: + compatible: + enum: + # 10-bit 8 channels + - maxim,max1027 + # 10-bit 12 channels + - maxim,max1029 + # 10-bit 16 channels + - maxim,max1031 + # 12-bit 8 channels + - maxim,max1227 + # 12-bit 12 channels + - maxim,max1229 + # 12-bit 16 channels + - maxim,max1231 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + spi-max-frequency: true + + "#io-channel-cells": + const: 1 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + #include + spi { + #address-cells = <1>; + #size-cells = <0>; + maxadc: adc@0 { + compatible = "maxim,max1027"; + reg = <0>; + #io-channel-cells = <1>; + interrupt-parent = <&gpio5>; + interrupts = <15 IRQ_TYPE_EDGE_RISING>; + spi-max-frequency = <1000000>; + }; + }; +... diff --git a/Documentation/devicetree/bindings/trivial-devices.yaml b/Documentation/devicetree/bindings/trivial-devices.yaml index d154ea97e30d..185e09e61e16 100644 --- a/Documentation/devicetree/bindings/trivial-devices.yaml +++ b/Documentation/devicetree/bindings/trivial-devices.yaml @@ -108,18 +108,6 @@ properties: - isil,isl68137 # 5 Bit Programmable, Pulse-Width Modulator - maxim,ds1050 - # 10-bit 8 channels 300ks/s SPI ADC with temperature sensor - - maxim,max1027 - # 10-bit 12 channels 300ks/s SPI ADC with temperature sensor - - maxim,max1029 - # 10-bit 16 channels 300ks/s SPI ADC with temperature sensor - - maxim,max1031 - # 12-bit 8 channels 300ks/s SPI ADC with temperature sensor - - maxim,max1227 - # 12-bit 12 channels 300ks/s SPI ADC with temperature sensor - - maxim,max1229 - # 12-bit 16 channels 300ks/s SPI ADC with temperature sensor - - maxim,max1231 # Low-Power, 4-/12-Channel, 2-Wire Serial, 12-Bit ADCs - maxim,max1237 # PECI-to-I2C translator for PECI-to-SMBus/I2C protocol conversion