Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp5954494rdb; Sun, 17 Sep 2023 21:53:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHyABq7zBCU/GBcXU4yQE2Wy9SnvtQBV8cxx0r4vAvqIf8ooyTGSi4KZE0Jhjzx94WKpLkZ X-Received: by 2002:a05:6a20:8f19:b0:13f:de94:fb97 with SMTP id b25-20020a056a208f1900b0013fde94fb97mr9761673pzk.27.1695012807845; Sun, 17 Sep 2023 21:53:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695012807; cv=none; d=google.com; s=arc-20160816; b=XccoZDzXFWRcZ/zV5hsakVaHS64vD7ev5kOr2TT9+LGILCHG1FSUZJeOGCdT0FcLOo +x59xFbihDET0D9TavxjQcHIcIJEyqbRhdnCSLO15c5/USGxeN5tRKd2p90EIQ+rxXnP sHDnyFr/Gg7sO+mjFNea+Q49J1uSAbS5H1PTyPnBuZSkxJHlDVtdLPodPaiKdiqg5f8/ ikPpF/WQUX2ReJ2qIvf5JdYQvnTP/y3iCKYqaOVyAPqFlev6ta/Q0aZ3H8I+5pQtUCGE GcqcLCIgCD3TS+WKACxCiT9b1RSkx2bkhoq/GSW+8qamKGyfLzSoPsaPipAMCyHoAZGd tCzg== 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=HSVdBe6r93QrgKS3he21TKM8q8THmRfH47H2f/qi7rs=; fh=gXdKdTzXVpCzUn5wRwZJ/NCMvVwA1kGKWl4i6uq6pzM=; b=AyZdsS3LcLeNiZKVDC+afvngnmdXr+q6nXP8oHPucrJsId+1I7VMh7QHp04C8bqJL6 MmdBKPRcKLLw3ppL3gcPuu6aDzs80KhOFYjWXE8e4XcHwgsS1sp1Qqeqr5ingm6ytoF+ lWiBGGf9rwiAMG0LwE2nlPx0l//F5lanzBYXCeqILdRbcK8gkwCjhlkuzL32cUyD+SME Vb5AkyfbahApL9T223/jDaSwjLuUplTUQhj/oms7pYApePUWa9CFmQ1MZoZOZfw51lB5 ar58u35pz8BKPjSEsD0BVow61c96qplYdVlfbVvuI+l8WVvfuUfuqXaOKt2mlfZoy482 nl5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=PsNnpMnS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id m11-20020a056a00080b00b006901a8f5dadsi7686704pfk.289.2023.09.17.21.53.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Sep 2023 21:53:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=PsNnpMnS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 7A5BF82CBA45; Sun, 17 Sep 2023 14:12:59 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238795AbjIQVMN (ORCPT + 99 others); Sun, 17 Sep 2023 17:12:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239032AbjIQVMA (ORCPT ); Sun, 17 Sep 2023 17:12:00 -0400 Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8AD0712B; Sun, 17 Sep 2023 14:11:54 -0700 (PDT) Received: by mail-lj1-x229.google.com with SMTP id 38308e7fff4ca-2b962c226ceso63382161fa.3; Sun, 17 Sep 2023 14:11:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694985112; x=1695589912; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=HSVdBe6r93QrgKS3he21TKM8q8THmRfH47H2f/qi7rs=; b=PsNnpMnS3g8oPR55wnZHHExVPpz6jjMODbwO7CzxG+pgoRBIqdNVj8Bu9zl/UZIxdG dDUefQm+e7XU3xwfOz4amUs2oHTStqUCVEknZytwqPJ/sr10VLJeDZzpQyibGmTM2kWL 2pDxrSbhR0lQlzVT8ztZTUWY1mymU6vIQBZys/ukk6nofPe4zg5OKdIx4JOkA+u69n+d eBvOeV+0vEyu83EhViJ3BnlFpltkYI9/5H8/bdsd8eLaq7wJxZwnNbPwNpK38nZojkqD wGOq5N2q0ZxoR1jpCvMc7e0AofHtPU2RvfIUEh1LUMbwEXYqMq0UAt1Ou2WJpQzW4tay OHxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694985112; x=1695589912; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HSVdBe6r93QrgKS3he21TKM8q8THmRfH47H2f/qi7rs=; b=vSlmQKZHxfcmQVb/lUIF9sjeAPy/koP8y+4jhJ/XBLmMIU1QAsoxg37Mjz40qlpEyO z7nJlfWkybtaC1BOw4BOFQEOIFsCwB2z0xTmstmKvC0oIykH2AwOSdYg7/yUxHGIF9Wp 94sXAnOJb7oo1Yf0skA0gzo0iwsLIiP9sb7y61b4s8ABwhqYDIzR5gdMhHD9+Cgi8ozV caTfS2cBoOg70kPxzS8qVhkrm/9m5cVfY1IBRGvfRIR9eNN4jkSEixvJsheahNpQYzaT S6/Xdi6+IfnLFYhiQHDUkaHLN+jJOcpv7QefEXv4QhXyqMBUQmyYh6AzEKhtOeYV2pxA U/UA== X-Gm-Message-State: AOJu0Yw7HmURuXsiCgAuAm0CvdyAHDIt3qDXgMJwBNy6r8oyW4p9NN6C nCVTJ+RdFeARRNcknv5dyB4= X-Received: by 2002:a2e:9656:0:b0:2be:4d40:f833 with SMTP id z22-20020a2e9656000000b002be4d40f833mr6406063ljh.18.1694985112315; Sun, 17 Sep 2023 14:11:52 -0700 (PDT) Received: from fr.lan ([46.31.31.48]) by smtp.googlemail.com with ESMTPSA id p15-20020a2e740f000000b002bce3123639sm1766309ljc.98.2023.09.17.14.11.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Sep 2023 14:11:51 -0700 (PDT) From: Ivan Mikhaylov To: Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Ivan Mikhaylov Subject: [PATCH 1/2] dt-bindings: adc: provide max34408/9 device tree binding document Date: Mon, 18 Sep 2023 00:11:42 +0300 Message-ID: <20230917211143.7094-2-fr0st61te@gmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230917211143.7094-1-fr0st61te@gmail.com> References: <20230917211143.7094-1-fr0st61te@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Sun, 17 Sep 2023 14:12:59 -0700 (PDT) The i2c driver with Rsense option for current monitoring. Signed-off-by: Ivan Mikhaylov --- .../bindings/iio/adc/maxim,max34408.yaml | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/adc/maxim,max34408.yaml diff --git a/Documentation/devicetree/bindings/iio/adc/maxim,max34408.yaml b/Documentation/devicetree/bindings/iio/adc/maxim,max34408.yaml new file mode 100644 index 000000000000..ae7c6ddb13d8 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/maxim,max34408.yaml @@ -0,0 +1,63 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/maxim,max34408.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Two- and four-channel current monitors with overcurrent control. + +maintainers: + - Ivan Mikhaylov + +description: | + The MAX34408/MAX34409 are two- and four-channel current monitors that are + configured and monitored with a standard I2C/SMBus serial interface. Each + unidirectional current sensor offers precision high-side operation with a + low full-scale sense voltage. The devices automatically sequence through + two or four channels and collect the current-sense samples and average them + to reduce the effect of impulse noise. The raw ADC samples are compared to + user-programmable digital thresholds to indicate overcurrent conditions. + Overcurrent conditions trigger a hardware output to provide an immediate + indication to shut down any necessary external circuitry. + + Specifications about the devices can be found at: + https://www.analog.com/media/en/technical-documentation/data-sheets/MAX34408-MAX34409.pdf + +properties: + compatible: + enum: + - maxim,max34408 + - maxim,max34409 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + maxim,rsense-val-micro-ohms: + description: + Adjust the Rsense value to monitor higher or lower current levels. + enum: [250, 500, 1000, 5000, 10000, 50000, 100000, 200000, 500000] + default: 1000 + +required: + - compatible + - reg + - maxim,rsense-val-micro-ohms + +additionalProperties: false + +examples: + - | + i2c { + + #address-cells = <1>; + #size-cells = <0>; + + adc@1e { + compatible = "maxim,max34409"; + reg = <0x1e>; + maxim,rsense-val-micro-ohms = <1000>; + }; + }; -- 2.42.0