From patchwork Wed Dec 20 00:17:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Abdel Alkuor X-Patchwork-Id: 181355 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp2323047dyi; Tue, 19 Dec 2023 16:21:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IEizv1HfEvdn0fIbLT0gxnGhVIDNIx7HFVOVzNZJojx/VY3YQJXjnfQoA+9mXU1Mv++ztl1 X-Received: by 2002:a17:906:10cc:b0:a23:51e4:cc4c with SMTP id v12-20020a17090610cc00b00a2351e4cc4cmr2546524ejv.36.1703031673285; Tue, 19 Dec 2023 16:21:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703031673; cv=none; d=google.com; s=arc-20160816; b=fIBP2qIA2g1jIMaXi2XjqHfa1A+vsc/bhcnK6L6egXT2j6yK36sOiVjrpvV6ono/9K kR4w+zSDipc+wKtm28jNQYgyrHtf/g3qW1lsMZMxTFwNDi7w3Kyjivaggpo+YIRmCFSx ATwcLVgLgIky03DvGUQNCE82awi29JeNXczNOq4ul3RgmrtTLauQ2iw+T7qtIJF41hep vLDCRDuAaWYho5uAQfe1WUzurIEUG/3lrs7WsZcQ8jA0vnV6ae2gdX/BSwzK9X1mSpot PCVAsr6IoKlodM/GqESzjuBCc4xTGJrk63kB3E5ZcQSL1jIJgyL/vFuzjfET6a29cpWa iMpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=meLKqm86U76iMcMmqxuxzpMVgH/WS4qTltle+XEqnQE=; fh=9o+JoOK9fX3PtYbRvZH3DuHAPcrjBZ/qjPiZjpXXXoI=; b=0/zOw88l3AupY3ZPKxk1hpwwxFgICJt034gdodKC9wpIZr4teyeJFI/EIRxr5CWO5f 9F6DdZSsWkS3qolFrKdctX1XLIr3+QjewFeby+rEa28/8P256YPKTQUB20htEVjdkh+V Nl2Y09/ZF0zOj7l4UIABK9R67J3zmYyzLyrtYryCCm9brfdjkqxu//5ZWrmlyLGj/SPS zr8kmQUT1YqD+E5RSXSiN+7lxcOcSQsoKV3U/4kHnmw85YwReTZ0xP/Qr18LMdI05QO9 Z5XM8MkLzIpuaghTPq9YmgQZnEzUIAz87nPFwE1zJmsz+gj458HEbkMmB2OFz68c8CjZ YbSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=OQmCpYNm; spf=pass (google.com: domain of linux-kernel+bounces-6141-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6141-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id e10-20020a170906504a00b00a234a253cfdsi2498474ejk.619.2023.12.19.16.21.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 16:21:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-6141-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=OQmCpYNm; spf=pass (google.com: domain of linux-kernel+bounces-6141-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6141-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 8E0F01F258E2 for ; Wed, 20 Dec 2023 00:21:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 93EF0FBE3; Wed, 20 Dec 2023 00:19:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OQmCpYNm" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-qk1-f171.google.com (mail-qk1-f171.google.com [209.85.222.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 64DADB660; Wed, 20 Dec 2023 00:19:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-qk1-f171.google.com with SMTP id af79cd13be357-77fa980b50aso328010385a.3; Tue, 19 Dec 2023 16:19:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703031553; x=1703636353; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=meLKqm86U76iMcMmqxuxzpMVgH/WS4qTltle+XEqnQE=; b=OQmCpYNmz0FfkOKwZcsZn5JXmQg3xso5xaV8JDgXGPPM2iOLTsHf0FcDRjH2I7Rzy2 lzhzE3/24Hb/QhJn6aiWIXUd98DHLRSQMZ4HY0fYGLphyGH9LA2V70vXZT2i+MGZyEkL oL8ELXgvksLl38AOBfEfuoVtF34krhL6FJ9ujH8j/sjGsKXGUGPwDkTsBcZ+XIqO5nqa 8e3d6Ngijk9S4CqIE2OwymLpwDMPEwzK1J6CiytdUyZ77zS2N/lXvo/Oq2VPozt9QN5g X/zfxBB/BQ75lXq0S0Hy6uEf7jhNmNXg2iDVHv0UkOl9/oNvyJVCWSs8vKAFGl+73m+W 4qJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703031553; x=1703636353; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=meLKqm86U76iMcMmqxuxzpMVgH/WS4qTltle+XEqnQE=; b=J5IIebDkjMOc9rW9/C1swaH640XTA084xWXZvo2wsA0ouMstA2dzZcHF1GMACPVVgv y30Qz32jIAl2niPN4kdB3r1FfFmxTh+A2ggX1Jq+Z6HBQeD0uE/PJdpJZVCw0tm+IlHc UqUV7K3FOF7K+mV+2hpY5b5E+8KbuXvrQvtSTEJ3LCp6v6ChHxqCcPrALTRRLpivkBAb WLbfiwoQ7CDM7G7tP8/pboi4rMv7epTLRTNi5Qlnc7QY+wPjaC88WzUsGQHdPwgk/Mvm slQ6qsr2P81KkP3QpNA9f2tOTvI5M50INieZhqn2Gg5z3GKzeeUBdUdrphj3E2JBnYfu bK4A== X-Gm-Message-State: AOJu0YyTjc5PUzK0yIxlhp1ZicD4kpbgNCOQMlvWY3mzNnq5LhmzsA0D 2BuO5sHuVT/QmpySfdwbNsA= X-Received: by 2002:ad4:594d:0:b0:67f:494b:c1f8 with SMTP id eo13-20020ad4594d000000b0067f494bc1f8mr4440459qvb.32.1703031553244; Tue, 19 Dec 2023 16:19:13 -0800 (PST) Received: from localhost.localdomain ([174.95.13.129]) by smtp.gmail.com with ESMTPSA id da14-20020a05621408ce00b0067a276fd8d5sm3814094qvb.54.2023.12.19.16.19.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 16:19:12 -0800 (PST) From: Abdel Alkuor To: Jean Delvare , Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jonathan Corbet Cc: Abdel Alkuor , linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Subject: [PATCH v3 1/2] dt-bindings: hwmon: (lm75) Add AMS AS6200 temperature sensor Date: Tue, 19 Dec 2023 19:17:47 -0500 Message-Id: X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785594121241507414 X-GMAIL-MSGID: 1785758139807404014 as6200 is a temperature sensor with a range between -40°C to 125°C degrees and an accuracy of ±0.4°C degree between 0 and 65°C and ±1°C for the other ranges. Signed-off-by: Abdel Alkuor Reviewed-by: Krzysztof Kozlowski --- Changes in v3: - Enable interrupt property conditionally based on the chips that support it. - Fix alignment for the added example Changes in v2: - Incorporate as6200 into lm75 bindings .../devicetree/bindings/hwmon/lm75.yaml | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/Documentation/devicetree/bindings/hwmon/lm75.yaml b/Documentation/devicetree/bindings/hwmon/lm75.yaml index 0b69897f0c63..c5b2ec0b2c84 100644 --- a/Documentation/devicetree/bindings/hwmon/lm75.yaml +++ b/Documentation/devicetree/bindings/hwmon/lm75.yaml @@ -14,6 +14,7 @@ properties: compatible: enum: - adi,adt75 + - ams,as6200 - atmel,at30ts74 - dallas,ds1775 - dallas,ds75 @@ -48,10 +49,24 @@ properties: vs-supply: description: phandle to the regulator that provides the +VS supply + interrupts: + maxItems: 1 + required: - compatible - reg +allOf: + - if: + not: + properties: + compatible: + contains: + const: ams,as6200 + then: + properties: + interrupts: false + additionalProperties: false examples: @@ -66,3 +81,17 @@ examples: vs-supply = <&vs>; }; }; + - | + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + + temperature-sensor@48 { + compatible = "ams,as6200"; + reg = <0x48>; + vs-supply = <&vs>; + interrupt-parent = <&gpio1>; + interrupts = <17 IRQ_TYPE_EDGE_BOTH>; + }; + };