From patchwork Thu Nov 3 13:00:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cosmin Tanislav X-Patchwork-Id: 14846 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp516549wru; Thu, 3 Nov 2022 06:05:26 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6RWMzDEwXEgBjyRB/LjTUjWnGMI3h9cRwidlEwwJhlfpYtLGKeLUcN+2X0IucdKiOTdbnv X-Received: by 2002:a63:124b:0:b0:470:3c0:7a57 with SMTP id 11-20020a63124b000000b0047003c07a57mr9007322pgs.142.1667480726471; Thu, 03 Nov 2022 06:05:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667480726; cv=none; d=google.com; s=arc-20160816; b=UyTMAVaSIJFTd1d4qev1AoFyz5rKLE1ImA76RMkpCDow03uh+51ZVlFutWr+9pEZR8 LXL7HqXPl+h8feIo+MGtAOMjuG96P+RhBwMTujqemW+iVxLqnhowx4D6+G32ZGfvsxUx O5siErghJN9OeXd6ap7+GDJ8TFAGIa2bUAfirl76kGiGfm3ZaQ8yBwj4VTuX1XFTFL0I P1fekNxAUcqo6DBM/tIZuATXehBjHkMAw69iU2AhaDLSVhQPTLqlODJVCpUxYylicJy3 cf3XbnBFblE9GH+dX+MJ/7IgbvoVUjJcuQD46EiZZljfwT8a8Y57IBDAI9RnSFkBbsrS b7Qw== 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=dkllNL0GpBnoMQ1ygISVBZa6WEvqeNfaI6WJdu1D4w4=; b=PhqXN2v/NM5oXKd1XpSyVvEafiOOkFlZTwI0ktG7/AM11wdS9Rs8pyh8ZoUbeZN//W Ii/1Mi9LKEgjVLli5/TVAB7wmqjOEr9+iT1y3HE1PkYIFtytqtS7TGxeDqr5/0XVoKAi Oy2L6kUTGL99wHktBQuwJz/lWv+VuIN331IPMYSWozY8myUBDT2hVK1H36Z8I4kRzfCq 1NQl2k/iCmq7z/LJB16BZutEufyZUCR1Hqe6bzMANNGN92G3T/W2N85rqRnAjzEDVtEe UQ89K8Sozr/RC6j+cGSeemxY6v+6VRLoPOYlWjIQeILlzGVztPfM99FAVSps3lIUo5vI JSJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20210112 header.b="VAhuxo/H"; 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 gb8-20020a17090b060800b00212ce534ef7si1096178pjb.22.2022.11.03.06.05.01; Thu, 03 Nov 2022 06:05:26 -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="VAhuxo/H"; 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 S231312AbiKCNBP (ORCPT + 99 others); Thu, 3 Nov 2022 09:01:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230481AbiKCNBG (ORCPT ); Thu, 3 Nov 2022 09:01:06 -0400 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5727511C27; Thu, 3 Nov 2022 06:01:05 -0700 (PDT) Received: by mail-ej1-x62f.google.com with SMTP id d26so4939766eje.10; Thu, 03 Nov 2022 06:01:05 -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=dkllNL0GpBnoMQ1ygISVBZa6WEvqeNfaI6WJdu1D4w4=; b=VAhuxo/HphVdvzXuW55OopJQAiksaZpXvmCmywuzIHtLKBLEmdBd6Txc8PU79JITD9 hj4n6jiF1vPKzEvbfPTys3wEsYuaOrIExll7fIIwIMyfSNa4MS6oNN7by7GHPai0D4SD LZkPaOFaaP4Nf2BYXcX9n8qjxrB8PlnDc6xqJoMkCiS8IuGXg7xXAqZ0QZiJW6ZXqbMD nDJJ//X6ysGLLATOw4F2Ac6u0LB/vYhlP/tma3R9wj/AdjlRlYuruEfEeNnAo/zCiLxm paTr+7ZfDvdFj1Z8wgQcDnQu8earV2Vhxafjxda9uPAANx2kSpCp3vZLFkEcrN+5Zhro YqhQ== 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=dkllNL0GpBnoMQ1ygISVBZa6WEvqeNfaI6WJdu1D4w4=; b=EbNO9hmv/dBQt1yF10dLk6xlcC21aI15tZzuCI0ysTUutK/KScRsUhUtYIy2uKgVNu GvS/oDxGwlyxKrq2A/on47es2DtnuUWxOAaITNKV31E5DIdQ3wQSFvTczwcGQ6IK+qq5 BBlyK8L4Psd5Cr33j9TkxK5R5JuM0jQd7cFGHSMhF49mawrYG6XxDbWmh7HUJfbGwm+b 0Xl1dbY+7Hn/IoQcktkGf53hXjEKKqPOxpaYitKh0Ah1m41H94t5YPjZAoIDrxQOHsKV zgNXFLA8+1t50lkZyTuNkCuhN72WVNp7rj0xH8MkAnl4wWp+eYnKgw+i9P0VfK/x9gIB wjlA== X-Gm-Message-State: ACrzQf0hd95lZXdNpISqaHFH+Aj13B6e4DsCNnI75ho9x6bWm36G6Dsd grv+nnryaKnp3Bi4THFkwrs= X-Received: by 2002:a17:906:8469:b0:7ad:dd13:571c with SMTP id hx9-20020a170906846900b007addd13571cmr18956805ejc.141.1667480464365; Thu, 03 Nov 2022 06:01:04 -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.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 06:01:03 -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 Subject: [PATCH v4 01/13] iio: temperature: ltc2983: make bulk write buffer DMA-safe Date: Thu, 3 Nov 2022 15:00:29 +0200 Message-Id: <20221103130041.2153295-2-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?1748480270277355289?= X-GMAIL-MSGID: =?utf-8?q?1748480270277355289?= From: Cosmin Tanislav regmap_bulk_write() does not guarantee implicit DMA-safety, even though the current implementation duplicates the given buffer. Do not rely on it. Fixes: f110f3188e56 ("iio: temperature: Add support for LTC2983") Signed-off-by: Cosmin Tanislav --- drivers/iio/temperature/ltc2983.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/iio/temperature/ltc2983.c b/drivers/iio/temperature/ltc2983.c index b652d2b39bcf..ca1bb5f48988 100644 --- a/drivers/iio/temperature/ltc2983.c +++ b/drivers/iio/temperature/ltc2983.c @@ -209,6 +209,7 @@ struct ltc2983_data { * Holds the converted temperature */ __be32 temp __aligned(IIO_DMA_MINALIGN); + __be32 chan_val; }; struct ltc2983_sensor { @@ -313,19 +314,18 @@ static int __ltc2983_fault_handler(const struct ltc2983_data *st, return 0; } -static int __ltc2983_chan_assign_common(const struct ltc2983_data *st, +static int __ltc2983_chan_assign_common(struct ltc2983_data *st, const struct ltc2983_sensor *sensor, u32 chan_val) { u32 reg = LTC2983_CHAN_START_ADDR(sensor->chan); - __be32 __chan_val; chan_val |= LTC2983_CHAN_TYPE(sensor->type); dev_dbg(&st->spi->dev, "Assign reg:0x%04X, val:0x%08X\n", reg, chan_val); - __chan_val = cpu_to_be32(chan_val); - return regmap_bulk_write(st->regmap, reg, &__chan_val, - sizeof(__chan_val)); + st->chan_val = cpu_to_be32(chan_val); + return regmap_bulk_write(st->regmap, reg, &st->chan_val, + sizeof(st->chan_val)); } static int __ltc2983_chan_custom_sensor_assign(struct ltc2983_data *st, From patchwork Thu Nov 3 13:00:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cosmin Tanislav X-Patchwork-Id: 14848 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp516669wru; Thu, 3 Nov 2022 06:05:34 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7eN6w1n63Cphn9AIvoBO0HKIShYJxkHsZe2xTTZ77+PNCAEK1gBjrcIningSgsdK5JIByj X-Received: by 2002:a17:906:1ec5:b0:78d:b3d1:183b with SMTP id m5-20020a1709061ec500b0078db3d1183bmr29273809ejj.709.1667480731117; Thu, 03 Nov 2022 06:05:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667480731; cv=none; d=google.com; s=arc-20160816; b=cG7b21Bq4+I3uGy3j3Xr2qz06h5nl03CMzYIA4ZMZDe476oystREX7kzSR185QMRsD Y0k5O8Q4nvahZM9TCpEYuFjVuEtgwr7/+xjpkTl6BKMHsIfvFHFkqd9HHvIy9UWm+obk RNJNDv3qs8v7WO/5sq/cxyPFz42EYdS7QvRTVF4xbVkUwe3X5+/cI3W3yZZeEDtwPw14 M2DkBwrN62CsHlppa7FKOL9EbHTH32VtDmOrMWQQNhOjjMOgw5Yq0x4HkFQnOMlHWWYg mOtYG9kIAoDu7j0v7Rkgs7SKIO904okN08B1iqqzDYnOvXv8yUbbGcjsZSZ+dSibB85k Q3uQ== 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=6jP3J9plPDooyKZLUAyrWRWPPQKz9UGS5zDe2H3qftM=; b=0SMzu3F/ky9jwQsREjCpnSKxJ9/0SYkXVtfDNSzWalLwVcgcB0elgzjHNVIO+d6qUC iVRwTp9MS5y99qVKskvdh955GqL8yQBe3gyDB7aP8osRF4JORDEcem8gFtoyjPokQOr6 6W0/WxxDzBa1gm6ZtdduKu3885liYFKlkFcft2DlU/sI3vxgx0OlGOmrYOyowaaBzxXb iQJlvMxf7sU3fGMNcnEqR3JZU6O1Vp8DoFvZ4qBvs7xV0HEKZnLUC8gaRX6j4JVPcDC5 eH8YBuzSHrpfBy2xZ5kDe/jYpJMtrEW8qmvWzPRy8KkGNEvYb8VlMFxJYpSLMpvrfPM8 EeMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20210112 header.b="qO6z56/T"; 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 qb42-20020a1709077eaa00b0078ddf8926d2si1251091ejc.827.2022.11.03.06.05.03; Thu, 03 Nov 2022 06:05:31 -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="qO6z56/T"; 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 S230500AbiKCNBV (ORCPT + 99 others); Thu, 3 Nov 2022 09:01:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231571AbiKCNBK (ORCPT ); Thu, 3 Nov 2022 09:01:10 -0400 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C00AB11C3B; Thu, 3 Nov 2022 06:01:09 -0700 (PDT) Received: by mail-ej1-x62d.google.com with SMTP id t25so4959617ejb.8; Thu, 03 Nov 2022 06:01:09 -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=6jP3J9plPDooyKZLUAyrWRWPPQKz9UGS5zDe2H3qftM=; b=qO6z56/TPubFq3qhOmYFRhAs+SaRv1kQLkMq+HgDfKTh5VyAri4rsXd+CJtMZRgWRM 895YVwl4G/pMDz10OsDrSq8MTXMxYkOsz0fsnWcN9RI+PF5j0lEzOmF+CWp4tgm96Avl YM2tblBLoLz/x0N9pkLdravCF13nsKJzTof983sJXxxhWea0cwhFMjgUBlHvhN36y1UJ NVoLEFC9gumNCZMN3tcEPZYFjFhMSkJy7ZobPOiVqrD5/m9dWuUPmDTiJgi1jxMwRZZF pmPZTRyS2mJ69h49Jz7qsKvKl5liEKobx0GG8DLE62tR2WO4b6sRwGYAwWHn3uCPkMdd 3c4A== 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=6jP3J9plPDooyKZLUAyrWRWPPQKz9UGS5zDe2H3qftM=; b=npVd086G3/z8VTUwZSlxyTt/7cTjZQ9sD+ytkirE9Ra0i6Sc/ne8L/Ekg6274IbxTJ Sth4veYRIHIrKJguO5+kSKEoHag5BGpEB1UodbM/eV2/C1i9G0x8Jq2ij3IDvInX9NEF u7PjALX/roIDRC7zPhL0pX5ttM+Qkes9bJoPZyDc+JmbCgW11dsHTiIeK0atOUHOc4CN FJSj6b0fRCAak09hMHclLu+/N0lug2M8aPSlsoj6lMYfvtjACdwP0VojQbD1CBohU0XU 8LEGC7UddpYoyJywdeEbXE54G/YksQLnFWS3DZWclXGx92dVc4iczZiK6ek4+IIduun/ g6vg== X-Gm-Message-State: ACrzQf2xB6loRJrnBQ7Vnj9TFP2ihntrOoMg/Fko+yJTZNGcFwAmzlXr fee4U+WborPR1dg99Uxc+WE= X-Received: by 2002:a17:907:2c74:b0:7a1:d333:f214 with SMTP id ib20-20020a1709072c7400b007a1d333f214mr29597833ejc.14.1667480468352; Thu, 03 Nov 2022 06:01:08 -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.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 06:01:08 -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 Subject: [PATCH v4 02/13] dt-bindings: iio: temperature: ltc2983: add default values Date: Thu, 3 Nov 2022 15:00:30 +0200 Message-Id: <20221103130041.2153295-3-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?1748480275061137079?= X-GMAIL-MSGID: =?utf-8?q?1748480275061137079?= From: Cosmin Tanislav Binding properties should have default values to let the reader know if they should change it. Add them based on driver logic. Signed-off-by: Cosmin Tanislav Reviewed-by: Rob Herring --- .../devicetree/bindings/iio/temperature/adi,ltc2983.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml b/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml index 722781aa4697..82667adc85b1 100644 --- a/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml +++ b/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml @@ -34,6 +34,7 @@ properties: cases. An extra delay can be configured using this property. The value is rounded to nearest 100us. maximum: 255 + default: 0 adi,filter-notch-freq: description: @@ -45,6 +46,7 @@ properties: $ref: /schemas/types.yaml#/definitions/uint32 minimum: 0 maximum: 2 + default: 0 '#address-cells': const: 1 @@ -104,6 +106,7 @@ patternProperties: This property set's the pulsed current value applied during open-circuit detect. enum: [10, 100, 500, 1000] + default: 10 adi,cold-junction-handle: description: @@ -163,6 +166,7 @@ patternProperties: cycles, this property will assume different predefined values on each cycle. Just set the value of the first cycle (1l). enum: [10, 20, 40, 80] + default: 10 adi,ideal-factor-value: description: @@ -170,6 +174,7 @@ patternProperties: be multiplied by 1000000 to remove the fractional part. For more information look at table 20 of the datasheet. $ref: /schemas/types.yaml#/definitions/uint32 + default: 0 "^rtd@": type: object @@ -207,6 +212,7 @@ patternProperties: property to 5 means 4 wires with Kelvin Rsense. $ref: /schemas/types.yaml#/definitions/uint32 enum: [2, 3, 4, 5] + default: 2 adi,rsense-share: description: @@ -226,6 +232,7 @@ patternProperties: This property controls the magnitude of the excitation current applied to the RTD. enum: [5, 10, 25, 50, 100, 250, 500, 1000] + default: 5 adi,rtd-curve: description: @@ -234,6 +241,7 @@ patternProperties: $ref: /schemas/types.yaml#/definitions/uint32 minimum: 0 maximum: 3 + default: 0 adi,custom-rtd: description: @@ -308,6 +316,7 @@ patternProperties: $ref: /schemas/types.yaml#/definitions/uint32 enum: [0, 250, 500, 1000, 5000, 10000, 25000, 50000, 100000, 250000, 500000, 1000000] + default: 0 adi,custom-thermistor: description: From patchwork Thu Nov 3 13:00:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cosmin Tanislav X-Patchwork-Id: 14847 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp516633wru; Thu, 3 Nov 2022 06:05:32 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4B7ucljDRzQM07Q7WDECntTl5waOqSriHTvg/lYHdV8o+zcW11gObzc71KUcoq9Ep7TUiF X-Received: by 2002:a17:902:f647:b0:183:cb8d:40a0 with SMTP id m7-20020a170902f64700b00183cb8d40a0mr29967450plg.18.1667480732182; Thu, 03 Nov 2022 06:05:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667480732; cv=none; d=google.com; s=arc-20160816; b=F4bYzUpKa8S05y2oesPCngjXiNnCyx46CD2CiQl7p4KVuynlNEbMu6bDcCgGFGBEw+ gsseCsfGLjTZ6nA9dLxLwhrElNCoZjIA/YfWm61ZswX6gQNJ+deV/J85CtKAkIlV1+g8 ZLQUeHFy/ptr+MSwezy/SUAl1jHjNQLh1Fgi4Xhc86KlJnsoCJjo1K+pemXr6hmYlQvx QHD3lcHq695IuaH3C9DFgzhG/nf+Cg8PTdChxSeKXrFryVczWaVgoOAl+iEmU1Hp6OId 5Qp3IbZYdOxZTDplhZUGbf3TOKEQW4h3NYd9J8n1xQMYvZUWUXw1SsPB/PToUlgZoSHe qfkA== 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=RaTZtDR0TYFCz7i+1pOBqesyuPZfqn64Er9UEoziVtg=; b=M9RPV8p4M08munxA+QmgM0miK3Fpp4NlqGx/uhmNNWztjmCAZKK3LTnE4yUZNGvxnm UFpw4pG/T4xcxlvFosqeBY0l4yAtvSwJUHmtliZDzRRtwOcrrK7qDc8YSmEm0QharIap tZmLYJjUvOpS2dh6pXl9lJ2BVJEUfqxfgoOzvM/q5Aph578pg9Yaf1JR76vDDDnr35F0 wQgew8tEkLQgCxWJyHOZQoSjFdcZg052PtuxZkxJdC5xImCRujL7XR57iJ/L7uylJO3l y2gzmkfaEbfABZht8TQ/6RXc2G2D5dtQlBkW+P/WtUAapRlhU6jSpIt7uD83owl40DlE 4rDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20210112 header.b=Ezpvi8ir; 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 a2-20020a170902ecc200b0018694bb16cbsi696796plh.569.2022.11.03.06.05.10; Thu, 03 Nov 2022 06:05:32 -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=Ezpvi8ir; 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 S231531AbiKCNBd (ORCPT + 99 others); Thu, 3 Nov 2022 09:01:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231608AbiKCNBQ (ORCPT ); Thu, 3 Nov 2022 09:01:16 -0400 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 145E611C3B; Thu, 3 Nov 2022 06:01:15 -0700 (PDT) Received: by mail-ej1-x632.google.com with SMTP id kt23so4978627ejc.7; Thu, 03 Nov 2022 06:01:14 -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=RaTZtDR0TYFCz7i+1pOBqesyuPZfqn64Er9UEoziVtg=; b=Ezpvi8ir/iAl/l0UWjUGjFxvoDYtTYfDLrLQjPzHycAsdKbPTBMo4JtT+FqOLebh2y rconcgFXudbDyB0bmfXpp1splmpzNSVKAx3ZZ61NCEgc42D3bEVunct/w7Y1gh3/m+zV I0idt/ErkjAcxkZaqpIuRIQIRfSXpimtfvQmxDpeVV8Dg6MPR20oXd+bwnapFKbK+Ci9 K6pndCroMYZcNfiw/Dt/gPsTkgfk+HoXGscbxcAYM2I4WGOPa4RFIpvSO+BPfc/xBEyR W6QNPJ2j9bWpsgb5QIS0YulgNvHZEVIW8OwGhWAGvN5Q0WFJw5lyvQenAtszZaSsUJ7Z 96Wg== 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=RaTZtDR0TYFCz7i+1pOBqesyuPZfqn64Er9UEoziVtg=; b=IDuiDQKgJlZ02Zcb3lMT0RC/50XMr3eWpRRg3AZzdUmg4doXP2JjVEpQPykVjXrCEM cTRrz0fn5wFGJD2BKHFCVEsLZsHetzfNhsQ1tgQzOW2r724fShmBq2n13bzWVGC2Rk6i w0BJlB33Ruo6WWIN8xf0OiNmkTa+PGj4ywsST33eWwJ70vcVrXs7Rd3R+kgx5g7NaMCs Xp+EEJpzFG1aF8O3/7QmCMlK1J3+YC2HJr2fiFffoRxXgjdls78f3kJeu3ERbVbm/cXQ VB5Ngy4ib3iyzY9o34+RnMR5ZOwaZbfTUPox2gtr8Jt5SGcnmt8Y6la6uNh1wkld/Y/H tmPg== X-Gm-Message-State: ACrzQf1sPq353K2EgsyFY3VfUMuyIkHqBz5xNfbyaoqbWRefwh7PbNqD 7GpGszzb7696dNIAQGpu4FM= X-Received: by 2002:a17:907:6e0d:b0:7ae:2277:9fc9 with SMTP id sd13-20020a1709076e0d00b007ae22779fc9mr1536983ejc.334.1667480471896; Thu, 03 Nov 2022 06:01:11 -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.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 06:01:11 -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 Subject: [PATCH v4 03/13] dt-bindings: iio: temperature: ltc2983: use hex for sensor address Date: Thu, 3 Nov 2022 15:00:31 +0200 Message-Id: <20221103130041.2153295-4-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?1748480276493628759?= X-GMAIL-MSGID: =?utf-8?q?1748480276493628759?= From: Cosmin Tanislav Addresses should be in hex, fix it. Although the driver initially specified 1-20, it can be made free-range since the address is supposed to match reg, onto which we can impose restrictions based on the compatible property value. Signed-off-by: Cosmin Tanislav Acked-by: Rob Herring --- .../devicetree/bindings/iio/temperature/adi,ltc2983.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml b/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml index 82667adc85b1..29f6fa5e2529 100644 --- a/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml +++ b/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml @@ -55,7 +55,7 @@ properties: const: 0 patternProperties: - "@([1-9]|1[0-9]|20)$": + "@([0-9a-f]+)$": type: object properties: From patchwork Thu Nov 3 13:00:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cosmin Tanislav X-Patchwork-Id: 14850 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp516927wru; Thu, 3 Nov 2022 06:05:53 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7tvUD7FdNT4xLXnALh6GhIQhGXrtn3NvYDqFrKhPfIFrYBKW3qV6XX+TXhfGeEDYtYCiIv X-Received: by 2002:a17:90b:1490:b0:212:68bf:fcc5 with SMTP id js16-20020a17090b149000b0021268bffcc5mr13767012pjb.52.1667480753454; Thu, 03 Nov 2022 06:05:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667480753; cv=none; d=google.com; s=arc-20160816; b=qZd8D3gT/fH4chUEggZ97UnS2CL5jkyNL1pfFY9oHabXkF1QhQLankXTSIYoTn+ERK J140sih+DgQFBBDSLozMOh8J25xg0FIvSzdGBvKRrpcuo20OG2lVFzuowvcSPC7dFMyq TH3waQtBMfzYi3Ndabc7rDzYbFNEh1ETnc8IFO0zANpDygr1wZcsPzoQUbXtAWnK0jj2 NEMRfl0QwblgbA5SLLhCyJDhTarMXotdzxg1LKANfqz/1Q48ZQdZxl3uRVtrodc0yTWy H38rP+UrtOIqUtkFIPW/lKmKOmj1L2RlfjeiZT3512wSivpVOw6K9VO6RNrZTU4QHGN9 WsEg== 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=W9sx36prwxLbye8vg1FZsE+HqNZsZkJYCt0cI8Qm494=; b=v5ZQks50zddqR85KW9pEI4lUOYqFGbqvGL3gD93YnBw25Q0F+JLh6eZ95fzkoNBh6J LeyZEI6vgx482sa3ZidoZDeMzUf3SC2K467524JYWGzpDZU6boO5Kwk9glbQ88emIhu3 jwDULq83s6itIOSfEleuAZ2f8XPRViIl/IZ01vh2BMKl1AyNqJLL5uOwJ1QvFFdpH3Mi BMxpeOjHpIistK72MhqlMjvcG4RrPurEst2u2Ndqj5v07gCnj6qOPznDRFCp5Fdi+eHs +HG31k97bGKCORvxkIdKXaHlDTH9XRyQ3nLonGbnAbcQ/rc1/Q0gzQ919ycX1iussYZu UGiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20210112 header.b=KTiaba50; 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 q12-20020a170902eb8c00b0018694b85992si652653plg.389.2022.11.03.06.05.28; Thu, 03 Nov 2022 06:05:53 -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=KTiaba50; 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 S231747AbiKCNBm (ORCPT + 99 others); Thu, 3 Nov 2022 09:01:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230209AbiKCNB1 (ORCPT ); Thu, 3 Nov 2022 09:01:27 -0400 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B96B51408F; Thu, 3 Nov 2022 06:01:17 -0700 (PDT) Received: by mail-ed1-x52b.google.com with SMTP id f7so2866887edc.6; Thu, 03 Nov 2022 06:01:17 -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=W9sx36prwxLbye8vg1FZsE+HqNZsZkJYCt0cI8Qm494=; b=KTiaba50N29jX2UkZnmaka1xRvjrcNtTCGvO3h91tgkH3BhhNk0oyZ6V37fdBIqEoZ plMlJjWQGcfusNqMaPDp5x5FMjoyvADXYq1G8ibCspG4W+M26v2dD1vPqDPPz3mYRk+3 REAtdTfrM98hIwqld8A0Rk2pYA/SAqctrMOXLwLhMxC5FQg1RRndW94RAphXBoLB6azU DRrF0Et2P7Oh86ZG+609nNg5n9iVHduxTxOV4k5w7uqrniiw1G5Y653rJcJeCUDU4ILE f8E83PR8pWVoGmBcM0ZYCYzeRw1+RVx3+/tsxnIZUbp3tQL3g4dglcMjfnc+NoMvXxq0 qn1A== 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=W9sx36prwxLbye8vg1FZsE+HqNZsZkJYCt0cI8Qm494=; b=DEhXRS7in24pMvs6t2XKQSbeO+n7C295Tf2TMR1Oft62WPY8a5UBFOKc/mcOf65EsT TFSkx8dy39S+tI6bmlgqtG+5FOcJy1XnhGV3Obl8tXQcx2eY5dD/kh8me1ZyQZHvf/15 Ed61+CfDIddJph16AHfM/Ige3VzEFBmUpLChDK7Fr2FH5aL9Pucq7v3xsmP9rwVjHp6A qs3U7LFlsc3HSFS+BkOoNa/l/3zoiAScITtnnT//CmgtFPKjMAuKOtqLb7PZnznbTmDa rMx0nvUpd+erMDmqWdSfN/0B+POOty1guU7IgQpC8036DbCmo7VSuCxMTQVp/++uPOhA NzEA== X-Gm-Message-State: ACrzQf2dkVDT7h2FlRHhjJspSJXa3+peBkm225L2KJAo2I5hGs0ySuaI 8mcDBCyhd3Yjis8/Y9UDpTQ= X-Received: by 2002:a50:ec0a:0:b0:461:c0ca:a0bc with SMTP id g10-20020a50ec0a000000b00461c0caa0bcmr30078641edr.306.1667480475556; Thu, 03 Nov 2022 06:01:15 -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.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 06:01:15 -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 Subject: [PATCH v4 04/13] dt-bindings: iio: temperature: ltc2983: remove qutations from phandle ref Date: Thu, 3 Nov 2022 15:00:32 +0200 Message-Id: <20221103130041.2153295-5-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?1748480298283161337?= X-GMAIL-MSGID: =?utf-8?q?1748480298283161337?= From: Cosmin Tanislav Not needed, so why have them? Signed-off-by: Cosmin Tanislav Acked-by: Rob Herring --- .../devicetree/bindings/iio/temperature/adi,ltc2983.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml b/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml index 29f6fa5e2529..6b3a20448f78 100644 --- a/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml +++ b/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml @@ -112,7 +112,7 @@ patternProperties: description: Phandle which points to a sensor object responsible for measuring the thermocouple cold junction temperature. - $ref: "/schemas/types.yaml#/definitions/phandle" + $ref: /schemas/types.yaml#/definitions/phandle adi,custom-thermocouple: description: @@ -204,7 +204,7 @@ patternProperties: adi,rsense-handle: description: Phandle pointing to a rsense object associated with this RTD. - $ref: "/schemas/types.yaml#/definitions/phandle" + $ref: /schemas/types.yaml#/definitions/phandle adi,number-of-wires: description: @@ -288,7 +288,7 @@ patternProperties: description: Phandle pointing to a rsense object associated with this thermistor. - $ref: "/schemas/types.yaml#/definitions/phandle" + $ref: /schemas/types.yaml#/definitions/phandle adi,single-ended: description: From patchwork Thu Nov 3 13:00:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cosmin Tanislav X-Patchwork-Id: 14849 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp516843wru; Thu, 3 Nov 2022 06:05:46 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6LCpESvsuFbjKB4wbubuukVgFLkS73S+C+kr+TyvdDrdNGhG7fRSJkI7PrSnUpaTL/4vKB X-Received: by 2002:a63:d241:0:b0:43c:474c:c6c6 with SMTP id t1-20020a63d241000000b0043c474cc6c6mr26180816pgi.523.1667480746307; Thu, 03 Nov 2022 06:05:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667480746; cv=none; d=google.com; s=arc-20160816; b=l/Xfe0ayuw9F2bUoDiPjTw0BUe7bE07jVstlojCVfbuL3CTVf7esNXidtUihDUzE78 DCf3JZ79uOGSTMJaR8xw6oPvS2ROxHHkBvUiTPorTImnHcmuwdiDdU5p3xwnQbci6bn9 cFOsv1ant8EazTT0jm0t2uu6UL74dFudLD82DPkMHexI86P1sKz85bnkM3QURsRXJzCj uR/qC4zYPIAPb6QjZcdqbqtn/2Z2+7NAjdLVQfUJkb9v4+nb4Hmam0LGhSSJ8nY89e4C M3tt2bJpov5ivrJ+woV/FLlPYD0tbvWLxaXQ0+rJEjEPYY94btOArjOcbdzyDkfI+Hwm PD6Q== 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=jneUenFAcWaeUzGS8zwAmnQ28hpu+G2lRJYvSOqR+rA=; b=fSfQ4NBp1ydKPvp8zOBiuo7mxIexKH5GFfwYHSMef/ZNmkLw6uLHBZ92VWLDkwoK0T 4zWCwOfRas6SSx87topAqAjyXZOcr+jyWY0K4jXSnUZlgdXvs6lcLRWp4H3s4yXvfU/Z Ir6n/iTI5Jaa+v736UUtCD+Uf9XQrfWcUuJY44e6ZUk2fpC3j+lmpJGHfNJ3rgqClKz0 TVfQF+Yba+FBzuB2hcHs9L1OybUurZlcn1ZQMOc17aLMOO4fuHi8+TQ8wiGQ0S0f6o06 psw6EyhidU2do8Y4hb3NM1wIjFeGrLaPvlCVVmZc/6QYER+N1m0btMWdWDgmg1oIN6MK +vXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20210112 header.b=FQoGpcoO; 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 s7-20020a639247000000b0044b817adee1si1076261pgn.78.2022.11.03.06.05.31; Thu, 03 Nov 2022 06:05:46 -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=FQoGpcoO; 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 S231820AbiKCNBz (ORCPT + 99 others); Thu, 3 Nov 2022 09:01:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231679AbiKCNB2 (ORCPT ); Thu, 3 Nov 2022 09:01:28 -0400 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E45901409E; Thu, 3 Nov 2022 06:01:18 -0700 (PDT) Received: by mail-ej1-x634.google.com with SMTP id 13so5033616ejn.3; Thu, 03 Nov 2022 06:01:18 -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=jneUenFAcWaeUzGS8zwAmnQ28hpu+G2lRJYvSOqR+rA=; b=FQoGpcoO6SNTCG7a4PT8aZFLsJq6p2rpARp1dFtrfHtREnC0ZfYFjxHX1eRT8lmjD5 02P2Nd8wKtBEcvYGHdUk/FUAtQpTcN9Y/v7MNNaJLKV0OSTVYOt27op9Xg3/empK9DX/ 5l9i/2C8c8cQRvQxp54gq2n0S8+QkPPik2DTUguCTfeiU9ZbeCWDUl5vYeQAjjl9DtrX VoVklDtBlPzQFeWmfuKhBHzXCGdqO3VBmDuSHYtPLd1Km4HLysV70o6YQU8KLGGqJ7nQ sCo721AYojF5tCdBrczQdvkRys2/1Wx3SrpXxrhGMTY2bJQqV6fU9jQA0Lk5eVqbHUhV +smA== 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=jneUenFAcWaeUzGS8zwAmnQ28hpu+G2lRJYvSOqR+rA=; b=LAmYSHj42hqT2QQpTIAMAChKIUDHKXMxMzH2rZfvZWpyd+pRvBoM8tJsMBujNVlaBf JiWL/fNGMoccrTJOeKmvecp8ldSm4SAawyS8MfzlK0zmsdZpeAMtOG9fYYqDHFibN2ab TLLKlVeldMprgCwjknf1JFaG8vQiZeF5iQ7mvcjyWdhp6WTk3knqQccONC/ZcsdNEtO1 Kt39tarXX99kpYtdt7rP2DtjsgE/gDMacdSasqJFBCwXFJ+rm1DwDaWAbJVQ56I1X9p3 gof/jCqguC21eb30FDlFcyY4ieUgPX/+AfIPonNAIfplmZQVAAtKVTu7EmyPjg5QQbX5 Tzxg== X-Gm-Message-State: ACrzQf3P7YfXC3DeQ7OaaW89fwi99v+pqeNqP3gNeuiBUxQP+DGcmqJL 0G85GeXfO3tQ5uGKEe6tyl8= X-Received: by 2002:a17:906:5a6b:b0:7ad:bc80:bffe with SMTP id my43-20020a1709065a6b00b007adbc80bffemr23790198ejc.578.1667480477442; Thu, 03 Nov 2022 06:01:17 -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.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 06:01:17 -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 Subject: [PATCH v4 05/13] dt-bindings: iio: temperature: ltc2983: describe matrix items Date: Thu, 3 Nov 2022 15:00:33 +0200 Message-Id: <20221103130041.2153295-6-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?1748480290963616511?= X-GMAIL-MSGID: =?utf-8?q?1748480290963616511?= From: Cosmin Tanislav Give a little bit of information on what each item in the matrix is supposed to be. Also, some matrices put the 'minItems' and 'maxItems' keywords in the wrong level. They should be on the same level as the 'items' keyword. Fix it. Signed-off-by: Cosmin Tanislav Reviewed-by: Rob Herring --- .../bindings/iio/temperature/adi,ltc2983.yaml | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml b/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml index 6b3a20448f78..4f26b337c957 100644 --- a/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml +++ b/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml @@ -126,8 +126,9 @@ patternProperties: minItems: 3 maxItems: 64 items: - minItems: 2 - maxItems: 2 + items: + - description: Voltage point in nV, signed. + - description: Temperature point in uK. "^diode@": type: object @@ -249,12 +250,12 @@ patternProperties: resistance(ohm)-temperature(K). The entries added here are in uohm and uK. For more details values look at table 74 and 75. $ref: /schemas/types.yaml#/definitions/uint64-matrix + minItems: 3 + maxItems: 64 items: - minItems: 3 - maxItems: 64 items: - minItems: 2 - maxItems: 2 + - description: Resistance point in uOhms. + - description: Temperature point in uK. required: - adi,rsense-handle @@ -328,8 +329,9 @@ patternProperties: minItems: 3 maxItems: 64 items: - minItems: 2 - maxItems: 2 + items: + - description: Resistance point in uOhms. + - description: Temperature point in uK. adi,custom-steinhart: description: @@ -338,9 +340,8 @@ patternProperties: Steinhart sensors the coefficients are given in the raw format. Look at table 82 for more information. $ref: /schemas/types.yaml#/definitions/uint32-array - items: - minItems: 6 - maxItems: 6 + minItems: 6 + maxItems: 6 required: - adi,rsense-handle From patchwork Thu Nov 3 13:00:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cosmin Tanislav X-Patchwork-Id: 14859 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp518122wru; Thu, 3 Nov 2022 06:07:23 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6ZvPmX8wwcrVq6WGgjlpg2GCF81n/vgib4FAbanKOtvkGLe5mDPLF4wfyvGPBzTi8fbCPk X-Received: by 2002:a17:903:1c6:b0:185:47ce:f4f0 with SMTP id e6-20020a17090301c600b0018547cef4f0mr30798321plh.132.1667480843009; Thu, 03 Nov 2022 06:07:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667480843; cv=none; d=google.com; s=arc-20160816; b=0MVxo1luQEGB4sYmo3aEkv8c+ueJtgfbdm0Pmq101TWE9zET79Z0UBdk/A0UJNeENC dG+K1EoHc5mukN9kvX6nXaxP86HiO35ryObidY42Crp2EnH8MJqC2MmlLw0GlROTT7YA ek3l+m5wCwgp+y83cAsNrhVBx8P8mCJQB7B9wr+9G1WlGT/fyIpaesdaMuecUk5lGY9Z H9Q5NV8CEI1OF/g+bhZzUU+1mmwpc+xPlaGM/9BIQdkTwuiwBPJFGe7f3PyYhiiiH5wB AfBGdvWNIOtdo2l9fJJ+CesacZP8k/tArUUPeptMHmqeCNvSv/wrKc7RtAGByxpJQ/bF HkoQ== 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=Zzx2/3zXVy+XSamreVFgLFmkVq8rfCdvsS38b4AXRWY=; b=dyLSrq5a/j4jqi5KFHy+zdL/hmiK+H4ze5XZhbcGBrQk/nV97e6F5WLcHr5Fxxr+c2 mFBWtH96AxbV6zPD05d3aygRrv9QJu7CT0nt0vnUYSANobbOmky6sHZyCkLUJSiU0y9f OynJtgPnwOnVAIuKZY8qnMpBqFWYjQDe40snGbA/cWUC43IE4VFyxImAVKkrLrOIYEKV nNU3r74wd3CffMh6fGySzHonMobBR6aqBlys0pz3GSKRGK3FBGlsdpzFxvpf1eYvqIG/ ZrXSLDOBM7D5UERpk6ysZagr4nnmCe+kq9emgLVZyCLz0mZ6YuMCIxEpZFxnSXBA+asq vX0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20210112 header.b=X1CPalRZ; 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 j63-20020a62c542000000b0053e1d872a91si916986pfg.83.2022.11.03.06.07.09; Thu, 03 Nov 2022 06:07:22 -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=X1CPalRZ; 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 S231777AbiKCNB7 (ORCPT + 99 others); Thu, 3 Nov 2022 09:01:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231740AbiKCNBh (ORCPT ); Thu, 3 Nov 2022 09:01:37 -0400 Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5CF714D08; Thu, 3 Nov 2022 06:01:21 -0700 (PDT) Received: by mail-ed1-x530.google.com with SMTP id a5so2834830edb.11; Thu, 03 Nov 2022 06:01:21 -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=Zzx2/3zXVy+XSamreVFgLFmkVq8rfCdvsS38b4AXRWY=; b=X1CPalRZEolGGCg7hNs9GpAz8NcvoKOm73Glkl6rdeCTYeNycT8nGqnS4slOaXXcUP sQHQcKYJiArOGahmozpOM/uq3pjz0CracaSSKah4t6XDy6W8NzHSuGdbJ2C/ah4tezPO jfPnX8gO6pt1IKhFQA6swYZM2UQjqREJzy7/SshzvXSKP8AsR8AzGcyRNzex9pAycfGW dd5DA71qJv+QL8MBGppz3JG+qejX96opwqOIdyhyL+ngT+87YCORC3zCxtuKzLRRvm5I MYzySPiHaDehn95AGczZe0oZxouHGQUecRo6MKht7i4U7j7NnuRtA7s13fZCXUQjLhD1 aSEg== 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=Zzx2/3zXVy+XSamreVFgLFmkVq8rfCdvsS38b4AXRWY=; b=jpQZXjdSbj7vlPFMwwjx4ITUhgSMnJO/0Sjj9n/kbea4+wWwMikP7HGMHSEpzIPj0/ XKvx66hMOlCvhmxOGC6zTdDJ+xUL/E6asmOFFuxgc3cha/6ixLKh1C+Qq2TLJ+zv8xvQ PeOgoe2hSCZKaSh9hqWOovtEMuKFAQbajGXCtC6xB66Zi5QeQ2OJngjSblk/qnTxkp1U M7iEm0Eypu4xcbFITd5BXOj+DiJDcsRkv267z2aBesiHP3RqPwPQpAbyLBwatSFLbC69 af1pSPDN9VNR+pQqc5JWA/xt8uNiEh3n+e89nBtmoGUpfzr7yyrMOWjyMthmsbu1CY3+ u2dA== X-Gm-Message-State: ACrzQf3QAMC4rbHThG6z2xHOnVAw9d5moHAhEW9CzHDyEojarcBV0Tcl 5IfkEx487hFOuaNbuE2bDpI= X-Received: by 2002:a05:6402:5107:b0:462:3014:3d73 with SMTP id m7-20020a056402510700b0046230143d73mr30160511edd.177.1667480480236; Thu, 03 Nov 2022 06:01:20 -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.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 06:01:20 -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 Subject: [PATCH v4 06/13] dt-bindings: iio: temperature: ltc2983: require custom sensor tables Date: Thu, 3 Nov 2022 15:00:34 +0200 Message-Id: <20221103130041.2153295-7-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?1748480392272709400?= X-GMAIL-MSGID: =?utf-8?q?1748480392272709400?= From: Cosmin Tanislav The driver will error out when a custom sensor type is used but a custom sensor table is not provided. Require it in the binding too. Signed-off-by: Cosmin Tanislav Reviewed-by: Rob Herring --- .../bindings/iio/temperature/adi,ltc2983.yaml | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml b/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml index 4f26b337c957..bbac5f5cfbb3 100644 --- a/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml +++ b/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml @@ -130,6 +130,15 @@ patternProperties: - description: Voltage point in nV, signed. - description: Temperature point in uK. + allOf: + - if: + properties: + adi,sensor-type: + const: 9 + then: + required: + - adi,custom-thermocouple + "^diode@": type: object description: @@ -263,6 +272,15 @@ patternProperties: dependencies: adi,current-rotate: [ "adi,rsense-share" ] + allOf: + - if: + properties: + adi,sensor-type: + const: 18 + then: + required: + - adi,custom-rtd + "^thermistor@": type: object description: @@ -349,6 +367,22 @@ patternProperties: dependencies: adi,current-rotate: [ "adi,rsense-share" ] + allOf: + - if: + properties: + adi,sensor-type: + const: 26 + then: + required: + - adi,custom-steinhart + - if: + properties: + adi,sensor-type: + const: 27 + then: + required: + - adi,custom-thermistor + "^adc@": type: object description: Represents a channel which is being used as a direct adc. From patchwork Thu Nov 3 13:00:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cosmin Tanislav X-Patchwork-Id: 14852 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp517318wru; Thu, 3 Nov 2022 06:06:22 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5F3TtRZ8FTWLL2wjlyIm7PHwx41YNBYKwCBx3SxReT4qKen7g3BU6lwMsvJHtOoAqU2GhA X-Received: by 2002:a05:6402:414f:b0:456:c2c1:23ec with SMTP id x15-20020a056402414f00b00456c2c123ecmr30656620eda.420.1667480782781; Thu, 03 Nov 2022 06:06:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667480782; cv=none; d=google.com; s=arc-20160816; b=dOpm4/yUgNUj1lk43rStAxHQUj2Lx6tyd2hlFIuiZfro7ODOCy7IgKGHic1/FagsHJ hKaL5Km6zEHmLoh382/hDfPVlgpLQWn2x3xD5n1fivJFKMJGZyB50ghacyZc8SBHJ4nt wbBl6lp4NMpO4B2dFHSCKtmT4uw/njH92jcOK+JjHE9Z3BDLKd0hEbwWwm/hY47WsMaq A9Wytfg5Mp92Y1VTAMGVi9ooh65zDboypm/l4GZdCXusOFgwBTQHRaF3eX6laTJAK/37 5dV0VrWorF6yvAHRGwPKrcSYiLyyCh3uDhzTFS6gPo0gyKw5Hva0kBb8wNwiNqb8YXiy gY9g== 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=Wl5YV1yuldlFg2w/72zvpuZsJu+kXHIm+tqTSmy2/d8=; b=I690hdwUAgPMPG2Obn6T+jlJbTp00vjyLrDL8jXzzC0Ln6VDqzlUtx/0+tZFsUnwSC CB4Gpzi9NxiSWADoyRGt39QYzD+CHpU2rWL1A+WT94MQQvyq2HO6Tecoe1cwYGBC+ier mOIl5AiwReBSOH4NxTcdR5rBWcItcVQsn7c5b4sadLCfLvXqz1l9Z2Yr2LdsuapwljnI PCy3VX5pHbDAoSXUv38KUp2DItan1YBU8WlA4TZmnMc4ZJe4tOUoEuiXjLYP3dXDqLha iEFctxjOjLOAurhuCZ8In34SZGQ8N/vFNVwPtgLUPBWRNDDfw6E/t7OtgPYY846XiDfd u1Xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20210112 header.b=CPONfOgi; 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 gb27-20020a170907961b00b007ae0ea7fbb1si1328939ejc.812.2022.11.03.06.05.36; Thu, 03 Nov 2022 06:06:22 -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=CPONfOgi; 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 S230267AbiKCNCD (ORCPT + 99 others); Thu, 3 Nov 2022 09:02:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231778AbiKCNBv (ORCPT ); Thu, 3 Nov 2022 09:01:51 -0400 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80F56140B7; Thu, 3 Nov 2022 06:01:23 -0700 (PDT) Received: by mail-ej1-x62f.google.com with SMTP id f27so5048996eje.1; Thu, 03 Nov 2022 06:01:23 -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=Wl5YV1yuldlFg2w/72zvpuZsJu+kXHIm+tqTSmy2/d8=; b=CPONfOgiGcvco/Rskk0DdFbIZ6HfBYRnFSFdPUAnHEC+XwcCXJCsupfbw3rVgS3WNv BaS1aWtcXN6CYybLmhEOjR+zwsqQmER5EQZb4WwjGlJwUD3uKQKaU7y6raDhT5HKa12G SNyARbOgA/gLJkgyoe7Yp/poxlzsPLjmK2XlYmtmqgZ4yE8u2etgLAdQl2YEZJzJGYU8 1Bg/Eqc63Xs+Qa6K7xfCwZ8OeUZzyCLTyiUnU2J5ngw/bn/GJksblf7OAZXriwGgmagC BQWpu6cqpULKzsIISCWL1+yzx2Ou+axpQNFD6XLQsVLaw972Z/n4+eSHoT77VG2ab0Mc OQpw== 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=Wl5YV1yuldlFg2w/72zvpuZsJu+kXHIm+tqTSmy2/d8=; b=7z2TEYa7f9NCiHUioV13N2whYO057UsoNHppPkXESXVX6yrUEfceIh/0a0iYcFRT6H TPVa/ijNLSZK9Qo+BOKVQs0AwFHTfze7Wvmr6BfcwPgAVrggDhs8ryAJKUFHswvho4TA IQQ1VrGI0gC4Rt6ungR08jDufrwBFuuOYsKKeZ7BIrxHUJPHfc0wDJqGUrHxYJfkwuzW 2HVqVr669iYO8KBHt+jWbZWDWYsvgazatOtz1ysEbAJAj9V9KGYeG1rJpXg0aY8Uzn+A f/4UIzy9EokN79qAt9BjcSYjjNaYFIcTsNh0eW3zssFjyLika1IvCOdbqD/vxnWZG9ln NNng== X-Gm-Message-State: ACrzQf2rhuM55+O+fDFVLSOcTBVc2Wf4oS/NwDi9sL8ou7AdVNxaEoxS 5GKFxCzhJcC9e2W88YW9gCQ= X-Received: by 2002:a17:907:7617:b0:7ad:c0d5:bdf1 with SMTP id jx23-20020a170907761700b007adc0d5bdf1mr23207559ejc.211.1667480481889; Thu, 03 Nov 2022 06:01:21 -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.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 06:01:21 -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 Subject: [PATCH v4 07/13] dt-bindings: iio: temperature: ltc2983: require 4 wire rtd for current rotate Date: Thu, 3 Nov 2022 15:00:35 +0200 Message-Id: <20221103130041.2153295-8-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?1748480328832847869?= X-GMAIL-MSGID: =?utf-8?q?1748480328832847869?= From: Cosmin Tanislav The driver will error out when current rotation is enabled but the RTD is not 4-wire. Require it in the binding too. Signed-off-by: Cosmin Tanislav Reviewed-by: Rob Herring --- .../bindings/iio/temperature/adi,ltc2983.yaml | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml b/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml index bbac5f5cfbb3..b603219fb0c9 100644 --- a/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml +++ b/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml @@ -230,13 +230,6 @@ patternProperties: resistor is used for multiple 2-, 3-, and/or 4-wire RTDs. type: boolean - adi,current-rotate: - description: - Boolean property which enables excitation current rotation to - automatically remove parasitic thermocouple effects. Note that - this property is not allowed for 2- and 3-wire RTDs. - type: boolean - adi,excitation-current-microamp: description: This property controls the magnitude of the excitation current @@ -269,10 +262,22 @@ patternProperties: required: - adi,rsense-handle - dependencies: - adi,current-rotate: [ "adi,rsense-share" ] - allOf: + - if: + properties: + adi,number-of-wires: + const: 4 + then: + properties: + adi,current-rotate: + description: + Whether to enable excitation current rotation to automatically + remove parasitic thermocouple effects. + type: boolean + + dependencies: + adi,current-rotate: [ "adi,rsense-share" ] + - if: properties: adi,sensor-type: From patchwork Thu Nov 3 13:00:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cosmin Tanislav X-Patchwork-Id: 14851 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp517284wru; Thu, 3 Nov 2022 06:06:19 -0700 (PDT) X-Google-Smtp-Source: AMsMyM49m0BxhkNKPQL+sUPiXnCgywMRyxOLj20Wxvd8PE+vTVVEDtH6CM21HMVrOSX070YXsJ8/ X-Received: by 2002:a17:90a:540e:b0:210:1e26:9422 with SMTP id z14-20020a17090a540e00b002101e269422mr30232464pjh.100.1667480779537; Thu, 03 Nov 2022 06:06:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667480779; cv=none; d=google.com; s=arc-20160816; b=EwycvOxLI6a0Yl4w0H5574NqzhvcOH6Nyc37/ueVVpZWnAaabz1PVYlo9XimNkD8/P FSEVmU/xVqwicvlA3SxOsmi/hwdn2OAZjXgMvV4HyTx7BmKhOqm73tE8DsQJt9KDT62O LIMmkKBx1lcMZ3upjErOiHiUGcwRciqq5HGSPpuga/7PA7Giz5pSXxMDn3ADNES4E3Or oGAZXDoLBZ7AwQhON8vXgnXzlmu193mPEC+wr4gDSKTItZbpyDUbVxRGwYwBZOIxLn0o qWBxKXkiauFt7vfRP1S4L2JV/AHny2JVRi0e+IzH2epou/dUkM6WfPEpN3cg9w0pHBxG XfHw== 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=04P2tRolwIvSbGhfQHq/FrE12nmgNU3RtNHs+uPtM2g=; b=Fds3etyg5EbvlNOPjn8HRzuH3zXjDE1287jIKrzHfyXzcuWVi2KHH73Bc10aB+BSTm wVCso52Edjgj42MSoHF6SR79VKqk5Gcb5LTzFztiWXPGwaPlEFuAyoDiVCBDNSwzaU7l QWVFtJiSoaYN9ASDCIRFOA7S4ctbHd9JfeUn7/8Jgi9p2TNQ4sNw4WvG/eLzp1okoJ7u D42/sFVTHFUFk+uQoEK4uHkgbMQVb8/FvVQWgrWBoUtERco/pdWYmeVBPK5XUmswrfQg X4azmPKeh2dHLl/F9ynGzUXKkPbUxtZg1ACWsrQiSFUzGARmrMa+uNC+P9LCIQihbqe8 9llQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20210112 header.b=dnHmCO97; 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 q2-20020a056a00084200b0056d29ad33f9si979657pfk.192.2022.11.03.06.05.57; Thu, 03 Nov 2022 06:06:19 -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=dnHmCO97; 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 S230376AbiKCNCT (ORCPT + 99 others); Thu, 3 Nov 2022 09:02:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231664AbiKCNBx (ORCPT ); Thu, 3 Nov 2022 09:01:53 -0400 Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5276D1573C; Thu, 3 Nov 2022 06:01:27 -0700 (PDT) Received: by mail-ed1-x52e.google.com with SMTP id a13so2948604edj.0; Thu, 03 Nov 2022 06:01:27 -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=04P2tRolwIvSbGhfQHq/FrE12nmgNU3RtNHs+uPtM2g=; b=dnHmCO97bGIC+Jyy8IQWvR4BsWXIVI7TyKHdjynNho/G131BVkZyxhiXxiUXhtg6qZ WlWB+5jSWuYufmxwacrxsXL8AV0st9h0CPq4juKwfK4dZi0vuYNaJcMt7hGCTdLoxJzK TaRP+Zc2sMXdW4jEp7urqTPOTIIZ9v+romaTT9dJQSW92ek+9dWp5fUNIb00yW7kjLAd pjgBXIrAgtCDrHm7Ay8ug+e189LJgyIqCnm95ZRFEHMIYmk+YXYJHV8YI4oWBA0A2EKl RemBWGE/x0AUa7GvXgrydHuR0W3skmdDOGSY17J6xrFz7yX1g3SzR+lfoqLI7Dm6suRw kgSA== 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=04P2tRolwIvSbGhfQHq/FrE12nmgNU3RtNHs+uPtM2g=; b=ouHCspE9eXU3xGhibx64XAp3myQwHddVeamIyefz5YFvFPqvejYCFffSHEtUkUm8zb EpYYvUCUiXwHuXukEa9bVsaXuvBqFQMYK//qUgxnd2khzPQ7bYr/CGlQ8tAFxwgRJX+3 wREAmRp1RX+tW/jAA+gddgNSj0xGvDGKyIPX7chfCz12C6l+iwcR8GdKJItCNrPAqVbu Z84xpVRxV1v7/wX7bYKhCjumn247BgV90C186g0qxCG5Gx7olVBfF0WLlFcfWUT8Zyfs W2JBtFIr17NRudbsgNRvNF3TxlidVvmqIKK/yZTwCPtXxFDYhjfXhZb3jmwYSZotwWJW HszQ== X-Gm-Message-State: ACrzQf17CO7NvlJ9tbjXTqqwOnyd5OgEu7r4G4GZlUyERPFmbrO6nFe0 tIpPk41xmfuhhGpJP9nhE2g= X-Received: by 2002:a05:6402:2994:b0:453:4c5c:d31c with SMTP id eq20-20020a056402299400b004534c5cd31cmr29918522edb.412.1667480485718; Thu, 03 Nov 2022 06:01:25 -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.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 06:01:25 -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 Subject: [PATCH v4 08/13] dt-bindings: iio: temperature: ltc2983: change default excitation for custom thermistors Date: Thu, 3 Nov 2022 15:00:36 +0200 Message-Id: <20221103130041.2153295-9-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?1748480326053116396?= X-GMAIL-MSGID: =?utf-8?q?1748480326053116396?= From: Cosmin Tanislav Excitation cannot be set to auto-range when using a custom thermistor or Steinhart sensor type. Default it to 1000nA to match the driver and remove the auto-range value from the enum. Signed-off-by: Cosmin Tanislav Reviewed-by: Rob Herring --- .../bindings/iio/temperature/adi,ltc2983.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml b/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml index b603219fb0c9..1b6a11f2aa9d 100644 --- a/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml +++ b/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml @@ -378,6 +378,11 @@ patternProperties: adi,sensor-type: const: 26 then: + properties: + adi,excitation-current-nanoamp: + enum: [250, 500, 1000, 5000, 10000, 25000, 50000, 100000, + 250000, 500000, 1000000] + default: 1000 required: - adi,custom-steinhart - if: @@ -385,6 +390,11 @@ patternProperties: adi,sensor-type: const: 27 then: + properties: + adi,excitation-current-nanoamp: + enum: [250, 500, 1000, 5000, 10000, 25000, 50000, 100000, + 250000, 500000, 1000000] + default: 1000 required: - adi,custom-thermistor From patchwork Thu Nov 3 13:00:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cosmin Tanislav X-Patchwork-Id: 14853 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp517371wru; Thu, 3 Nov 2022 06:06:27 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7+yZ9ONZBCr7iY3O4O27Au4advUFFYYpvBNHAxj8rI55ueBzWnER7b6dwycTVtBvfFn4Mb X-Received: by 2002:aa7:d499:0:b0:463:c002:9650 with SMTP id b25-20020aa7d499000000b00463c0029650mr13004836edr.87.1667480786799; Thu, 03 Nov 2022 06:06:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667480786; cv=none; d=google.com; s=arc-20160816; b=rCyBSYUCuaud9D94fcAvWSxM6g9D75uFBDYqKyCgYTzCUqJ794+sMVx+NNFsV5VNJ1 4ipT7VWnUnBYHOKWwfzqukA/yQrgubuKwdZ/CNOhUiTHS7EcZAtEda3KV//VDOYs0SJr hGCvN1mEY6yZvWDRPzfJ6J/YrTYv1wH4/jW4JuJoOjX1vEFOGB33BTcm7HfTjGuEDsP/ 1zGszJvHAaU46cdVEHqDnD4TWw3CQpOpWamvidOtAfv1dfOEN2gIAk9DEVP2nf5KoeWD 7odRDj1XDaIDcvpCPRSkD22TG1qy6aharXgG6iYi9Q3htOHBrdCcy0lbXgNnK73FASGx s76A== 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=Aii7ZeFVsJKah3Sp1J2uui+q3nkwmdgQ+YvTSehqSzc=; b=lb/jEFJjlqk53t1DcTV/Z5xvwg30Its2NoZd2ERkeXz57qFZv2alFbFAARwTo7H/Ru MVNm+XosFGw49Dynqhd7p8TlL6h99zc7YrXe7ljsaO94LCbChqA24Lm6WDbdsfnejAA+ h31dSU1oGg/zupJNKoYJMQrnlQ+Y95947UWS3Mb8zEBha2mdNibgYSSsLcIB8g2sj7aj 3Tu52cfg0uUjsewuQjxhaoijaFlRMVhS08PuJTDPSEFyx5A6lMVGgjKkcZbBG8WmRH0H DW8rjWX/L068F4DLxpFgxOdBQP4V5dvnvHbaJgP+NjNkEMbx7lvFHYfb26OQiKlA0Ou1 60MA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20210112 header.b=foSOXFNX; 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 r24-20020a1709064d1800b0073d74bcac8dsi1001198eju.513.2022.11.03.06.06.00; Thu, 03 Nov 2022 06:06:26 -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=foSOXFNX; 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 S231764AbiKCNCW (ORCPT + 99 others); Thu, 3 Nov 2022 09:02:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231725AbiKCNBy (ORCPT ); Thu, 3 Nov 2022 09:01:54 -0400 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBF0715806; Thu, 3 Nov 2022 06:01:28 -0700 (PDT) Received: by mail-ej1-x634.google.com with SMTP id 13so5035228ejn.3; Thu, 03 Nov 2022 06:01:28 -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=Aii7ZeFVsJKah3Sp1J2uui+q3nkwmdgQ+YvTSehqSzc=; b=foSOXFNXe0tDxIeWovWmnUYJyzccoRGAA3m643QrB01+h4F8gX1WqP8C9LGHIHtuQU A33s36L2tdxo15u474lNxpo/+i4G5/QXlv/3ugUKSF9vRJvlgpMRW2Z0s9gET5emClnM qeqomrOJNMT3VPUFsjd1y+UTxuWgN742JJj6zhgSqLNrzDX9oLe9+6XL94FlDCse8WL2 XIeMj4uvhKYS28RUh5Pckqh/M3IwYYQey0GZkmiDNvGDsRi0cUGDaKgp9xGlH4rYoHaZ OXBvVyGF+WzvqAjyRD56hKEloJlcLSZIKFP8ynTPuTWI3YmcFLgUNZ7hEZ8Z0spJ8VDj LziA== 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=Aii7ZeFVsJKah3Sp1J2uui+q3nkwmdgQ+YvTSehqSzc=; b=JWl4k76aFcRo3nL8T3ECySmp44Ns4GN2AmS7XgUb08c4hpx6OhcPa7e8PhbzYHDwHf Y+kx5N5qM/JoH/8rK7X7RMJhb8efCdSBtOk7V+g48o1DhwAFkxuPkD2LLPJgbaug6FYo YEXKzJB8jzxpebi+imT2dslyn+2oo8jEqe6E7h+7lkj02Ynlf9pWM12WIhpLEBvqY0og PlAXnN2InmJOot8eKx9SU3dpa/u/QUPR0WnGHgicmvvTEn3+s1VeUP/pMyBHg78anhYl xQKloAF+E4K76P6EChO7f0SZcTRhSERYGG+KUR44cC9cBpPGxLDKXKc6pJ8/OTdzVtBA 3xSA== X-Gm-Message-State: ACrzQf1+qyaEqvddfOQ2WecM6GyS88v1vl5ORGpR7AvU1OrRYmRTkC52 6erOGGwVzYRlm7lh6/yNB5c= X-Received: by 2002:a17:907:aa1:b0:7ad:b286:fa25 with SMTP id bz1-20020a1709070aa100b007adb286fa25mr28460756ejc.106.1667480488148; Thu, 03 Nov 2022 06:01:28 -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.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 06:01:27 -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 Subject: [PATCH v4 09/13] dt-bindings: iio: temperature: ltc2983: refine descriptions Date: Thu, 3 Nov 2022 15:00:37 +0200 Message-Id: <20221103130041.2153295-10-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?1748480333234516171?= X-GMAIL-MSGID: =?utf-8?q?1748480333234516171?= From: Cosmin Tanislav Some descriptions are too verbose, while others are too succint. Rewrite them all. Signed-off-by: Cosmin Tanislav Reviewed-by: Rob Herring --- .../bindings/iio/temperature/adi,ltc2983.yaml | 163 +++++++----------- 1 file changed, 65 insertions(+), 98 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml b/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml index 1b6a11f2aa9d..676801b036cf 100644 --- a/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml +++ b/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml @@ -25,21 +25,16 @@ properties: maxItems: 1 adi,mux-delay-config-us: - description: - The LTC2983 performs 2 or 3 internal conversion cycles per temperature - result. Each conversion cycle is performed with different excitation and - input multiplexer configurations. Prior to each conversion, these - excitation circuits and input switch configurations are changed and an - internal 1ms delay ensures settling prior to the conversion cycle in most - cases. An extra delay can be configured using this property. The value is - rounded to nearest 100us. + description: | + Extra delay prior to each conversion, in addition to the internal 1ms + delay, for the multiplexer to switch input configurations and + excitation values. maximum: 255 default: 0 adi,filter-notch-freq: description: - Set's the default setting of the digital filter. The default is - simultaneous 50/60Hz rejection. + Notch frequency of the digital filter. 0 - 50/60Hz rejection 1 - 60Hz rejection 2 - 50Hz rejection @@ -57,17 +52,18 @@ properties: patternProperties: "@([0-9a-f]+)$": type: object + description: Sensor. properties: reg: description: - The channel number. It can be connected to one of the 20 channels of - the device. + Channel number. Connects the sensor to the channel with this number + of the device. minimum: 1 maximum: 20 adi,sensor-type: - description: Identifies the type of sensor connected to the device. + description: Type of sensor connected to the device. $ref: /schemas/types.yaml#/definitions/uint32 required: @@ -76,9 +72,7 @@ patternProperties: "^thermocouple@": type: object - description: - Represents a thermocouple sensor which is connected to one of the device - channels. + description: Thermocouple sensor. properties: adi,sensor-type: @@ -97,31 +91,24 @@ patternProperties: maximum: 9 adi,single-ended: - description: - Boolean property which set's the thermocouple as single-ended. + description: Whether the sensor is single-ended. type: boolean adi,sensor-oc-current-microamp: - description: - This property set's the pulsed current value applied during - open-circuit detect. + description: Pulsed current value applied during open-circuit detect. enum: [10, 100, 500, 1000] default: 10 adi,cold-junction-handle: description: - Phandle which points to a sensor object responsible for measuring - the thermocouple cold junction temperature. + Sensor responsible for measuring the thermocouple cold junction + temperature. $ref: /schemas/types.yaml#/definitions/phandle adi,custom-thermocouple: description: - This is a table, where each entry should be a pair of - voltage(mv)-temperature(K). The entries must be given in nv and uK - so that, the original values must be multiplied by 1000000. For - more details look at table 69 and 70. - Note should be signed, but dtc doesn't currently maintain the - sign. + Used for digitizing custom thermocouples. + See Page 59 of the datasheet. $ref: /schemas/types.yaml#/definitions/uint64-matrix minItems: 3 maxItems: 64 @@ -141,55 +128,50 @@ patternProperties: "^diode@": type: object - description: - Represents a diode sensor which is connected to one of the device - channels. + description: Diode sensor. properties: adi,sensor-type: - description: Identifies the sensor as a diode. + description: Sensor type for diodes. $ref: /schemas/types.yaml#/definitions/uint32 const: 28 adi,single-ended: - description: Boolean property which set's the diode as single-ended. + description: Whether the sensor is single-ended. type: boolean adi,three-conversion-cycles: description: - Boolean property which set's three conversion cycles removing - parasitic resistance effects between the LTC2983 and the diode. + Whether to use three conversion cycles to remove parasitic + resistance between the device and the diode. type: boolean adi,average-on: description: - Boolean property which enables a running average of the diode - temperature reading. This reduces the noise when the diode is used - as a cold junction temperature element on an isothermal block - where temperatures change slowly. + Whether to use a running average of the diode temperature + reading to reduce the noise when the diode is used as a cold + junction temperature element on an isothermal block where + temperatures change slowly. type: boolean adi,excitation-current-microamp: description: - This property controls the magnitude of the excitation current - applied to the diode. Depending on the number of conversions - cycles, this property will assume different predefined values on - each cycle. Just set the value of the first cycle (1l). + Magnitude of the 1l excitation current applied to the diode. + 4l excitation current will be 4 times this value, and 8l + excitation current will be 8 times value. enum: [10, 20, 40, 80] default: 10 adi,ideal-factor-value: description: - This property sets the diode ideality factor. The real value must - be multiplied by 1000000 to remove the fractional part. For more - information look at table 20 of the datasheet. + Diode ideality factor. + Set this property to 1000000 times the real value. $ref: /schemas/types.yaml#/definitions/uint32 default: 0 "^rtd@": type: object - description: - Represents a rtd sensor which is connected to one of the device channels. + description: RTD sensor. properties: reg: @@ -212,35 +194,35 @@ patternProperties: maximum: 18 adi,rsense-handle: - description: - Phandle pointing to a rsense object associated with this RTD. + description: Associated sense resistor sensor. $ref: /schemas/types.yaml#/definitions/phandle adi,number-of-wires: description: - Identifies the number of wires used by the RTD. Setting this - property to 5 means 4 wires with Kelvin Rsense. + Number of wires used by the RTD. + 5 means 4 wires with Kelvin sense resistor. $ref: /schemas/types.yaml#/definitions/uint32 enum: [2, 3, 4, 5] default: 2 adi,rsense-share: description: - Boolean property which enables Rsense sharing, where one sense - resistor is used for multiple 2-, 3-, and/or 4-wire RTDs. + Whether to enable sense resistor sharing, where one sense + resistor is used by multiple sensors. type: boolean adi,excitation-current-microamp: - description: - This property controls the magnitude of the excitation current - applied to the RTD. + description: Excitation current applied to the RTD. enum: [5, 10, 25, 50, 100, 250, 500, 1000] default: 5 adi,rtd-curve: - description: - This property set the RTD curve used and the corresponding - Callendar-VanDusen constants. Look at table 30 of the datasheet. + description: | + RTD curve and the corresponding Callendar-VanDusen constants. + 0 - European + 1 - American + 2 - Japanese + 3 - ITS-90 $ref: /schemas/types.yaml#/definitions/uint32 minimum: 0 maximum: 3 @@ -248,9 +230,8 @@ patternProperties: adi,custom-rtd: description: - This is a table, where each entry should be a pair of - resistance(ohm)-temperature(K). The entries added here are in uohm - and uK. For more details values look at table 74 and 75. + Used for digitizing custom RTDs. + See Page 62 of the datasheet. $ref: /schemas/types.yaml#/definitions/uint64-matrix minItems: 3 maxItems: 64 @@ -288,9 +269,7 @@ patternProperties: "^thermistor@": type: object - description: - Represents a thermistor sensor which is connected to one of the device - channels. + description: Thermistor sensor. properties: adi,sensor-type: @@ -309,34 +288,29 @@ patternProperties: maximum: 27 adi,rsense-handle: - description: - Phandle pointing to a rsense object associated with this - thermistor. + description: Associated sense resistor sensor. $ref: /schemas/types.yaml#/definitions/phandle adi,single-ended: - description: - Boolean property which set's the thermistor as single-ended. + description: Whether the sensor is single-ended. type: boolean adi,rsense-share: description: - Boolean property which enables Rsense sharing, where one sense - resistor is used for multiple thermistors. Note that this property - is ignored if adi,single-ended is set. + Whether to enable sense resistor sharing, where one sense + resistor is used by multiple sensors. type: boolean adi,current-rotate: description: - Boolean property which enables excitation current rotation to - automatically remove parasitic thermocouple effects. + Whether to enable excitation current rotation to automatically + remove parasitic thermocouple effects. type: boolean adi,excitation-current-nanoamp: description: - This property controls the magnitude of the excitation current - applied to the thermistor. Value 0 set's the sensor in auto-range - mode. + Excitation current applied to the thermistor. + 0 sets the sensor in auto-range mode. $ref: /schemas/types.yaml#/definitions/uint32 enum: [0, 250, 500, 1000, 5000, 10000, 25000, 50000, 100000, 250000, 500000, 1000000] @@ -344,10 +318,8 @@ patternProperties: adi,custom-thermistor: description: - This is a table, where each entry should be a pair of - resistance(ohm)-temperature(K). The entries added here are in uohm - and uK only for custom thermistors. For more details look at table - 78 and 79. + Used for digitizing custom thermistors. + See Page 65 of the datasheet. $ref: /schemas/types.yaml#/definitions/uint64-matrix minItems: 3 maxItems: 64 @@ -358,10 +330,9 @@ patternProperties: adi,custom-steinhart: description: - Steinhart-Hart coefficients are also supported and can - be programmed into the device memory using this property. For - Steinhart sensors the coefficients are given in the raw - format. Look at table 82 for more information. + Steinhart-Hart coefficients in raw format, used for digitizing + custom thermistors. + See Page 68 of the datasheet. $ref: /schemas/types.yaml#/definitions/uint32-array minItems: 6 maxItems: 6 @@ -400,23 +371,21 @@ patternProperties: "^adc@": type: object - description: Represents a channel which is being used as a direct adc. + description: Direct ADC sensor. properties: adi,sensor-type: - description: Identifies the sensor as a direct adc. + description: Sensor type for direct ADC sensors. $ref: /schemas/types.yaml#/definitions/uint32 const: 30 adi,single-ended: - description: Boolean property which set's the adc as single-ended. + description: Whether the sensor is single-ended. type: boolean "^rsense@": type: object - description: - Represents a rsense which is connected to one of the device channels. - Rsense are used by thermistors and RTD's. + description: Sense resistor sensor. properties: reg: @@ -424,14 +393,12 @@ patternProperties: maximum: 20 adi,sensor-type: - description: Identifies the sensor as a rsense. + description: Sensor type sense resistor sensors. $ref: /schemas/types.yaml#/definitions/uint32 const: 29 adi,rsense-val-milli-ohms: - description: - Sets the value of the sense resistor. Look at table 20 of the - datasheet for information. + description: Value of the sense resistor. required: - adi,rsense-val-milli-ohms From patchwork Thu Nov 3 13:00:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cosmin Tanislav X-Patchwork-Id: 14854 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp517437wru; Thu, 3 Nov 2022 06:06:31 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4/qbOTkQsDzQAIeDDKbQ2hWCWMiZdj49/qg38OQVXqmiLSk1GvXA+SAfaTZT9aAF0InQbL X-Received: by 2002:a17:907:3e06:b0:733:693:600e with SMTP id hp6-20020a1709073e0600b007330693600emr27319024ejc.410.1667480791509; Thu, 03 Nov 2022 06:06:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667480791; cv=none; d=google.com; s=arc-20160816; b=te97XYJiv4umaSCLHZEWjG/wFeBg+wqX+a7iqEKLuPxuDHdhZOXk4nL7dRTNCC3JZX 3oqKBW7rQ4v0LV8PWFTKXc83sdFAUOnQwwXnBSfQeym2h/SPWL/+z7Rrb+UI6/8GPji7 aNrmCk9WG2I9NbnPeETdfEtB9ZEu5UiyviT1782hKYTupKj5F9FIA1LFSZvO4+r7r+Of EPXlucaq54IoDDvkXguETvdx2gsFHeNRcCjxyTxz2lNGDFOUflwreZthcHlVPnviCt4p FQJoKWVwlDlxPwfawsR+KXbBOE+AXk44lUc5eQSoXaUfMk6U5rETf8qM0amNEwWyDfdg YJ5Q== 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=TUBAY9RkKGfldJzKkUPMH+SpSXldSNu9mGfTJqOMhzI=; b=m2uCU6IKi4uk5NqwrmLCxzOET0YAZKGaz0y9GhF96NySLciyDufLe6/NbZPtSrc3t8 MeBM/VDZUg8+Wa0uPVi3Yv5KObYHyp/tn2palAkNCBzA/aH3TyHLGW5M2Jojf+IEpOZU hF2GifMx85NBBBVY2BvhVjWLjmIN3RFvVFhRTFRIg6ybbrZ6FoD7dQ+0uUI8CLRXxT9k 5EF7FwcrStWCWqDO0Knig9dXROPbZE1P/FjNVKFd0d57sznHtqhyMo7z0rDjiEVk0DB9 h8t9F/cOBlKZ8EVNKlaBeOShj/wjqUofQHfDG83/biXR/y8CElnCBdej+roxKPp6yDA/ oopw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20210112 header.b=HM+HRemR; 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 q6-20020aa7cc06000000b00461f5bb2b79si1077642edt.458.2022.11.03.06.06.04; Thu, 03 Nov 2022 06:06:31 -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=HM+HRemR; 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 S231829AbiKCNC0 (ORCPT + 99 others); Thu, 3 Nov 2022 09:02:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231825AbiKCNBz (ORCPT ); Thu, 3 Nov 2022 09:01:55 -0400 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C9D8165B9; Thu, 3 Nov 2022 06:01:32 -0700 (PDT) Received: by mail-ej1-x629.google.com with SMTP id n12so4929301eja.11; Thu, 03 Nov 2022 06:01:32 -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=TUBAY9RkKGfldJzKkUPMH+SpSXldSNu9mGfTJqOMhzI=; b=HM+HRemRtj8TCpc5AYAzgpc3h1lY5Okl9tDXClUzQIGUDpIWJh+40NxIw13C/icSOy VGF6he2ELBdMytqEQTqxlH0KDUrbGUUI2YhlS+HTLJV37LJmXZcyi0E0lzrEVZ7DyJ22 6UevGqiXn98Kec8O7E996LD2s1wMmPKl+YegFnlxLJwPpU+AVaYHHETDZat5I2hd+THr u/LP8tWIFVowUAPlEKHEId6LypVexoIUVlpNSyTJryS68v3VeVomijWkPjcZcTU3DFWw zCnKa7b3ZN+Bf1ai8qFG4h5T7Sb2/USVFucecd4G76QciMeymNOxMJ0anQPIGS9olPdC R9uA== 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=TUBAY9RkKGfldJzKkUPMH+SpSXldSNu9mGfTJqOMhzI=; b=F8y0hKFe6eMg6RJ1EX8wpP2vS3WPUHy0I1vtcIWxW0DJx3QvbEoGBV5IvU1kJU7nXE nk+8VQ2p1296ad+NA/53wsk3f8RIC85nJBxmxRYQ5tfiqFiZY8lKYeaUq7KlVpFyIYf6 MxHreIOWBcnVN3YI+Ta+LaaUox/06q5OGpYwtommBsb87Nr84BJPDWqKuCYtEUofjv92 B8I7peixytK9hRSZXa79yeAB1fRbDLseKsCypK+bUER5XQEhqSUj0dnVPfe+lGjOPOZp a7snWUzZA06dDJlPqpXW3c88/9/jjaUVGMwNbDUELFtAqyvxDYSbTQjUWJrBjPp+syZW F7Xg== X-Gm-Message-State: ACrzQf0YUSySTJsmnk66Ze9WGMLSZDPdlhIeyzfZdpB2oGmPxXXUr7+h rCcTxGR/pt+jJ8Kfk8SGkZ8= X-Received: by 2002:a17:907:720b:b0:78e:c0e:a434 with SMTP id dr11-20020a170907720b00b0078e0c0ea434mr29407004ejc.741.1667480490539; Thu, 03 Nov 2022 06:01:30 -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.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 06:01:30 -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 Subject: [PATCH v4 10/13] dt-bindings: iio: temperature: ltc2983: describe broken mux delay property Date: Thu, 3 Nov 2022 15:00:38 +0200 Message-Id: <20221103130041.2153295-11-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?1748480338173200529?= X-GMAIL-MSGID: =?utf-8?q?1748480338173200529?= From: Cosmin Tanislav The 'adi,mux-delay-config-us' property is broken. It was supposed to be in us, but the value is actually written directly to the register. Describe the fact that it is broken and how it actually works. Signed-off-by: Cosmin Tanislav Reviewed-by: Rob Herring --- .../devicetree/bindings/iio/temperature/adi,ltc2983.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml b/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml index 676801b036cf..467e165e9b0b 100644 --- a/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml +++ b/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml @@ -29,6 +29,9 @@ properties: Extra delay prior to each conversion, in addition to the internal 1ms delay, for the multiplexer to switch input configurations and excitation values. + + This property is supposed to be in microseconds, but to maintain + compatibility, this value will be multiplied by 100 before usage. maximum: 255 default: 0 From patchwork Thu Nov 3 13:00:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cosmin Tanislav X-Patchwork-Id: 14855 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp517458wru; Thu, 3 Nov 2022 06:06:33 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4FQkQ+RCcGVX3gKAgFvv8oooi3d7+A27x70essQcGQMTJe/q5mSaCJxEsPB/vyz0enztPI X-Received: by 2002:aa7:da03:0:b0:461:4fc2:3e0f with SMTP id r3-20020aa7da03000000b004614fc23e0fmr29583227eds.321.1667480793577; Thu, 03 Nov 2022 06:06:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667480793; cv=none; d=google.com; s=arc-20160816; b=PCsQ0lME9mf6xqoFwTFS3B1MKuiZvKwbnJh4Yk0SepvmY1CjQRBqel0T0oH7YY200l 5aW2KezEXDAfLgj4DfiRcvD3ch5f0Bk7e30tE5iexV8/6dBvBsMsvu1WAzzVE3e2yrWh VLtcH1Xy836aeYD77C6rJLKzrDS1K0F9PpjkUhjO7GL4bNiGKwYK/2x2mAHaH67iPZar TRSGDEtT7zUCvm2M2iNpGY4BlX8yc/YuD+xMuS0+ueIjJgAY+NkAVZp+1NGFnvX+5fW2 yVkNJa1VJlAHmcWFFIUAWTfKNYicPCu561hRt1ZR/A7CJlIKfIxObpEFFJc6itPRB1GE wWMw== 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=vijEGVxtJuuSzGLY9yn/4Hcsl6Bo59fqju4xVlM6UoM=; b=lhCosVEIwqfaWxpjn2nSe067vWf5h9ZUJI3pFokS9TR65pFiF/8tfjwmxYm8NoxCik j/BVD1GX7Ug4+c9zKE/V8XfAxoSR0IaOKE2t8ba29ac/1W4ttRgKbSCtbmXGuzh9EIDT zlTEqazlz0HFTCIrXuQ9mfmXBU0fB1hYNKlySv8gkx8/hbpQ+4o1a+0rgsvUzObAlTSr iYJqRK4V5UgB1ZLv8b5EvkGId3tQJoJcamFdOJrwaME1mUnCO9cGOL2QHXwJRxxW2EIx eL2bvm+B3uVv/DdXF1k0xnjLdDA5ovYMjziq4y54VEkLkitswKAQeXlwjJPkzHODzjfn KcHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20210112 header.b=X4WtkQQb; 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 ez10-20020a056402450a00b0046159da6233si1202239edb.145.2022.11.03.06.06.06; Thu, 03 Nov 2022 06:06:33 -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=X4WtkQQb; 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 S230522AbiKCNC3 (ORCPT + 99 others); Thu, 3 Nov 2022 09:02:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231841AbiKCNB6 (ORCPT ); Thu, 3 Nov 2022 09:01:58 -0400 Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 925281740D; Thu, 3 Nov 2022 06:01:35 -0700 (PDT) Received: by mail-ed1-x52e.google.com with SMTP id u24so2820997edd.13; Thu, 03 Nov 2022 06:01:35 -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=vijEGVxtJuuSzGLY9yn/4Hcsl6Bo59fqju4xVlM6UoM=; b=X4WtkQQbvCyXAbepVUilqzUNnrMIKg8ualCt8xz9J/6oe5WuAzw67cZ+ELtLXiiNrs wrLJBqHxRuvFGQSYAjloChLjFtebdoPZ6d84hOadIC/apJpYNIk5dkBqcSc50AZuBlnn z3oYEMB4gGHOmREbOWGcfpghwdMtdKhmZbhd3EkUnx9fJvZtqrYlUL5It71n/nS+fMDO d7Di1j3reDirFsfBPRJKRkwDWlJQdzl/VcPfRAlNtblO8XiLGGHAgFp8KoN73YzAzKiC 59rPPYqB7AR2noEG1sdN7CvUDajk2m7ONtcx2WV9EvWKkTg76KXQ/ltZ6JXUSjLxV0TY NPnw== 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=vijEGVxtJuuSzGLY9yn/4Hcsl6Bo59fqju4xVlM6UoM=; b=Y+wgus8U6M9wzc10nqG8dwUPbITbyk+A71NUPXwmGraTrOG7IhWLmQGeJeddGhSg3a tgKvkpD2HiSDh4Ucu+Ki4GhuZYGPM1rzo2jhV47IyflR8sT6KhvqE5MaqzMK/Azkh7sB 3H3aQdEsSqmpGh+iHK9f7AQTwSUMglB+/V7nXVFUETHN6saOX87vkD2YUHaUMf08ArYr w/uA7fJsjJzxpf9XGPazb1MHT2dC228y3xm6TclRVuFEjiNBUZSleETBtxyqkY9rWIXb jU4z+tYkK3BzwLL+BUENqHFgLfWTfGobQdyffC2se9cuhN6fCJbbxJQhv3Ksshwyhg2U /lZg== X-Gm-Message-State: ACrzQf1ME3Z6w05Z7ZJHUvUFIJaLt/g0qBDuSXEssQUXquVeYjA500pd GPgw3vE5H/Qsk5V1JqJaSdnHzfS16rsHhA== X-Received: by 2002:a05:6402:2947:b0:451:32a:2222 with SMTP id ed7-20020a056402294700b00451032a2222mr29167999edb.376.1667480494116; Thu, 03 Nov 2022 06:01:34 -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.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 06:01:33 -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 Subject: [PATCH v4 11/13] dt-bindings: iio: temperature: ltc2983: use generic node name in example Date: Thu, 3 Nov 2022 15:00:39 +0200 Message-Id: <20221103130041.2153295-12-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?1748480340247987988?= X-GMAIL-MSGID: =?utf-8?q?1748480340247987988?= From: Cosmin Tanislav Examples should use the generic IIO node name. Fix it. Signed-off-by: Cosmin Tanislav --- .../devicetree/bindings/iio/temperature/adi,ltc2983.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml b/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml index 467e165e9b0b..bd357ff28e65 100644 --- a/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml +++ b/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml @@ -420,7 +420,7 @@ examples: #address-cells = <1>; #size-cells = <0>; - sensor_ltc2983: ltc2983@0 { + temp@0 { compatible = "adi,ltc2983"; reg = <0>; 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 From patchwork Thu Nov 3 13:00:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cosmin Tanislav X-Patchwork-Id: 14857 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp517574wru; Thu, 3 Nov 2022 06:06:40 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6P3kMq/wNKg/eBvJf6V3iRG5ZStlvKbxcAIl3g3YbJhGgTvbdsrCr7Ipdxlr845GKRr3+j X-Received: by 2002:a63:4182:0:b0:46f:1263:1f6 with SMTP id o124-20020a634182000000b0046f126301f6mr25949534pga.611.1667480800536; Thu, 03 Nov 2022 06:06:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667480800; cv=none; d=google.com; s=arc-20160816; b=jbKClQczE5eBCzf4SLYBCIbP4S2Uu49hOz0Fx1vFQb8uaIUeIB1zIvmPnXcsloRm+N bjoUMS41J7FiaLNwV7o+zedLtYIousigdB0pLrcc5AOQpCoObAbVLx5d8DJ1ozn7kG/b jEC2w/JLo23aXhxTsJVOb6ExltRaumIuCD7Ou5Zl89K1ILVP9O48DuuHosagEjs45V1+ MgwLm/xUyg6IkfZMwvKyvi2ByXQViec4KXllrway7zbBztAD+yl2CKbd5jN8JbjLnwMs thf6FmDdi+c7IxsRUQOZr4i93oINcLKfRlX+SvYoNgTzYdU+iwub/qMDLYrR5oT+pw3L RLrw== 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=4d2UbvO3FSNARetdP9i+wj+MMgnS/Oph7AohVHZYBmU=; b=mxtYibexpNDGyyTl0BDL2iBoei7UJEp5OgFs+BZTN9tUBT44eQBsvUX3+FzIgjLsch wqcWh0Cy4w6YSHl51Wz0ZMRxvTnrbIifJcscA2ijNlOJ7Ms3IjzTOhz0tSnr0j91EsTH Jv/ben82PbBy8iZFY64yh0Cg0PMkOPLu9K9FIbFGmqFvhA7rNdI/1Mrz1x9h0PvgTnpX cHyyIWWfO2kJMmIgUXMWTIkoxGAW4ANuLcdBWVUi/BUKPEYPsfkQL/uEcO2NSxUVGURj QUsnPNPP5SUlKbfDRS62U3J1/KlAnN1dvACtTKSf+3XAkGZTt6RyGumNM50jA2GaEuTr 42mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20210112 header.b=ko+OdfHB; 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 i7-20020a170902cf0700b00186a8bd137fsi702124plg.453.2022.11.03.06.06.24; Thu, 03 Nov 2022 06:06:40 -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=ko+OdfHB; 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 S231460AbiKCNCx (ORCPT + 99 others); Thu, 3 Nov 2022 09:02:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231847AbiKCNCP (ORCPT ); Thu, 3 Nov 2022 09:02:15 -0400 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4364165B6; Thu, 3 Nov 2022 06:01:44 -0700 (PDT) Received: by mail-ej1-x630.google.com with SMTP id bj12so4911509ejb.13; Thu, 03 Nov 2022 06:01:44 -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=4d2UbvO3FSNARetdP9i+wj+MMgnS/Oph7AohVHZYBmU=; b=ko+OdfHBGEDfcT16wi3KKd9Nqm9C9uoY9DbXU8/h9W62U4RWI6TOHcbteRZh2aE2oE X/v3xnZlb/pa23EpK5moMP/XdPpKRRcUwPVc+9GB9wGz5K28up07E62K0UYV3NU7BpWS TOsBhHPWYs5d0qNhbP2QSiuX1MKvhqYI+p9vUbflZD93HOan/EOqB6IhPgW3SwhhJ5wW ISAtJp/YhkGbZ9zuv4CdFGIqL49RhTaBmgeN18EF+5N2UG2PDCaXwVPfs8mOFmajFNLU 464nDpHELa7UhBgFwf6tK6NlU6CnANqMx29Ce/dumZbeIPLhVI8Prbm1n9qNqnGOal8I AIJw== 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=4d2UbvO3FSNARetdP9i+wj+MMgnS/Oph7AohVHZYBmU=; b=3mp2KPJSjXCdLjWePLgZJTAkBsNaJ++a1A2HhQqJ/Nk+EYmSqNQDIVrfCf+NyQfDHM E+BgtGfngBJPO1n3sogtp3I/rEq/ZMnHcoqqZlw3kWF//CGOQTbL9svNl93bOa4jJS2X 4fbx5YArBASuLOekygl6W+HuW98YZMeA5tOsMbI4mqvltkWEA4y1lMoYjCeCC+vyfZfD +iSuSfXJ54HAiGJzxVETzZd3o2k0lY/vjbcTGUEcfzUx2zVW7cTOI8Kq9akfmKa1TbCs EB2oHvjn/tMf1cVrlZSPlJ2wsN+NyJhXDkXFpaJlLsFxgmZcbkaQOHr2Ax3E6LyJAJ7I iTug== X-Gm-Message-State: ACrzQf0T2OTDzD20Rz9/TIek/HDUaoOKZL9IH/1yvqRlg/bXSwWcOV9H LOLLFaotVX4D26ECxwsXLFpx8CnYFhDDAQ== X-Received: by 2002:a17:907:d2a:b0:7ad:e0c5:4bd7 with SMTP id gn42-20020a1709070d2a00b007ade0c54bd7mr17739808ejc.177.1667480500362; Thu, 03 Nov 2022 06:01:40 -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.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 06:01:39 -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 Subject: [PATCH v4 13/13] iio: temperature: ltc2983: support more parts Date: Thu, 3 Nov 2022 15:00:41 +0200 Message-Id: <20221103130041.2153295-14-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?1748480348073036099?= X-GMAIL-MSGID: =?utf-8?q?1748480348073036099?= 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 --- drivers/iio/temperature/ltc2983.c | 183 ++++++++++++++++++++++++++++-- 1 file changed, 176 insertions(+), 7 deletions(-) diff --git a/drivers/iio/temperature/ltc2983.c b/drivers/iio/temperature/ltc2983.c index ca1bb5f48988..72c052e4c7bc 100644 --- a/drivers/iio/temperature/ltc2983.c +++ b/drivers/iio/temperature/ltc2983.c @@ -25,9 +25,12 @@ #define LTC2983_STATUS_REG 0x0000 #define LTC2983_TEMP_RES_START_REG 0x0010 #define LTC2983_TEMP_RES_END_REG 0x005F +#define LTC2983_EEPROM_KEY_REG 0x00B0 +#define LTC2983_EEPROM_READ_STATUS_REG 0x00D0 #define LTC2983_GLOBAL_CONFIG_REG 0x00F0 #define LTC2983_MULT_CHANNEL_START_REG 0x00F4 #define LTC2983_MULT_CHANNEL_END_REG 0x00F7 +#define LTC2986_EEPROM_STATUS_REG 0x00F9 #define LTC2983_MUX_CONFIG_REG 0x00FF #define LTC2983_CHAN_ASSIGN_START_REG 0x0200 #define LTC2983_CHAN_ASSIGN_END_REG 0x024F @@ -35,13 +38,21 @@ #define LTC2983_CUST_SENS_TBL_END_REG 0x03CF #define LTC2983_DIFFERENTIAL_CHAN_MIN 2 -#define LTC2983_MAX_CHANNELS_NR 20 #define LTC2983_MIN_CHANNELS_NR 1 #define LTC2983_SLEEP 0x97 #define LTC2983_CUSTOM_STEINHART_SIZE 24 #define LTC2983_CUSTOM_SENSOR_ENTRY_SZ 6 #define LTC2983_CUSTOM_STEINHART_ENTRY_SZ 4 +#define LTC2983_EEPROM_KEY 0xA53C0F5A +#define LTC2983_EEPROM_WRITE_CMD 0x15 +#define LTC2983_EEPROM_READ_CMD 0x16 +#define LTC2983_EEPROM_STATUS_FAILURE_MASK GENMASK(3, 1) +#define LTC2983_EEPROM_READ_FAILURE_MASK GENMASK(7, 0) + +#define LTC2983_EEPROM_WRITE_TIME_MS 2600 +#define LTC2983_EEPROM_READ_TIME_MS 20 + #define LTC2983_CHAN_START_ADDR(chan) \ (((chan - 1) * 4) + LTC2983_CHAN_ASSIGN_START_REG) #define LTC2983_CHAN_RES_ADDR(chan) \ @@ -171,6 +182,7 @@ enum { LTC2983_SENSOR_DIODE = 28, LTC2983_SENSOR_SENSE_RESISTOR = 29, LTC2983_SENSOR_DIRECT_ADC = 30, + LTC2983_SENSOR_ACTIVE_TEMP = 31, }; #define to_thermocouple(_sensor) \ @@ -191,7 +203,17 @@ enum { #define to_adc(_sensor) \ container_of(_sensor, struct ltc2983_adc, sensor) +#define to_temp(_sensor) \ + container_of(_sensor, struct ltc2983_temp, sensor) + +struct ltc2983_chip_info { + unsigned int max_channels_nr; + bool has_temp; + bool has_eeprom; +}; + struct ltc2983_data { + const struct ltc2983_chip_info *info; struct regmap *regmap; struct spi_device *spi; struct mutex lock; @@ -210,6 +232,7 @@ struct ltc2983_data { */ __be32 temp __aligned(IIO_DMA_MINALIGN); __be32 chan_val; + __be32 eeprom_key; }; struct ltc2983_sensor { @@ -272,6 +295,12 @@ struct ltc2983_adc { bool single_ended; }; +struct ltc2983_temp { + struct ltc2983_sensor sensor; + struct ltc2983_custom_sensor *custom; + bool single_ended; +}; + /* * Convert to Q format numbers. These number's are integers where * the number of integer and fractional bits are specified. The resolution @@ -606,6 +635,22 @@ static int ltc2983_adc_assign_chan(struct ltc2983_data *st, return __ltc2983_chan_assign_common(st, sensor, chan_val); } +static int ltc2983_temp_assign_chan(struct ltc2983_data *st, + const struct ltc2983_sensor *sensor) +{ + struct ltc2983_temp *temp = to_temp(sensor); + u32 chan_val; + int ret; + + chan_val = LTC2983_ADC_SINGLE_ENDED(temp->single_ended); + + ret = __ltc2983_chan_custom_sensor_assign(st, temp->custom, &chan_val); + if (ret) + return ret; + + return __ltc2983_chan_assign_common(st, sensor, chan_val); +} + static struct ltc2983_sensor * ltc2983_thermocouple_new(const struct fwnode_handle *child, struct ltc2983_data *st, const struct ltc2983_sensor *sensor) @@ -771,10 +816,10 @@ ltc2983_rtd_new(const struct fwnode_handle *child, struct ltc2983_data *st, if (rtd->sensor_config & LTC2983_RTD_4_WIRE_MASK) { /* 4-wire */ u8 min = LTC2983_DIFFERENTIAL_CHAN_MIN, - max = LTC2983_MAX_CHANNELS_NR; + max = st->info->max_channels_nr; if (rtd->sensor_config & LTC2983_RTD_ROTATION_MASK) - max = LTC2983_MAX_CHANNELS_NR - 1; + max = st->info->max_channels_nr - 1; if (((rtd->sensor_config & LTC2983_RTD_KELVIN_R_SENSE_MASK) == LTC2983_RTD_KELVIN_R_SENSE_MASK) && @@ -1143,6 +1188,38 @@ static struct ltc2983_sensor *ltc2983_adc_new(struct fwnode_handle *child, return &adc->sensor; } +static struct ltc2983_sensor *ltc2983_temp_new(struct fwnode_handle *child, + struct ltc2983_data *st, + const struct ltc2983_sensor *sensor) +{ + struct ltc2983_temp *temp; + + temp = devm_kzalloc(&st->spi->dev, sizeof(*temp), GFP_KERNEL); + if (!temp) + return ERR_PTR(-ENOMEM); + + if (fwnode_property_read_bool(child, "adi,single-ended")) + temp->single_ended = true; + + if (!temp->single_ended && + sensor->chan < LTC2983_DIFFERENTIAL_CHAN_MIN) { + dev_err(&st->spi->dev, "Invalid chan:%d for differential temp\n", + sensor->chan); + return ERR_PTR(-EINVAL); + } + + temp->custom = __ltc2983_custom_sensor_new(st, child, "adi,custom-temp", + false, 4096, true); + if (IS_ERR(temp->custom)) + return ERR_CAST(temp->custom); + + /* set common parameters */ + temp->sensor.assign_chan = ltc2983_temp_assign_chan; + temp->sensor.fault_handler = ltc2983_common_fault_handler; + + return &temp->sensor; +} + static int ltc2983_chan_read(struct ltc2983_data *st, const struct ltc2983_sensor *sensor, int *val) { @@ -1302,10 +1379,10 @@ static int ltc2983_parse_dt(struct ltc2983_data *st) /* check if we have a valid channel */ if (sensor.chan < LTC2983_MIN_CHANNELS_NR || - sensor.chan > LTC2983_MAX_CHANNELS_NR) { + sensor.chan > st->info->max_channels_nr) { ret = -EINVAL; dev_err(dev, "chan:%d must be from %u to %u\n", sensor.chan, - LTC2983_MIN_CHANNELS_NR, LTC2983_MAX_CHANNELS_NR); + LTC2983_MIN_CHANNELS_NR, st->info->max_channels_nr); goto put_child; } else if (channel_avail_mask & BIT(sensor.chan)) { ret = -EINVAL; @@ -1345,6 +1422,9 @@ static int ltc2983_parse_dt(struct ltc2983_data *st) st->iio_channels--; } else if (sensor.type == LTC2983_SENSOR_DIRECT_ADC) { st->sensors[chan] = ltc2983_adc_new(child, st, &sensor); + } else if (st->info->has_temp && + sensor.type == LTC2983_SENSOR_ACTIVE_TEMP) { + st->sensors[chan] = ltc2983_temp_new(child, st, &sensor); } else { dev_err(dev, "Unknown sensor type %d\n", sensor.type); ret = -EINVAL; @@ -1371,6 +1451,45 @@ static int ltc2983_parse_dt(struct ltc2983_data *st) return ret; } +static int ltc2983_eeprom_cmd(struct ltc2983_data *st, unsigned int cmd, + unsigned int wait_time, unsigned int status_reg, + unsigned long status_fail_mask) +{ + unsigned long time; + unsigned int val; + int ret; + + ret = regmap_bulk_write(st->regmap, LTC2983_EEPROM_KEY_REG, + &st->eeprom_key, sizeof(st->eeprom_key)); + if (ret) + return ret; + + reinit_completion(&st->completion); + + ret = regmap_write(st->regmap, LTC2983_STATUS_REG, + LTC2983_STATUS_START(true) | cmd); + if (ret) + return ret; + + time = wait_for_completion_timeout(&st->completion, + msecs_to_jiffies(wait_time)); + if (!time) { + dev_err(&st->spi->dev, "EEPROM command timed out\n"); + return -ETIMEDOUT; + } + + ret = regmap_read(st->regmap, status_reg, &val); + if (ret) + return ret; + + if (val & status_fail_mask) { + dev_err(&st->spi->dev, "EEPROM command failed: 0x%02X\n", val); + return -EINVAL; + } + + return 0; +} + static int ltc2983_setup(struct ltc2983_data *st, bool assign_iio) { u32 iio_chan_t = 0, iio_chan_v = 0, chan, iio_idx = 0, status; @@ -1403,6 +1522,15 @@ static int ltc2983_setup(struct ltc2983_data *st, bool assign_iio) if (ret) return ret; + if (st->info->has_eeprom && !assign_iio) { + ret = ltc2983_eeprom_cmd(st, LTC2983_EEPROM_READ_CMD, + LTC2983_EEPROM_READ_TIME_MS, + LTC2983_EEPROM_READ_STATUS_REG, + LTC2983_EEPROM_READ_FAILURE_MASK); + if (!ret) + return 0; + } + for (chan = 0; chan < st->num_channels; chan++) { u32 chan_type = 0, *iio_chan; @@ -1442,9 +1570,13 @@ static int ltc2983_setup(struct ltc2983_data *st, bool assign_iio) static const struct regmap_range ltc2983_reg_ranges[] = { regmap_reg_range(LTC2983_STATUS_REG, LTC2983_STATUS_REG), regmap_reg_range(LTC2983_TEMP_RES_START_REG, LTC2983_TEMP_RES_END_REG), + regmap_reg_range(LTC2983_EEPROM_KEY_REG, LTC2983_EEPROM_KEY_REG), + regmap_reg_range(LTC2983_EEPROM_READ_STATUS_REG, + LTC2983_EEPROM_READ_STATUS_REG), regmap_reg_range(LTC2983_GLOBAL_CONFIG_REG, LTC2983_GLOBAL_CONFIG_REG), regmap_reg_range(LTC2983_MULT_CHANNEL_START_REG, LTC2983_MULT_CHANNEL_END_REG), + regmap_reg_range(LTC2986_EEPROM_STATUS_REG, LTC2986_EEPROM_STATUS_REG), regmap_reg_range(LTC2983_MUX_CONFIG_REG, LTC2983_MUX_CONFIG_REG), regmap_reg_range(LTC2983_CHAN_ASSIGN_START_REG, LTC2983_CHAN_ASSIGN_END_REG), @@ -1489,6 +1621,12 @@ static int ltc2983_probe(struct spi_device *spi) st = iio_priv(indio_dev); + st->info = device_get_match_data(&spi->dev); + if (!st->info) + st->info = (void *)spi_get_device_id(spi)->driver_data; + if (!st->info) + return -ENODEV; + st->regmap = devm_regmap_init_spi(spi, <c2983_regmap_config); if (IS_ERR(st->regmap)) { dev_err(&spi->dev, "Failed to initialize regmap\n"); @@ -1498,6 +1636,7 @@ static int ltc2983_probe(struct spi_device *spi) mutex_init(&st->lock); init_completion(&st->completion); st->spi = spi; + st->eeprom_key = cpu_to_be32(LTC2983_EEPROM_KEY); spi_set_drvdata(spi, st); ret = ltc2983_parse_dt(st); @@ -1525,6 +1664,15 @@ static int ltc2983_probe(struct spi_device *spi) return ret; } + if (st->info->has_eeprom) { + ret = ltc2983_eeprom_cmd(st, LTC2983_EEPROM_WRITE_CMD, + LTC2983_EEPROM_WRITE_TIME_MS, + LTC2986_EEPROM_STATUS_REG, + LTC2983_EEPROM_STATUS_FAILURE_MASK); + if (ret) + return ret; + } + indio_dev->name = name; indio_dev->num_channels = st->iio_channels; indio_dev->channels = st->iio_chan; @@ -1555,14 +1703,35 @@ static int ltc2983_suspend(struct device *dev) static DEFINE_SIMPLE_DEV_PM_OPS(ltc2983_pm_ops, ltc2983_suspend, ltc2983_resume); +static const struct ltc2983_chip_info ltc2983_chip_info_data = { + .max_channels_nr = 20, +}; + +static const struct ltc2983_chip_info ltc2984_chip_info_data = { + .max_channels_nr = 20, + .has_eeprom = true, +}; + +static const struct ltc2983_chip_info ltc2986_chip_info_data = { + .max_channels_nr = 10, + .has_temp = true, + .has_eeprom = true, +}; + static const struct spi_device_id ltc2983_id_table[] = { - { "ltc2983" }, + { "ltc2983", (kernel_ulong_t)<c2983_chip_info_data }, + { "ltc2984", (kernel_ulong_t)<c2984_chip_info_data }, + { "ltc2986", (kernel_ulong_t)<c2986_chip_info_data }, + { "ltm2985", (kernel_ulong_t)<c2986_chip_info_data }, {}, }; MODULE_DEVICE_TABLE(spi, ltc2983_id_table); static const struct of_device_id ltc2983_of_match[] = { - { .compatible = "adi,ltc2983" }, + { .compatible = "adi,ltc2983", .data = <c2983_chip_info_data }, + { .compatible = "adi,ltc2984", .data = <c2984_chip_info_data }, + { .compatible = "adi,ltc2986", .data = <c2986_chip_info_data }, + { .compatible = "adi,ltm2985", .data = <c2986_chip_info_data }, {}, }; MODULE_DEVICE_TABLE(of, ltc2983_of_match);