From patchwork Sat Dec 23 16:21:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Abdel Alkuor X-Patchwork-Id: 182987 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp1757141dyi; Sat, 23 Dec 2023 08:23:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IFva8WyEyQPnIXDnKVG8l4xspxKHiJrnNLZZJZO2SJgWPtFZKEiCqQdExZFzzyeVHaJIYBv X-Received: by 2002:a17:907:a190:b0:a23:587b:2f0e with SMTP id om16-20020a170907a19000b00a23587b2f0emr1200546ejc.49.1703348618651; Sat, 23 Dec 2023 08:23:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703348618; cv=none; d=google.com; s=arc-20160816; b=ewYXg9F6biTgWrM7N/ZuuGuee/aSqKYKGgGsPm8Ui2fc5wdsFzCgDzHjXd6F7w1xHx R50S90557JrMMEwDUwJMfMcJkVE9ut1xAv7zW1mYdNHGQ5by5lUAzYx+TTkxFxrYLebg NJahDYOPYQpVvOpT234JgJTreBNBXWGpHnBYnK7NC5lA/J9sWlqBd0oLuAObiW2HxymH wg4Xo/smQrRQ3hFXGOXBEtBnXd4grkknx+bRP1vLYEEtUlpKxNLWlgNyL8N2GRjeaAJc bYWL4Zk67hKmAEYTRVaX+rUkpjCBrQxzLMUWgq9pDiZva9fj234ambV+3QJ4SUU9v9Xt bELw== 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=gN1C0/FECgYaWd9/ml0UCwKbnXOAYhuskYf//YVVLoA=; fh=9o+JoOK9fX3PtYbRvZH3DuHAPcrjBZ/qjPiZjpXXXoI=; b=I76HDK+s2mNgnXsgqQU8PCY/8Cu73eJYZRanpsOoZIEP0dTF6Dvbx9r+H7PrUFh5EL /lU/BOgsX6hM3ghq8bGDC/piCVgasGA0zWjSwcxldNVTRaTvL5Q0yR6zWcV014Eoy3YO UqJDIFbeSSIjyXe/y2FhjfEVpCnMQbliCO8NAD9UaN6ebdQzVKKZJbs3U2tsdg2mxNh0 bHkgK0PvxFMvYlTgSZIw5Fh6c8ntANtsFCxO7P7kdZj5eMXwtv1nu4se18m1eqAnNNC6 QA5fXsZf2jrYaSG///2HEo31B52mz6KQOYogLRgUJauQAHsDMIaXfvSZZorEyoHzUI3k eXyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=epbYbBYF; spf=pass (google.com: domain of linux-kernel+bounces-10497-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10497-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 k4-20020a170906578400b00a2346f2cf20si2770483ejq.623.2023.12.23.08.23.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Dec 2023 08:23:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-10497-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=epbYbBYF; spf=pass (google.com: domain of linux-kernel+bounces-10497-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10497-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 47AFA1F221B7 for ; Sat, 23 Dec 2023 16:23:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9256F11CB8; Sat, 23 Dec 2023 16:23:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="epbYbBYF" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-qv1-f44.google.com (mail-qv1-f44.google.com [209.85.219.44]) (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 8D9C412E47; Sat, 23 Dec 2023 16:23:18 +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-qv1-f44.google.com with SMTP id 6a1803df08f44-67f7da00237so15226236d6.2; Sat, 23 Dec 2023 08:23:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703348597; x=1703953397; 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=gN1C0/FECgYaWd9/ml0UCwKbnXOAYhuskYf//YVVLoA=; b=epbYbBYFD/6eyE/qP7zDAg1vODXOPpAtIaJLP5yXk1rPiq/t+pBQfponBtLOYjm42h 4wWfkmBmdH+/W1DZCnVSzkGLvdF/TGRJ6XriSt/0MzcjlaWepUFBCG7OCZiDV7mPuxc5 6ZQaLmWzDymKKaAgXo0ObgZwrf3eQsa4oAx1PMRZUN+0aXdOEObZCXq8pIua4IXt6iu1 FRmjaEIDGxYvK9KssRKjmTT7rBN4r86B8HFSuMGyN94wyBzHyydM6ftmNlZfRdM0rFSQ tdZ0gOzcs9kV3s9I5WL5TjthOhr/A4TtAgxt8R4cNxFxNzUBY+gHxSCOlBnFu56/H2Dk fP0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703348597; x=1703953397; 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=gN1C0/FECgYaWd9/ml0UCwKbnXOAYhuskYf//YVVLoA=; b=ViO+7rU361DVtGcA3Vz2zYcJIGk/ewswVj+Bxux7ym6DH2qusKdgRKNtr8cI9T7sO2 Hg1GUrnzru/gRs9/voxanzVGoCWzTf/sSO2pWN4XZiGgql/HveeVIjKa6UUCM4mHd6Pb ++eB6dA6bqKCkgCbgq33oZhET2cJ1khxMT9pm+BzsjBFPPpreI/MfUhQGdeWyCZ0+txT kcuUj3Vi+e0PluLBmWKcw/XWlAhLZ1mJ2UFx3+WENtv3CRW6MkGsH6oD23EDijsuJVRH a8+5+ElUalz+Uo9cZgw+qMQBVTbKCcZQ5f8Syct6J9V4GEVN+Eupek7zCJfN5ooy3RdV bJ3w== X-Gm-Message-State: AOJu0YzkO7Z67apQxEXdRp0fN8bcfOXjT3or8WHQclH9HPo9avVbSZ3/ P+m4kGK83Apaj7Ynak6y1zQ= X-Received: by 2002:ad4:5f8f:0:b0:67f:63a5:b3a6 with SMTP id jp15-20020ad45f8f000000b0067f63a5b3a6mr3702191qvb.131.1703348596902; Sat, 23 Dec 2023 08:23:16 -0800 (PST) Received: from localhost.localdomain ([174.95.13.129]) by smtp.gmail.com with ESMTPSA id pz11-20020ad4550b000000b0067f969a59c2sm1247116qvb.61.2023.12.23.08.23.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Dec 2023 08:23:16 -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 v4 1/2] dt-bindings: hwmon: (lm75) Add AMS AS6200 temperature sensor Date: Sat, 23 Dec 2023 11:21:58 -0500 Message-Id: <17ba2dfdb3d25bf1b5b4ed9f858b6e28902bedbe.1703127334.git.alkuor@gmail.com> 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: 1786090480801793103 X-GMAIL-MSGID: 1786090480801793103 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 v4: - Add chips that support interrupt 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 | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/Documentation/devicetree/bindings/hwmon/lm75.yaml b/Documentation/devicetree/bindings/hwmon/lm75.yaml index 0b69897f0c63..ed269e428a3d 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,28 @@ 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: + enum: + - ams,as6200 + - ti,tmp100 + - ti,tmp101 + - ti,tmp112 + then: + properties: + interrupts: false + additionalProperties: false examples: @@ -66,3 +85,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>; + }; + };