From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D0EA0C6FA8E for ; Sun, 5 Mar 2023 21:36:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229593AbjCEVg2 (ORCPT ); Sun, 5 Mar 2023 16:36:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229877AbjCEVg1 (ORCPT ); Sun, 5 Mar 2023 16:36:27 -0500 Received: from mail-108-mta102.mxroute.com (mail-108-mta102.mxroute.com [136.175.108.102]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B412015574 for ; Sun, 5 Mar 2023 13:36:22 -0800 (PST) Received: from mail-111-mta2.mxroute.com ([136.175.111.2] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta102.mxroute.com (ZoneMTA) with ESMTPSA id 186b3b440b2000edb4.004 for (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256); Sun, 05 Mar 2023 21:36:20 +0000 X-Zone-Loop: 8d1aff06fae8e02b4adfbaa5fa8994b69f219117020b X-Originating-IP: [136.175.111.2] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ahepp.dev; s=x; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=33GD5JbgTVCqoWHLkDetkZEdO4Ji3wLzHGryDA5w4go=; b=Ei3DfNMYfIMBhSjNiqy/Xf6LOX xPUUqD1YBZnOuAqIynS2xkjoLdhuRopIGBz9nFV6ZVJ1aFWDsp1n4PXbp1fUgoyVvZi9cnt9xE4ko h8DoV4Mda6964A9C4X/D9mTs+b5haMiUHJ3n+12Qw6qR8+o2i8fBk7vcK5tPDfFrzNoc9OtAgEtSK nXlUbNtEAbclbrVKrDKufcWsVwr1sxi0fhE5Ub9HXw4mEFHAJZg+Xe8X4hTk1P+QbhW+qk/R6SrO5 4wb78LwMvdUm70sYoSh8GsFC5Sh5oemJ20uL8j6MnAyJ7PfmPt0Dpmcao66eJebyr9O5Gly2IEj9k HKGjD03g==; From: Andrew Hepp To: devicetree@vger.kernel.org, linux-iio@vger.kernel.org Cc: Rob Herring , Krzysztof Kozlowski , Jonathan Cameron , Andrew Hepp Subject: [PATCH v5 1/2] dt-bindings: iio: Add MCP9600 thermocouple EMF converter Date: Sun, 5 Mar 2023 13:36:03 -0800 Message-Id: <20230305213604.4747-2-andrew.hepp@ahepp.dev> In-Reply-To: <20230305213604.4747-1-andrew.hepp@ahepp.dev> References: <20230305213604.4747-1-andrew.hepp@ahepp.dev> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Authenticated-Id: andrew.hepp@ahepp.dev Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add support for the MCP9600 thermocouple EMF converter. Datasheet: https://ww1.microchip.com/downloads/en/DeviceDoc/MCP960X-Data-Sheet-20005426.pdf Signed-off-by: Andrew Hepp --- Changes for v5: - remove "bindings" from subject - change unevaluatedProperties to additionalProperties Changes for v4: - use descriptive names for open/short circuit interrupts - remove vdd regulator description - remove unused import - use generic sensor name in example - don't use literal style for doc description Changes for v3: - Added dt-bindings --- .../iio/temperature/microchip,mcp9600.yaml | 70 +++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/temperature/microchip,mcp9600.yaml diff --git a/Documentation/devicetree/bindings/iio/temperature/microchip,mcp9600.yaml b/Documentation/devicetree/bindings/iio/temperature/microchip,mcp9600.yaml new file mode 100644 index 000000000000..d2cafa38a544 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/temperature/microchip,mcp9600.yaml @@ -0,0 +1,70 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/temperature/microchip,mcp9600.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Microchip MCP9600 thermocouple EMF converter + +maintainers: + - Andrew Hepp + +description: + https://ww1.microchip.com/downloads/en/DeviceDoc/MCP960X-Data-Sheet-20005426.pdf + +properties: + compatible: + const: microchip,mcp9600 + + reg: + maxItems: 1 + + interrupts: + minItems: 1 + maxItems: 6 + + interrupt-names: + minItems: 1 + maxItems: 6 + items: + enum: + - open-circuit + - short-circuit + - alert1 + - alert2 + - alert3 + - alert4 + + thermocouple-type: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Type of thermocouple (THERMOCOUPLE_TYPE_K if omitted). + Use defines in dt-bindings/iio/temperature/thermocouple.h. + Supported types are B, E, J, K, N, R, S, T. + + vdd-supply: true + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + #include + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + + temperature-sensor@60 { + compatible = "microchip,mcp9600"; + reg = <0x60>; + interrupt-parent = <&gpio>; + interrupts = <25 IRQ_TYPE_EDGE_RISING>; + interrupt-names = "open-circuit"; + thermocouple-type = ; + vdd-supply = <&vdd>; + }; + }; -- 2.30.2