From patchwork Sat Dec 9 10:56:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li peiyu <579lpy@gmail.com> X-Patchwork-Id: 752082 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Na8x32m/" Received: from mail-pj1-x1041.google.com (mail-pj1-x1041.google.com [IPv6:2607:f8b0:4864:20::1041]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 356E1D1; Sat, 9 Dec 2023 02:56:24 -0800 (PST) Received: by mail-pj1-x1041.google.com with SMTP id 98e67ed59e1d1-2886579d59fso2907233a91.1; Sat, 09 Dec 2023 02:56:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702119383; x=1702724183; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=EQjKnUKr/6rWL0h9abnt4zIo/7TuTvgvuGycMSFLA9c=; b=Na8x32m/LYhuoiHbrSYm65KQ2ZLixMwxDy70MMtBbrRlthXCt/I3+xjhZ9qxFLyB6J Ts86wtHMl00TQYGHJSQHyzgiQZl/7mjDXKwdvSrcGEcxfH5Z1MgSAe8rgt3pCnCGNjud zdLyGLz6Upb5Fk1jKqG/oqoGKWaa4khOOGCXQBxl6ju7hDTggvmfQEdrJXw41z298P0M UqnTX7W+xgudDQF8rMPTNAylUbMV5qdq5ovF3FuFEoQo8kqPYL8gptllISoPSArr4BSj a2Kv8z8gZOnoJrkyv1cJqeM8oIjXpV7CZjCISQJgM9Rm882v3gYLVZ8r44FcS6SAfEUU 3Tiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702119383; x=1702724183; 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=EQjKnUKr/6rWL0h9abnt4zIo/7TuTvgvuGycMSFLA9c=; b=kXgJYPcdhVTciyttW5BXJ5kM/Wi/siR80hdjoyYawgco2LXqXkIPqJG6msiTH2L652 65YzA5qjq6swWQ1vmxUXds/J81/RnHcY/G8dz8L93twgnWDuunS0b7mNGvEtvSPj5HgO cxE5j9H+yvAJIBxf1YsWlVibDND74CGk+WV903onbp1jrrQXKAsje0Tj8oj/DuwSo1SX l2Cml7SClmSM53WBVMCLL3QV5aK19uOERQRvFgDvKhyvQQvqHV4qEbMF/SSARmkorgGk GQTk7A7/CLZsJKvcPaSV6K2d4Wo8vCuMXpcAJa3wMghf6WwcBSVVkP1/2nLhtA59YDSS 1HZw== X-Gm-Message-State: AOJu0Yyos9+ClDhRILzaSxB/QbkF+wS8AduYOVgjsqo9W/on2RcVEVhg Wl7reengiwRnzcXMW7Iq+aY= X-Google-Smtp-Source: AGHT+IHTLsZFrCzNWQC/KcLVloMG2wD6jN4hlslCQM9FlqbedZjOXCkRLcJMwrwjOzWsN9IMs4ZKjw== X-Received: by 2002:a05:6a21:8195:b0:190:2941:7e1f with SMTP id pd21-20020a056a21819500b0019029417e1fmr1471542pzb.9.1702119383331; Sat, 09 Dec 2023 02:56:23 -0800 (PST) Received: from dawn-virtual-machine.localdomain ([183.198.111.112]) by smtp.gmail.com with ESMTPSA id gu25-20020a056a004e5900b006cbb58301basm3125586pfb.19.2023.12.09.02.56.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Dec 2023 02:56:22 -0800 (PST) From: Li peiyu <579lpy@gmail.com> To: jic23@kernel.org Cc: javier.carrasco.cruz@gmail.com, lars@metafoo.de, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, linux-iio@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v5 2/4] iio: ABI: document temperature and humidity peak/trough raw attributes Date: Sat, 9 Dec 2023 18:56:11 +0800 Message-Id: <20231209105611.3740-1-579lpy@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231209105217.3630-1-579lpy@gmail.com> References: <20231209105217.3630-1-579lpy@gmail.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Javier Carrasco The in_temp_peak_raw attribute is already in use, but its documentation is still missing. The in_humidityrelative_raw must be documented for a new iio user that supports this attribute. Add temp and humidityrelative use cases. When at it, remove an extra blank space in the description. For users that support minimum values, a new in__trough_raw attribute is required. Add this attribute and document the first uses of it for temp and humidityrelative types. Signed-off-by: Javier Carrasco --- Documentation/ABI/testing/sysfs-bus-iio | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio index 0d3ec5fc45f2..9d937e29724b 100644 --- a/Documentation/ABI/testing/sysfs-bus-iio +++ b/Documentation/ABI/testing/sysfs-bus-iio @@ -362,10 +362,21 @@ Description: What: /sys/bus/iio/devices/iio:deviceX/in_accel_x_peak_raw What: /sys/bus/iio/devices/iio:deviceX/in_accel_y_peak_raw What: /sys/bus/iio/devices/iio:deviceX/in_accel_z_peak_raw +What: /sys/bus/iio/devices/iio:deviceX/in_humidityrelative_peak_raw +What: /sys/bus/iio/devices/iio:deviceX/in_temp_peak_raw KernelVersion: 2.6.36 Contact: linux-iio@vger.kernel.org Description: - Highest value since some reset condition. These + Highest value since some reset condition. These + attributes allow access to this and are otherwise + the direct equivalent of the Y[_name]_raw attributes. + +What: /sys/bus/iio/devices/iio:deviceX/in_humidityrelative_trough_raw +What: /sys/bus/iio/devices/iio:deviceX/in_temp_trough_raw +KernelVersion: 6.7 +Contact: linux-iio@vger.kernel.org +Description: + Lowest value since some reset condition. These attributes allow access to this and are otherwise the direct equivalent of the Y[_name]_raw attributes. From patchwork Sat Dec 9 10:59:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li peiyu <579lpy@gmail.com> X-Patchwork-Id: 752081 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="T9xpJtaP" Received: from mail-il1-x142.google.com (mail-il1-x142.google.com [IPv6:2607:f8b0:4864:20::142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2432CD1; Sat, 9 Dec 2023 02:59:38 -0800 (PST) Received: by mail-il1-x142.google.com with SMTP id e9e14a558f8ab-35d3846fac9so9867995ab.2; Sat, 09 Dec 2023 02:59:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702119577; x=1702724377; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Lm+D5jKJ17HuWeeaSzfoieBbBFG7aIweWno7P45cPZU=; b=T9xpJtaPB+sqe1hG/rSgrzkixG5NOwD96/3hGsvTOul4XeaohRsUk57KkVTwdo2v+s qSYcyVDgAP+fPtmrk7sOA/Ih00NIPFGljWjtzH3vYPKd8jYecJ1SkKww6q2nkM8/hSEV KfxUZadQ4oWG/EoLTFriF7pg+aODTHnlzExWPzmeezqzYuCgZRZfb079zASbyetHUPfR vBbW3IwSTLLjUjod0ZHfnbEqH1yr1q401aCkZqzuwprCsz53bZAMSkZrRMUmI+wNd5kd 9x35Onn5nWwPbd0CsJaMomk+6myiTGkj5/nwnpEDuz6S5S1dW5otKmOKzdlADCOCZFX1 WgNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702119577; x=1702724377; 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=Lm+D5jKJ17HuWeeaSzfoieBbBFG7aIweWno7P45cPZU=; b=ZChbZgSoDqXelWCwTFLykhTR0CM0cQW+FeNkf7U48P/jJ9qDEqof8u6Gn59LSTx7o5 IYaoAJClqoqdn88n+S+9eUpSWs9J0uwYbpfpgebiA3K/Cf9Bdh8cBVWEB66zs8fMp40M HOQemfDsAw9ba2lJX/A1TwbkZTNx0gNgG/+iuKTQZEKs5Fx7S8SZDCIHOE4HsqvHlmFx e8LUfA46+pbqjGUPbyHcGxcstJn4Fyo1M8QhGTUTmtRd/0s0iK8k1ZUXngDZbsOVP1VH KTiWwcgMB7zfzsmZQRd8CwgKaj0ql67TzeUjfzmIto0PqLMTKk3HCJlyje9mof6XBMmv g83A== X-Gm-Message-State: AOJu0Yy8AXp+w2gCWQVqz4HefTyIxEO12cjG+dHXX1MmljqNYCBvIHsu FiKELeBeyT+xRNw8sIsy9pQ= X-Google-Smtp-Source: AGHT+IE9oQ66Nh55WRvLQOeBudMCb8IxqZPeNB6jqOGah/nj66T++A18Lc6pG5a326EEdM9rZV+sfQ== X-Received: by 2002:a05:6e02:194b:b0:35d:720a:7eaf with SMTP id x11-20020a056e02194b00b0035d720a7eafmr2534435ilu.6.1702119577279; Sat, 09 Dec 2023 02:59:37 -0800 (PST) Received: from dawn-virtual-machine.localdomain ([183.198.111.112]) by smtp.gmail.com with ESMTPSA id a18-20020a170902ecd200b001cfc1b931a9sm3166912plh.249.2023.12.09.02.59.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Dec 2023 02:59:36 -0800 (PST) From: Li peiyu <579lpy@gmail.com> To: jic23@kernel.org Cc: javier.carrasco.cruz@gmail.com, lars@metafoo.de, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, Li peiyu <579lpy@gmail.com> Subject: [PATCH v5 4/4] dt-bindings: iio: humidity: Add TI HDC302x support Date: Sat, 9 Dec 2023 18:59:26 +0800 Message-Id: <20231209105926.3965-1-579lpy@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231209105217.3630-1-579lpy@gmail.com> References: <20231209105217.3630-1-579lpy@gmail.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Add device tree bindings for HDC3020/HDC3021/HDC3022 humidity and temperature sensors. Signed-off-by: Li peiyu <579lpy@gmail.com> --- .../bindings/iio/humidity/ti,hdc3020.yaml | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/humidity/ti,hdc3020.yaml diff --git a/Documentation/devicetree/bindings/iio/humidity/ti,hdc3020.yaml b/Documentation/devicetree/bindings/iio/humidity/ti,hdc3020.yaml new file mode 100644 index 000000000000..f04b09fdca5e --- /dev/null +++ b/Documentation/devicetree/bindings/iio/humidity/ti,hdc3020.yaml @@ -0,0 +1,55 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/humidity/ti,hdc3020.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: HDC3020/HDC3021/HDC3022 humidity and temperature iio sensors + +maintainers: + - Li peiyu <579lpy@gmail.com> + - Javier Carrasco + +description: + https://www.ti.com/lit/ds/symlink/hdc3020.pdf + + The HDC302x is an integrated capacitive based relative humidity (RH) + and temperature sensor. + +properties: + compatible: + oneOf: + - items: + - enum: + - ti,hdc3021 + - ti,hdc3022 + - const: ti,hdc3020 + - items: + - const: ti,hdc3020 + + interrupts: + maxItems: 1 + + vdd-supply: true + + reg: + maxItems: 1 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + humidity-sensor@47 { + compatible = "ti,hdc3021", "ti,hdc3020"; + reg = <0x47>; + vdd-supply = <&vcc_3v3>; + }; + };