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

dt-bindings: iio: adc: ad7476: Add ROHM bd79105

The ROHM BD79105 is a simple, 16-bit, 1-channel ADC with a 'CONVSTART'
pin used to start the ADC conversion. Other than the 'CONVSTART', there
are 3 supply pins (one used as a reference), analog inputs, ground and
communication pins. It's worth noting that the pin somewhat confusingly
labeled as 'DIN', is a pin which should be used as a chip-select. The IC
does not have any writable registers.

The device is designed so that the output pin can, in addition to
outputting the data, be used as a 'data-ready'-IRQ. There are cases
where the IRQ can't be used (because it is delivered via SPI data-line).
Hence, some systems may use a GPIO for polling the data readiness.

Add a compatible for the bd79105 and add the data-ready GPIO to the
binding.

Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/3f70f68665225be3091f8a0412e74037b6a2a88e.1754901948.git.mazziesaccount@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Matti Vaittinen and committed by
Jonathan Cameron
261b9076 260bb98c

+52
+52
Documentation/devicetree/bindings/iio/adc/adi,ad7476.yaml
··· 41 41 - adi,ad7910 42 42 - adi,ad7920 43 43 - adi,ad7940 44 + - rohm,bd79105 44 45 - ti,adc081s 45 46 - ti,adc101s 46 47 - ti,adc121s ··· 54 53 - const: ti,ads7866 55 54 56 55 reg: 56 + maxItems: 1 57 + 58 + interrupts: 59 + description: 60 + The data-ready interrupt. Provided via DOUT pin. 57 61 maxItems: 1 58 62 59 63 vcc-supply: ··· 81 75 description: A GPIO used to trigger the start of a conversion 82 76 maxItems: 1 83 77 78 + rdy-gpios: 79 + description: A GPIO for detecting the data-ready. 80 + maxItems: 1 81 + 84 82 required: 85 83 - compatible 86 84 - reg 87 85 88 86 allOf: 89 87 - $ref: /schemas/spi/spi-peripheral-props.yaml# 88 + 89 + # Devices with an IRQ 90 + - if: 91 + properties: 92 + compatible: 93 + contains: 94 + enum: 95 + - rohm,bd79105 96 + then: 97 + properties: 98 + interrupts: true 99 + else: 100 + properties: 101 + interrupts: false 90 102 91 103 # Devices where reference is vcc 92 104 - if: ··· 140 116 - adi,ad7274 141 117 - adi,ad7475 142 118 - lltc,ltc2314-14 119 + - rohm,bd79105 143 120 then: 144 121 properties: 145 122 vref-supply: false ··· 154 129 - adi,ad7274 155 130 - adi,ad7475 156 131 - lltc,ltc2314-14 132 + - rohm,bd79105 157 133 then: 158 134 required: 159 135 - vref-supply ··· 166 140 enum: 167 141 - adi,ad7475 168 142 - adi,ad7495 143 + - rohm,bd79105 169 144 then: 170 145 properties: 171 146 vdrive-supply: false 147 + 148 + # Devices which support polling the data-ready via GPIO 149 + - if: 150 + not: 151 + properties: 152 + compatible: 153 + contains: 154 + enum: 155 + - rohm,bd79105 156 + then: 157 + properties: 158 + rdy-gpios: false 159 + 172 160 - if: 173 161 not: 174 162 properties: ··· 191 151 enum: 192 152 - adi,ad7091 193 153 - adi,ad7091r 154 + - rohm,bd79105 194 155 then: 195 156 properties: 196 157 adi,conversion-start-gpios: false 158 + 159 + # Devices with a convstart GPIO where it is not optional 160 + - if: 161 + properties: 162 + compatible: 163 + contains: 164 + enum: 165 + - rohm,bd79105 166 + then: 167 + required: 168 + - adi,conversion-start-gpios 197 169 198 170 unevaluatedProperties: false 199 171