From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ot1-f45.google.com (mail-ot1-f45.google.com [209.85.210.45]) (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 0BA7B15B971 for ; Sat, 23 Aug 2025 16:06:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755965196; cv=none; b=C50HFUNLlGg6wNthsOaSvinWYsX5quZsikMel3/xZ8YiTKRFmVTQzanFhKRAEUyIC9GWAkC/2j9HlfSolUyiGSt5s5xWEQAcfI4Bb7g1xjW4toewMLm00C4pKD59YZaqV5SQvNRVEdvctzSQy6xNYvYpZFLiRWEKFiJ5ymt+BpI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755965196; c=relaxed/simple; bh=ebM0IdDULzwaHyK8sfmNQvqNW9VpejYpzO1DUZFcvuI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=JvrwZSKdazXoj36JGpSkahSJgifIFuihOCtaYZF/++Vpz2IU47GuaR2XuP7MITWNP1RzhhhB5s8ryIqWeWjR99q2Av8w0L6hbJwlPzO49zJ7iifezwlhxnPbmhTwPe3pKksKhkK8aZVdq9RAFGZMFNefwlW9ZIvtBxWlJcX1Cx8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=Qdg2WYrS; arc=none smtp.client-ip=209.85.210.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="Qdg2WYrS" Received: by mail-ot1-f45.google.com with SMTP id 46e09a7af769-74381df387fso839180a34.0 for ; Sat, 23 Aug 2025 09:06:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1755965192; x=1756569992; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=MH429/Xzff4T9QzrkUeAzGoqfBH4kBxhtsjO5g2qhx8=; b=Qdg2WYrSvcAEdw0hDQAuQZV30EddACkeYqfLKZitb7mTJRYnc9T1iBBDwHzrf4V9d4 qRGlzbMp3q9BHRKftMJ0A4GuOst1LadbEZ4PrOqUNOEu+b98XaCZ4/Yjis3wBmZWobWg 53NoRi3thvda1TLPPcbJk7Lk9AqYPO1v6aAjwb7brohRZQZjO4NPEz0jE7ZGhB5sKIZc dKA2zZxVRjnzOWLQLxkPkdgGXYv+8cYM4F9NZLDooPoZ9BjopK+ZLXMYmbuEMmHCoHy2 NBfq2TLW0EvEWI5YblbrZGocwV7tSea5wtnbsVwofopR9zyvMuXvjPYWYifJTCmvtFSk j4eA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1755965192; x=1756569992; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=MH429/Xzff4T9QzrkUeAzGoqfBH4kBxhtsjO5g2qhx8=; b=FJPpZ+wU8laO/BhofgAKDo1wUzYkXANyG7F9SdmyNNRJXFzTk3BAOpAaf1NAbfDSDA ffBs0iB6bmErSTEdLabRNIh2mDZ7ymRMQjB+Vm798QyyPSqs9Lx3BGglErsZiQ4WpTfs wxsw4ODlEILDpzaY++FCpgCz98tROpTV99ptEFXEBebiup92sbP2fDHHtw4lYaAqRyfX TZVgDyUZEZq34KSi4J+T2OhW77IQL4su6IuSPUdJKLWv5LaI+QLQSRm+f7HveV8sFnyy +/HcUkiRGEgOyg+sFNknZplwDftoBwrcSi+6xqKxXb5v4X81xCYYXbSj/VMgThh+9P6D 7PmA== X-Forwarded-Encrypted: i=1; AJvYcCW8wY0ZX0Gc0ObywG69LXR2DUeZguQ0sQw/gsZERtiQWoUAxGHcRa11OI3JwB1FiMGk6O10LDTbonbm@vger.kernel.org X-Gm-Message-State: AOJu0YxKuVri6f2e0hoLXxmIh2RLvJaUXHkZwkp8VmwJxE3sOWcPVwQD e1ntHOTOujIJ30gwN5Rr8k4jk+S+qmH9/Om4ieaopNUwh3f9ARMqkxwQBM5PM05sYg8= X-Gm-Gg: ASbGncuHHUtPVnKEFwbFMn3zlvk8ZVRCVWIX3GfI6/fuIiJ9qTyPO8gTiSy1Tbeclr+ ficHvinbTKKiRc1QTFv7wqDxh87rQd2nvIX6OeOvo58Pr74yWsr4GBDGjQBdkd6n76DYuC+aFl1 YJCniINU3gizUmq0RUsUJfEvMAnhWQFuag64DQFbjz/lh2NeaQfiWjMkTtvofJ83amy7F3UelWe ZJS8Xe/XV/kITQf3y4Ukzwux5+WqjUumDfXcotv85921RffRe3NfLGVU4rhppCroHIglq8ofyKb 1l9FaZP71Ns5p488FsDjuqTdOlZUXolGJ0D7QOiCMq1QkvURHH8GB0W0jYH1mLVi4NXus2WvH+A 7RJ8Mq//80WMLIM+H7pOcrta99cd2oAGD6huJ0q8HCQVScBFRrtwXhBHU8dXGtmv7qfaNXB9Z X-Google-Smtp-Source: AGHT+IEyRUbE9O2Dou5JQoL703SRQU0rAXzxfBj2sNtV84omC7i2T9OV2vhzOcAE7/ImVyLQKsdiWA== X-Received: by 2002:a05:6830:2a16:b0:741:aa58:d500 with SMTP id 46e09a7af769-7450098d167mr3600537a34.3.1755965191927; Sat, 23 Aug 2025 09:06:31 -0700 (PDT) Received: from ?IPV6:2600:8803:e7e4:1d00:4d25:af10:67ec:53d? ([2600:8803:e7e4:1d00:4d25:af10:67ec:53d]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-61dc7470b02sm354328eaf.0.2025.08.23.09.06.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 23 Aug 2025 09:06:31 -0700 (PDT) Message-ID: Date: Sat, 23 Aug 2025 11:06:30 -0500 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v8 2/5] dt-bindings: iio: mcp9600: Add microchip,mcp9601 and add constraints To: Ben Collins , Jonathan Cameron , =?UTF-8?Q?Nuno_S=C3=A1?= , Andy Shevchenko , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andrew Hepp Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski References: <20250822-upstream-changes-v8-0-40bb1739e3e2@watter.com> <20250822-upstream-changes-v8-2-40bb1739e3e2@watter.com> Content-Language: en-US From: David Lechner In-Reply-To: <20250822-upstream-changes-v8-2-40bb1739e3e2@watter.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 8/22/25 8:23 AM, Ben Collins wrote: > Add microchip,mcp9601 compatible in addition to the original > microchip,mcp9600 to designate support between these two chips. > > The current dt-binding has open-circuit and short-circuit as interrupt > names, but these are only supported in mcp9601. > > The OC and SC detection requires that mcp9601 VSENSE be wired up, which > not only enables the OC SC interrupts, but also the OC and SC status > register bits. > > Add a microchip,vsense boolean to show the chip is wired for this > support. > > Add constraints so this feature only applies if the mcp9601 compatible > is selected. > > Signed-off-by: Ben Collins > Reviewed-by: Krzysztof Kozlowski > --- > .../iio/temperature/microchip,mcp9600.yaml | 56 ++++++++++++++++++++-- > 1 file changed, 53 insertions(+), 3 deletions(-) > > diff --git a/Documentation/devicetree/bindings/iio/temperature/microchip,mcp9600.yaml b/Documentation/devicetree/bindings/iio/temperature/microchip,mcp9600.yaml > index 57b387a1accc776683500949a22ef0290fc876e8..fb3661c805934255d35f664e1018ed2ec91d05f0 100644 > --- a/Documentation/devicetree/bindings/iio/temperature/microchip,mcp9600.yaml > +++ b/Documentation/devicetree/bindings/iio/temperature/microchip,mcp9600.yaml > @@ -4,7 +4,7 @@ > $id: http://devicetree.org/schemas/iio/temperature/microchip,mcp9600.yaml# > $schema: http://devicetree.org/meta-schemas/core.yaml# > > -title: Microchip MCP9600 thermocouple EMF converter > +title: Microchip MCP9600 and similar thermocouple EMF converters > > maintainers: > - Andrew Hepp > @@ -14,7 +14,11 @@ description: > > properties: > compatible: > - const: microchip,mcp9600 > + oneOf: > + - const: microchip,mcp9600 > + - items: > + - const: microchip,mcp9601 > + - const: microchip,mcp9600 > > reg: > maxItems: 1 > @@ -43,8 +47,37 @@ properties: > Use defines in dt-bindings/iio/temperature/thermocouple.h. > Supported types are B, E, J, K, N, R, S, T. > > + microchip,vsense: > + type: boolean > + description: > + This flag indicates that the chip has been wired with VSENSE to > + enable open and short circuit detect. > + > vdd-supply: true > > +allOf: > + - if: > + properties: > + compatible: > + not: > + contains: > + const: microchip,mcp9601 > + then: > + properties: > + interrupts: > + minItems: 1 > + maxItems: 4 > + interrupt-names: > + minItems: 1 > + maxItems: 4 > + items: > + enum: > + - alert1 > + - alert2 > + - alert3 > + - alert4 > + microchip,vsense: false > + > required: > - compatible > - reg > @@ -64,8 +97,25 @@ examples: > reg = <0x60>; > interrupt-parent = <&gpio>; > interrupts = <25 IRQ_TYPE_EDGE_RISING>; > - interrupt-names = "open-circuit"; > + interrupt-names = "alert1"; > thermocouple-type = ; > vdd-supply = <&vdd>; > }; > }; > + - | > + #include This header isn't used in this example. > + #include > + i2c { > + #address-cells = <1>; > + #size-cells = <0>; > + > + temperature-sensor@62 { > + compatible = "microchip,mcp9601", "microchip,mcp9600"; > + reg = <0x62>; > + interrupt-parent = <&gpio>; > + interrupts = <22 IRQ_TYPE_EDGE_RISING>, <23 IRQ_TYPE_EDGE_RISING>; > + interrupt-names = "open-circuit", "short-circuit"; > + vdd-supply = <&vdd>; > + microchip,vsense; > + }; > + }; > With that fixed: Reviewed-by: David Lechner