From patchwork Mon Jun 14 11:35:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 459852 Delivered-To: patch@linaro.org Received: by 2002:a02:735a:0:0:0:0:0 with SMTP id a26csp3201578jae; Mon, 14 Jun 2021 04:40:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwVzaA4FO1iEXcdCdUR3P2LEuuAWxTdS1xbNzaiqkW6sHxDPhcuBulWgsZ88rQwIsPzwC4B X-Received: by 2002:aa7:dc42:: with SMTP id g2mr16363098edu.362.1623670830998; Mon, 14 Jun 2021 04:40:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623670830; cv=none; d=google.com; s=arc-20160816; b=OQ207adeC/SqciA6ZdDFmPTtSsmRlYyymXoMDvAnskxEThrIHJXk0I+7Hq2ZIcFVpv 9I3YmHiiUVPVwk0ZPc7zDyu5tjlOUq0FKmYwxTbEBujcp4/7bSd5ctK7qE3jYwnH+NcP /xb1W0XA4aAsCHFK+dJkBYBT7hpu4Z17rclySALljXcjvx5PtnpcdzzEstgzZx4nhEud rwUhsZT8d6X+bHuajC4xtw8rmjli8S5go8g0bwwrLZgoOwy1g/aMQ9YdakJY4GqAc5rs zJzHC+Cxj2tv9ffr+IOxblMMgExiYmbLzbQuueM1/7Z4XyDhaWwqszQcKf4ju1ALboS3 5heg== 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=P6iYYsSN8aHfuQ3det6Rqqa5Mqm9FC+jo1GjrWmDIew=; b=sFPjko164CnHvwQtlRgyFSOhYwEVSII6dUN2mBjtR1QGrGnMYvbEZpaVFz6aPsqKF8 UIfqcEnhCwzjVzJRgBEsy5iga5FuoiOHfbGl4Sfg15PNGggg0V+Dk9Exee9ANPZMRUOV Tk6Lh9Xa0biK3FEXF5thQI0bswgNCNKdb3ZhvmwrLPZ5XlzGVjNjimmwIunlxHfm3bJm CeZAQA1e9qwgsqmp1XH1Go4LIjUAUfMUeSfDAo469SXIZAq4SlRR6RLlD8QKUZYe4hZN lq48s8lnnRegRLsy6iQmeCCbMfZ2bb2Ren5TUDWa/CL3zPMnQmsKRRteYzD+pgJm1jCH Gnpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=O9sDz8DQ; 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 nb10si11945869ejc.344.2021.06.14.04.40.30; Mon, 14 Jun 2021 04:40:30 -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=O9sDz8DQ; 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 S235925AbhFNLlr (ORCPT + 7 others); Mon, 14 Jun 2021 07:41:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:59692 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236555AbhFNLjP (ORCPT ); Mon, 14 Jun 2021 07:39:15 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id DCCDB613D0; Mon, 14 Jun 2021 11:33:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623670437; bh=nUZoBNjU8SfS4RGpa++OgfFzwMNgdWbkuCW0Fi/pt2o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=O9sDz8DQgq2kBMLLDMhei/S4sOMDsDjFPPx+WrkqIIV6TYQu8tLENfjp9aCASnVlb uLSUrE7m1amxOoyt8zbcWTuELv6uqU4GFRYmKt5Smaprlv+weiVEsSe7fSsuFZpnLD 1Q0HJCKoBefw+oskbTNRAj0vxR4QCUjVfRZceWz5GTMTkwkH8KeTulFyECR3jo0fB6 ocuByyw5WuXpxbcc+CLs4aTG/ObTPqGyBTzrJ2jdQdatNBemw++4KLLVJ5s20R902V 7vaydq0IxyEBTZtYfwfo7iWurA+85JTyTDusIGwp4v5DN5WANv3uhygnzSzz3y7Dkg YsH4UffG0Vl/Q== From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring Cc: Michael.Hennerich@analog.com, lars@metafoo.de, devicetree@vger.kernel.org, Nuno Sa , Jonathan Cameron Subject: [PATCH 15/17] dt-bindings:iio:adc:ad7280a: Add binding Date: Mon, 14 Jun 2021 12:35:05 +0100 Message-Id: <20210614113507.897732-16-jic23@kernel.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210614113507.897732-1-jic23@kernel.org> References: <20210614113507.897732-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron Add a binding for this Lithium Ion Battery monitoring chip/chain of chips as it is now clean and ready to move out of staging. Signed-off-by: Jonathan Cameron --- .../bindings/iio/adc/adi,ad7280a.yaml | 87 +++++++++++++++++++ 1 file changed, 87 insertions(+) -- 2.32.0 Reviewed-by: Rob Herring diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7280a.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7280a.yaml new file mode 100644 index 000000000000..77b8f67fe446 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7280a.yaml @@ -0,0 +1,87 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/adi,ad7280a.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Analog Devices AD7280a Lithium Ion Battery Monitoring System + +maintainers: + - Michael Hennerich + - Jonathan Cameron + +description: | + Bindings for the Analog Devices AD7280a Battery Monitoring System. + Used in devices such as hybrid electric cars, battery backup and power tools. + Multiple chips can be daisy chained and accessed via a single SPI interface. + Data sheet found here: + https://www.analog.com/media/en/technical-documentation/data-sheets/AD7280A.pdf + +properties: + compatible: + const: adi,ad7280a + + reg: + maxItems: 1 + + interrupts: + description: IRQ line for the ADC + maxItems: 1 + + spi-max-frequency: true + + adi,temp-alert-last-chan: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Allows limiting of scope of which channels are considered for temperature + alerts, typically because not all are wired to anything. Only applies to + last device in the daisy chain. + default: 5 + enum: [3, 4, 5] + + adi,voltage-alert-last-chan: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Allows limiting of scope of which channels are considered for voltage + alerts, typically because not all are wired to anything. Only applies to + last device in the daisy chain. + default: 5 + enum: [3, 4, 5] + + adi,acquisition-time-ns: + description: + Additional time may be needed to charge the sampling capacitors depending + on external writing. + default: 400 + enum: [400, 800, 1200, 1600] + + adi,thermistor-termination: + type: boolean + description: + Enable the thermistor termination function. + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + + adc@0 { + compatible = "adi,ad7280a"; + reg = <0>; + spi-max-frequency = <700000>; + interrupt-parent = <&gpio>; + interrupts = <25 2>; + adi,thermistor-termination; + adi,acquisition-time-ns = <800>; + adi,voltage-alert-last-chan = <5>; + adi,temp-alert-last-chan = <5>; + }; + }; +...