Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dt-bindings: iio: mcp9600: Add microchip,mcp9601 and add constraints

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 <bcollins@watter.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20250822-upstream-changes-v8-2-40bb1739e3e2@watter.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Ben Collins and committed by
Jonathan Cameron
f6a52403 d6d38964

+52 -3
+52 -3
Documentation/devicetree/bindings/iio/temperature/microchip,mcp9600.yaml
··· 4 4 $id: http://devicetree.org/schemas/iio/temperature/microchip,mcp9600.yaml# 5 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 6 6 7 - title: Microchip MCP9600 thermocouple EMF converter 7 + title: Microchip MCP9600 and similar thermocouple EMF converters 8 8 9 9 maintainers: 10 10 - Andrew Hepp <andrew.hepp@ahepp.dev> ··· 14 14 15 15 properties: 16 16 compatible: 17 - const: microchip,mcp9600 17 + oneOf: 18 + - const: microchip,mcp9600 19 + - items: 20 + - const: microchip,mcp9601 21 + - const: microchip,mcp9600 18 22 19 23 reg: 20 24 maxItems: 1 ··· 47 43 Use defines in dt-bindings/iio/temperature/thermocouple.h. 48 44 Supported types are B, E, J, K, N, R, S, T. 49 45 46 + microchip,vsense: 47 + type: boolean 48 + description: 49 + This flag indicates that the chip has been wired with VSENSE to 50 + enable open and short circuit detect. 51 + 50 52 vdd-supply: true 53 + 54 + allOf: 55 + - if: 56 + properties: 57 + compatible: 58 + not: 59 + contains: 60 + const: microchip,mcp9601 61 + then: 62 + properties: 63 + interrupts: 64 + minItems: 1 65 + maxItems: 4 66 + interrupt-names: 67 + minItems: 1 68 + maxItems: 4 69 + items: 70 + enum: 71 + - alert1 72 + - alert2 73 + - alert3 74 + - alert4 75 + microchip,vsense: false 51 76 52 77 required: 53 78 - compatible ··· 97 64 reg = <0x60>; 98 65 interrupt-parent = <&gpio>; 99 66 interrupts = <25 IRQ_TYPE_EDGE_RISING>; 100 - interrupt-names = "open-circuit"; 67 + interrupt-names = "alert1"; 101 68 thermocouple-type = <THERMOCOUPLE_TYPE_K>; 102 69 vdd-supply = <&vdd>; 70 + }; 71 + }; 72 + - | 73 + #include <dt-bindings/interrupt-controller/irq.h> 74 + i2c { 75 + #address-cells = <1>; 76 + #size-cells = <0>; 77 + 78 + temperature-sensor@62 { 79 + compatible = "microchip,mcp9601", "microchip,mcp9600"; 80 + reg = <0x62>; 81 + interrupt-parent = <&gpio>; 82 + interrupts = <22 IRQ_TYPE_EDGE_RISING>, <23 IRQ_TYPE_EDGE_RISING>; 83 + interrupt-names = "open-circuit", "short-circuit"; 84 + vdd-supply = <&vdd>; 85 + microchip,vsense; 103 86 }; 104 87 };