From patchwork Sun Jun 27 16:32:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 467811 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp3282957jao; Sun, 27 Jun 2021 09:30:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxnUJYLV6pfTzRmPMYijOMGUobGVGUHeh5i/CIMO+IFKSKDcG09FjPeh8jwXYli1UNlFVSj X-Received: by 2002:a17:906:498b:: with SMTP id p11mr20888335eju.295.1624811447686; Sun, 27 Jun 2021 09:30:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624811447; cv=none; d=google.com; s=arc-20160816; b=o9WPbKg5UHIKYlHzZM+rZj+nkhtulbkmBFHprp3tzh19WO3ko/yFHaMRbvOwSsO+Bm Jxhdnee37isvCUaObA9JJ5qhtN0+shKHFPLOq4R8UPaIX4/MfWDUvi0z2AaFEhObI+Us dD11Xj4a+oNp5quLWYUvuKTx1WL9gSVHZkjOphMU4Ag6FRhtG1vdLfXXBXHPUc4IvlFr 3F8kJx1bbDFA/7I3EgjeeOg7WvaukOVi/b5v0bek//85lqxz8jbxSh4SiOgzOgcGDAj2 ge24WWKYXRgQIcTiuj+tkMM/1yJvoFgNGYYAzxmOPVqzOsYHiE6J/yiZQSdFuNzR70aN tJTA== 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=nAIuGYuYjcOa4WY8Dp7YXo6Yixe2PlI/usp6THhkFds=; b=M7jUY4v+U5kAyyvgZ4bM6cK6HKReCXSDG5xWrdf48CQjWsa3edU/KA0SpRxpad7Ap0 8PskFSIMfxeUw2Ku0hmM3prQ+HWEJdAaZ06f93SR+Msv3A3zNty7kWX2RPRjIeLPpvlw M7C+1UhqhGanCA+ZlSRfJ1pNvz7WutO18MuHyK2ksj5d7j9QVLqCKLXVPRWcvgX79zXm lejsbkqbGg+kFyMiCMKsNogcai9MlBUeEznjdFP3JhNWVdO9ZtERUPt45rhhCYc56owa lpExN0uM5sXao6aZWC7FOqMgzTL8R+iIjyLBU8bq01+MP1sJfGwGllCScrQvu3r46qMX eGSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mO0XnykA; 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 s27si11202998edy.94.2021.06.27.09.30.47; Sun, 27 Jun 2021 09:30:47 -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=k20201202 header.b=mO0XnykA; 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 S230436AbhF0QdK (ORCPT + 7 others); Sun, 27 Jun 2021 12:33:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:45186 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231243AbhF0QdK (ORCPT ); Sun, 27 Jun 2021 12:33:10 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id F0534619AD; Sun, 27 Jun 2021 16:30:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624811446; bh=o6mqFqi+WqcWA3TRryRMSDXpaSBg5G6W9BVGpW6lxXU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mO0XnykA3KX/4yqBpTuRFrhjNBKZnf7/VAYhTXt5cCTibu+DpvpCm9CajqbZqTPDm ts7TeM1f1Bk67iN1QjDdUZsxLyv4/LKdSrH/RIyqY0aDSHQKQRE4HA3HkbzDIcEEim sghS2iEAsc823g5RDn/9CJUs1o2cKrFByRZmXFDmcolRSCGly1/GvEeOTUvGD/cM8D VmUxCbCGCOxVR4tX7NUmlvAEq3QB/ie/powMO97KZ9og+zf5RebbsFPi0Us+dROIr7 ZmxffHqYWXIHjkCQZoFj5Fh7YdEsqa0v3TU+zYxJijIHImtQx3aV6KHOsPMkeTBYWc 2gEEJ0AUlSrnw== From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Lars-Peter Clausen Subject: [PATCH 05/15] dt-bindings: iio: dac: ad5446: Add missing binding document Date: Sun, 27 Jun 2021 17:32:34 +0100 Message-Id: <20210627163244.1090296-6-jic23@kernel.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210627163244.1090296-1-jic23@kernel.org> References: <20210627163244.1090296-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron Binding is a little stricter than the Linux driver. It requires vcc-supply to be present for devices that don't have an internal reference, whereas the driver just prints a message and carries on. Given this means that it is impossible to establish a scaling of the output channel, let us make it required in the binding schema. Signed-off-by: Jonathan Cameron Cc: Lars-Peter Clausen --- .../bindings/iio/dac/adi,ad5446.yaml | 105 ++++++++++++++++++ 1 file changed, 105 insertions(+) -- 2.32.0 diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5446.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5446.yaml new file mode 100644 index 000000000000..e0a0def20c8c --- /dev/null +++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5446.yaml @@ -0,0 +1,105 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/dac/adi,ad5446.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Single channel DACs similar to the AD5446 + +maintainers: + - Lars-Peter Clausen + - Jonathan Cameron + +properties: + compatible: + oneOf: + - description: I2C devices + enum: + - adi,ad5602 + - adi,ad5612 + - adi,ad5622 + - description: SPI devices + enum: + - adi,ad5300 + - adi,ad5310 + - adi,ad5320 + - adi,ad5444 + - adi,ad5446 + - adi,ad5450 + - adi,ad5451 + - adi,ad5452 + - adi,ad5453 + - adi,ad5512a + - adi,ad5541a + - adi,ad5542a + - adi,ad5543 + - adi,ad5553 + - adi,ad5600 + - adi,ad5601 + - adi,ad5611 + - adi,ad5621 + - adi,ad5641 + - adi,ad5620-2500 + - adi,ad5620-1250 + - adi,ad5640-2500 + - adi,ad5640-1250 + - adi,ad5660-2500 + - adi,ad5660-1250 + - adi,ad5662 + - ti,dac081s101 + - ti,dac101s101 + - ti,dac121s101 + - ti,dac7512 + + reg: + maxItems: 1 + + vcc-supply: true + + spi-max-frequency: true + +additionalProperties: false + +required: + - compatible + - reg + +# Ensure the scaling can be established for devices with no internal reference. +allOf: + - if: + not: + properties: + compatible: + contains: + enum: + - adi,ad5620-2500 + - adi,ad5620-1250 + - adi,ad5640-2500 + - adi,ad5640-1250 + - adi,ad5660-2500 + - adi,ad5660-1250 + then: + required: + - vcc-supply + +examples: + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + dac@0 { + reg = <0>; + compatible = "adi,ad5620-2500"; + }; + }; + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + dac@42 { + reg = <0x42>; + compatible = "adi,ad5602"; + vcc-supply = <&vcc_dac>; + }; + }; +...