From patchwork Thu Nov 3 13:00:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cosmin Tanislav X-Patchwork-Id: 14856 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp517553wru; Thu, 3 Nov 2022 06:06:40 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4UuMSwPMi0CrhhZz3IArNC/LX0/8ocQUlmJYqDvc0KqsHwZK4lD+ur86Fp9pj869KPmnW0 X-Received: by 2002:a17:906:eecb:b0:73c:5c85:142b with SMTP id wu11-20020a170906eecb00b0073c5c85142bmr29250465ejb.433.1667480799830; Thu, 03 Nov 2022 06:06:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667480799; cv=none; d=google.com; s=arc-20160816; b=NMcMFjPCGvaLmEvvYc8VRk712hn+yznYmwZQ8XsUc33PDO5xd15LR3bk+L10DBaEpT iOTuESTgAl3ByGZ4KmM0sVHkfevuHUO7Z3Eozloq4GbD7jPz7fdd5ACTRCVBHMH05FVr 1SW2a1jma+e2/q79IT2WPPT0/sXL4RmRWiD1ya8107Y9rngaqS9XWTeVvO6AsEpyRP1R uZ2tCW1HAMFuR+VMI7JRxOEWZTH87FtF6YVy0yX77jv6CXTOzj4BREzDI2ms60uSxnM8 +wpZ16/diVDHlMm+32d303BQjaYSMHUFz6kxgjnNN5vjRwSXgIlrp1pRaLJE+OPxPKfQ YzSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:from :dkim-signature; bh=PZWrkx//J0EsJcOiPtQ2AzCqMEINB9X17hPf/F/cMpo=; b=OBwFiHotcciM+Jx0swKp5SgFznkpaDItoU4E7EEWTDtzssa7NSwOf5ISU0Ae84tDtn WJTKk28qPpzQ9/GQbxY5HySv71Whkfi9BeHyIt1+xGUrT8LVlrffS7Qel1PtmbJ2t2ta 2ndTsJNsoAJ8+KcJSdq5FdJMK5fOgALNDs7Ik4oZGSHO5+MlJhhFNkLpSbhV78l4HMbk 4ZeahvnM4wqYBNGIOzOKX60uzFpMhQFTgFh++aaPCuahj3PqV8zSxUqL1SqWsvCpwsN4 HYaXzEVun2NYJ6bGZlw7v1WQmBqKT3w6L4jA0klH8Gm1daAuSraMg7j8ACqKY29NPR5C gMSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20210112 header.b=qqI83zYH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dn22-20020a17090794d600b007827639faffsi1310865ejc.760.2022.11.03.06.06.13; Thu, 03 Nov 2022 06:06:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20210112 header.b=qqI83zYH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230147AbiKCNCr (ORCPT + 99 others); Thu, 3 Nov 2022 09:02:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231778AbiKCNCH (ORCPT ); Thu, 3 Nov 2022 09:02:07 -0400 Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3BE79140B3; Thu, 3 Nov 2022 06:01:39 -0700 (PDT) Received: by mail-ed1-x532.google.com with SMTP id y69so2870761ede.5; Thu, 03 Nov 2022 06:01:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=PZWrkx//J0EsJcOiPtQ2AzCqMEINB9X17hPf/F/cMpo=; b=qqI83zYHLBlYxE6D3VsxMCkiYu4kqRLp5lrdMH2UNv85xZbjcVE3jb3tvfPnLH9+QT WA3jox4ILcz2Mgzd4F7UdwKE7oHK219VgnA0/IRn2hbxtdf73UIYdQ1om7iUBJCzPoXy SX/+z4hVjd3ub6AQXv4D3BJZYsZL0uR92Waw49MdRzNxJXj0B+VPUx81cpVXgXoToHvx AOwFqW9NiUi0t7aQ3d9QR50sAN6/jMVvYDOqJ/qVd9NNU6D97yeAj1r27meQGqMews72 6N6U+lvg8oHY/mpw662HtyzXT1POJoA6zWMpE8VAPj7/APyuw+JkvVDVRto0GpQJh9Ii O+uA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=PZWrkx//J0EsJcOiPtQ2AzCqMEINB9X17hPf/F/cMpo=; b=AMDIFQ3rZ+6ZRTvkQ9aYPFlV7TwLtNFCeFDVj/Y6BW7Q20Fn7MhyT4UMoBsCn4d/ce cbBI1Fw1Hr4piFko8yXfD3uc8SbNga239LFiicGUmeMzQv5zvL8TZYCosS7loWWvhz5D VJClEAoPWIkyOe7TR/TWxl7S6zS426h2nfzglF7kvCCoFnCZ9kgDpuo9KgzPvOlDmfLQ R27codKUvChvgi/cLNp6zl8y4tWLBOr2MGLtsugNQRqFTruzk4Ui2y37kSiHor1NHlDh 2mfM2tA+ym5pUQ2uBDyBCOn4pyAhKf9N8Y1jM8bfKMusskumUzviKfOluCiFEh/SV5Dl stAA== X-Gm-Message-State: ACrzQf3Tc9V73+YUXW3krncXQq+eztcKjWBaH2tbThbRD/pv8mo5W4Jl Pen5cU35D6TPZIdnmEG/g9o= X-Received: by 2002:aa7:cc13:0:b0:453:52dc:1bbf with SMTP id q19-20020aa7cc13000000b0045352dc1bbfmr30403160edt.30.1667480497446; Thu, 03 Nov 2022 06:01:37 -0700 (PDT) Received: from localhost.localdomain ([5.2.194.157]) by smtp.gmail.com with ESMTPSA id q12-20020a17090676cc00b00779a605c777sm451829ejn.192.2022.11.03.06.01.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 06:01:37 -0700 (PDT) From: Cosmin Tanislav Cc: Lars-Peter Clausen , Michael Hennerich , =?utf-8?q?Nuno_S=C3=A1?= , Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Cosmin Tanislav , Rob Herring Subject: [PATCH v4 12/13] dt-bindings: iio: temperature: ltc2983: support more parts Date: Thu, 3 Nov 2022 15:00:40 +0200 Message-Id: <20221103130041.2153295-13-demonsingur@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221103130041.2153295-1-demonsingur@gmail.com> References: <20221103130041.2153295-1-demonsingur@gmail.com> MIME-Version: 1.0 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_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748480347242946409?= X-GMAIL-MSGID: =?utf-8?q?1748480347242946409?= From: Cosmin Tanislav Add support for the following parts: * LTC2984 * LTC2986 * LTM2985 The LTC2984 is a variant of the LTC2983 with EEPROM. The LTC2986 is a variant of the LTC2983 with only 10 channels, EEPROM and support for active analog temperature sensors. The LTM2985 is software-compatible with the LTC2986. Signed-off-by: Cosmin Tanislav Reviewed-by: Rob Herring --- .../bindings/iio/temperature/adi,ltc2983.yaml | 60 +++++++++++++++++-- 1 file changed, 56 insertions(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml b/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml index bd357ff28e65..ccab94b20b24 100644 --- a/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml +++ b/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml @@ -4,19 +4,30 @@ $id: http://devicetree.org/schemas/iio/temperature/adi,ltc2983.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# -title: Analog Devices LTC2983 Multi-sensor Temperature system +title: Analog Devices LTC2983, LTC2986, LTM2985 Multi-sensor Temperature system maintainers: - Nuno Sá description: | - Analog Devices LTC2983 Multi-Sensor Digital Temperature Measurement System + Analog Devices LTC2983, LTC2984, LTC2986, LTM2985 Multi-Sensor Digital + Temperature Measurement Systems + https://www.analog.com/media/en/technical-documentation/data-sheets/2983fc.pdf + https://www.analog.com/media/en/technical-documentation/data-sheets/2984fb.pdf + https://www.analog.com/media/en/technical-documentation/data-sheets/29861fa.pdf + https://www.analog.com/media/en/technical-documentation/data-sheets/ltm2985.pdf properties: compatible: - enum: - - adi,ltc2983 + oneOf: + - enum: + - adi,ltc2983 + - adi,ltc2986 + - adi,ltm2985 + - items: + - const: adi,ltc2984 + - const: adi,ltc2983 reg: maxItems: 1 @@ -386,6 +397,35 @@ patternProperties: description: Whether the sensor is single-ended. type: boolean + "^temp@": + type: object + description: Active analog temperature sensor. + + properties: + adi,sensor-type: + description: Sensor type for active analog temperature sensors. + $ref: /schemas/types.yaml#/definitions/uint32 + const: 31 + + adi,single-ended: + description: Whether the sensor is single-ended. + type: boolean + + adi,custom-temp: + description: + Used for digitizing active analog temperature sensors. + See Page 67 of the LTM2985 datasheet. + $ref: /schemas/types.yaml#/definitions/uint64-matrix + minItems: 3 + maxItems: 64 + items: + items: + - description: Voltage point in nV, signed. + - description: Temperature point in uK. + + required: + - adi,custom-temp + "^rsense@": type: object description: Sense resistor sensor. @@ -413,6 +453,18 @@ required: additionalProperties: false +allOf: + - if: + properties: + compatible: + contains: + enum: + - adi,ltc2983 + - adi,ltc2984 + then: + patternProperties: + "^temp@": false + examples: - | #include