Commit a591525f authored by Eugen Hristev's avatar Eugen Hristev Committed by Jonathan Cameron

dt-bindings: iio: adc: at91-sama5d2_adc: add channel specific consumer info

Added defines for channel consumer device-tree binding
Signed-off-by: default avatarEugen Hristev <eugen.hristev@microchip.com>
Reviewed-by: default avatarRob Herring <robh@kernel.org>
Acked-by: default avatarLudovic Desroches <ludovic.desroches@microchip.com>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent aa132ffb
...@@ -21,6 +21,14 @@ Optional properties: ...@@ -21,6 +21,14 @@ Optional properties:
- dmas: Phandle to dma channel for the ADC. - dmas: Phandle to dma channel for the ADC.
- dma-names: Must be "rx" when dmas property is being used. - dma-names: Must be "rx" when dmas property is being used.
See ../../dma/dma.txt for details. See ../../dma/dma.txt for details.
- #io-channel-cells: in case consumer drivers are attached, this must be 1.
See <Documentation/devicetree/bindings/iio/iio-bindings.txt> for details.
Properties for consumer drivers:
- Consumer drivers can be connected to this producer device, as specified
in <Documentation/devicetree/bindings/iio/iio-bindings.txt>
- Channels exposed are specified in:
<dt-bindings/iio/adc/at91-sama5d2_adc.txt>
Example: Example:
...@@ -38,4 +46,5 @@ adc: adc@fc030000 { ...@@ -38,4 +46,5 @@ adc: adc@fc030000 {
atmel,trigger-edge-type = <IRQ_TYPE_EDGE_BOTH>; atmel,trigger-edge-type = <IRQ_TYPE_EDGE_BOTH>;
dmas = <&dma0 (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1) | AT91_XDMAC_DT_PERID(25))>; dmas = <&dma0 (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1) | AT91_XDMAC_DT_PERID(25))>;
dma-names = "rx"; dma-names = "rx";
#io-channel-cells = <1>;
} }
/* SPDX-License-Identifier: GPL-2.0 */
/*
* This header provides constants for configuring the AT91 SAMA5D2 ADC
*/
#ifndef _DT_BINDINGS_IIO_ADC_AT91_SAMA5D2_ADC_H
#define _DT_BINDINGS_IIO_ADC_AT91_SAMA5D2_ADC_H
/* X relative position channel index */
#define AT91_SAMA5D2_ADC_X_CHANNEL 24
/* Y relative position channel index */
#define AT91_SAMA5D2_ADC_Y_CHANNEL 25
/* pressure channel index */
#define AT91_SAMA5D2_ADC_P_CHANNEL 26
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment