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:dac:adi,ad5758 yaml conversion

I have put Michael as maintainer on this one. Happy to change it to
someone else though.

One issue in here, is I cannot have an example with a negative
limit on the range. There are very few such yaml bindings in existence
but the thermal-zones.yaml has the same problem. If there is
any means of fixing this let me know. For now I'm sticking to
positive range values in the example.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Cc: Michael Hennerich <Michael.Hennerich@analog.com>
Link: https://lore.kernel.org/r/20201031134110.724233-24-jic23@kernel.org

+129 -83
-83
Documentation/devicetree/bindings/iio/dac/ad5758.txt
··· 1 - Analog Devices AD5758 DAC device driver 2 - 3 - Required properties for the AD5758: 4 - - compatible: Must be "adi,ad5758" 5 - - reg: SPI chip select number for the device 6 - - spi-max-frequency: Max SPI frequency to use (< 50000000) 7 - - spi-cpha: is the only mode that is supported 8 - 9 - Required properties: 10 - 11 - - adi,dc-dc-mode: Mode of operation of the dc-to-dc converter 12 - Dynamic Power Control (DPC) 13 - In this mode, the AD5758 circuitry senses the output 14 - voltage and dynamically regulates the supply voltage, 15 - VDPC+, to meet compliance requirements plus an optimized 16 - headroom voltage for the output buffer. 17 - 18 - Programmable Power Control (PPC) 19 - In this mode, the VDPC+ voltage is user-programmable to 20 - a fixed level that needs to accommodate the maximum output 21 - load required. 22 - 23 - The output of the DAC core is either converted to a 24 - current or voltage output at the VIOUT pin. Only one mode 25 - can be enabled at any one time. 26 - 27 - The following values are currently supported: 28 - * 1: DPC current mode 29 - * 2: DPC voltage mode 30 - * 3: PPC current mode 31 - 32 - Depending on the selected output mode (voltage or current) one of the 33 - two properties must 34 - be present: 35 - 36 - - adi,range-microvolt: Voltage output range 37 - The array of voltage output ranges must contain two fields: 38 - * <0 5000000>: 0 V to 5 V voltage range 39 - * <0 10000000>: 0 V to 10 V voltage range 40 - * <(-5000000) 5000000>: ±5 V voltage range 41 - * <(-10000000) 10000000>: ±10 V voltage range 42 - - adi,range-microamp: Current output range 43 - The array of current output ranges must contain two fields: 44 - * <0 20000>: 0 mA to 20 mA current range 45 - * <0 24000>: 0 mA to 24 mA current range 46 - * <4 24000>: 4 mA to 20 mA current range 47 - * <(-20000) 20000>: ±20 mA current range 48 - * <(-24000) 24000>: ±24 mA current range 49 - * <(-1000) 22000>: −1 mA to +22 mA current range 50 - 51 - Optional properties: 52 - 53 - - reset-gpios : GPIO spec for the RESET pin. If specified, it will be 54 - asserted during driver probe. 55 - 56 - - adi,dc-dc-ilim-microamp: The dc-to-dc converter current limit 57 - The following values are currently supported [uA]: 58 - * 150000 59 - * 200000 60 - * 250000 61 - * 300000 62 - * 350000 63 - * 400000 64 - 65 - - adi,slew-time-us: The time it takes for the output to reach the 66 - full scale [uS] 67 - The supported range is between 133us up to 1023984375us 68 - 69 - AD5758 Example: 70 - 71 - dac@0 { 72 - compatible = "adi,ad5758"; 73 - reg = <0>; 74 - spi-max-frequency = <1000000>; 75 - spi-cpha; 76 - 77 - reset-gpios = <&gpio 22 0>; 78 - 79 - adi,dc-dc-mode = <2>; 80 - adi,range-microvolt = <0 10000000>; 81 - adi,dc-dc-ilim-microamp = <200000>; 82 - adi,slew-time-us = <125000>; 83 - };
+129
Documentation/devicetree/bindings/iio/dac/adi,ad5758.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/iio/dac/adi,ad5758.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Analog Devices AD5758 DAC 8 + 9 + maintainers: 10 + - Michael Hennerich <Michael.Hennerich@analog.com> 11 + 12 + properties: 13 + compatible: 14 + const: adi,ad5758 15 + 16 + reg: 17 + maxItems: 1 18 + 19 + spi-max-frequency: true 20 + spi-cpha: true 21 + 22 + adi,dc-dc-mode: 23 + $ref: /schemas/types.yaml#/definitions/uint32 24 + enum: [1, 2, 3] 25 + description: | 26 + Mode of operation of the dc-to-dc converter 27 + Dynamic Power Control (DPC) 28 + In this mode, the AD5758 circuitry senses the output voltage and 29 + dynamically regulates the supply voltage, VDPC+, to meet compliance 30 + requirements plus an optimized headroom voltage for the output buffer. 31 + 32 + Programmable Power Control (PPC) 33 + In this mode, the VDPC+ voltage is user-programmable to a fixed level 34 + that needs to accommodate the maximum output load required. 35 + 36 + The output of the DAC core is either converted to a current or 37 + voltage output at the VIOUT pin. Only one mode can be enabled at 38 + any one time. 39 + 40 + The following values are currently supported: 41 + * 1: DPC current mode 42 + * 2: DPC voltage mode 43 + * 3: PPC current mode 44 + 45 + Depending on the selected output mode (voltage or current) one of the 46 + two properties must be present: 47 + 48 + adi,range-microvolt: 49 + $ref: /schemas/types.yaml#/definitions/int32-array 50 + description: | 51 + Voltage output range specified as <minimum, maximum> 52 + enum: 53 + - [[0, 5000000]] 54 + - [[0, 10000000]] 55 + - [[-5000000, 5000000]] 56 + - [[-10000000, 10000000]] 57 + 58 + adi,range-microamp: 59 + $ref: /schemas/types.yaml#/definitions/int32-array 60 + description: | 61 + Current output range specified as <minimum, maximum> 62 + enum: 63 + - [[0, 20000]] 64 + - [[0, 24000]] 65 + - [[4, 24000]] 66 + - [[-20000, 20000]] 67 + - [[-24000, 24000]] 68 + - [[-1000, 22000]] 69 + 70 + reset-gpios: true 71 + 72 + adi,dc-dc-ilim-microamp: 73 + $ref: /schemas/types.yaml#/definitions/uint32 74 + enum: [150000, 200000, 250000, 300000, 350000, 400000] 75 + description: | 76 + The dc-to-dc converter current limit. 77 + 78 + adi,slew-time-us: 79 + description: | 80 + The time it takes for the output to reach the full scale [uS] 81 + minimum: 133 82 + maximum: 1023984375 83 + 84 + required: 85 + - compatible 86 + - reg 87 + - spi-cpha 88 + - adi,dc-dc-mode 89 + 90 + allOf: 91 + - if: 92 + properties: 93 + adi,dc-dc-mode: 94 + contains: 95 + enum: [1, 3] 96 + then: 97 + properties: 98 + adi,range-microvolt: false 99 + required: 100 + - adi,range-microamp 101 + else: 102 + properties: 103 + adi,range-microamp: false 104 + required: 105 + - adi,range-microvolt 106 + 107 + additionalProperties: false 108 + 109 + examples: 110 + - | 111 + spi { 112 + #address-cells = <1>; 113 + #size-cells = <0>; 114 + 115 + dac@0 { 116 + compatible = "adi,ad5758"; 117 + reg = <0>; 118 + spi-max-frequency = <1000000>; 119 + spi-cpha; 120 + 121 + reset-gpios = <&gpio 22 0>; 122 + 123 + adi,dc-dc-mode = <2>; 124 + adi,range-microvolt = <0 10000000>; 125 + adi,dc-dc-ilim-microamp = <200000>; 126 + adi,slew-time-us = <125000>; 127 + }; 128 + }; 129 + ...