Skip to content
Snippets Groups Projects
Commit 32ada6b0 authored by Rob Herring's avatar Rob Herring
Browse files

dt-bindings: Cleanup standard unit properties


Properties with standard unit suffixes already have a type and don't need
type definitions. They also default to a single entry, so 'maxItems: 1'
can be dropped.

adi,ad5758 is an oddball which defined an enum of arrays. While a valid
schema, it is simpler as a whole to only define scalar constraints.

Cc: Jean Delvare <jdelvare@suse.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Ulf Hansson <ulf.hansson@linaro.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Serge Semin <fancer.lancer@gmail.com>
Cc: linux-hwmon@vger.kernel.org
Cc: linux-i2c@vger.kernel.org
Cc: linux-iio@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-input@vger.kernel.org
Cc: linux-mmc@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: linux-pm@vger.kernel.org
Cc: linux-rtc@vger.kernel.org
Cc: linux-serial@vger.kernel.org
Cc: alsa-devel@alsa-project.org
Cc: linux-watchdog@vger.kernel.org
Signed-off-by: default avatarRob Herring <robh@kernel.org>
Acked-by: default avatarGuenter Roeck <linux@roeck-us.net>
Acked-by: default avatarMark Brown <broonie@kernel.org>
Acked-by: Wolfram Sang <wsa@kernel.org> # for I2C
Acked-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
Acked-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Sebastian Reichel <sre@kernel.org> # for power-supply
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> #for-iio
Acked-by: default avatarAlexandre TORGUE <alexandre.torgue@foss.st.com>
Link: https://lore.kernel.org/r/20210128194515.743252-1-robh@kernel.org
parent 89c7cb16
Branches
Tags
No related merge requests found
Showing
with 29 additions and 47 deletions
...@@ -232,7 +232,6 @@ properties: ...@@ -232,7 +232,6 @@ properties:
by this cpu (see ./idle-states.yaml). by this cpu (see ./idle-states.yaml).
capacity-dmips-mhz: capacity-dmips-mhz:
$ref: '/schemas/types.yaml#/definitions/uint32'
description: description:
u32 value representing CPU capacity (see ./cpu-capacity.txt) in u32 value representing CPU capacity (see ./cpu-capacity.txt) in
DMIPS/MHz, relative to highest capacity-dmips-mhz DMIPS/MHz, relative to highest capacity-dmips-mhz
......
...@@ -85,7 +85,6 @@ properties: ...@@ -85,7 +85,6 @@ properties:
wlf,micd-timeout-ms: wlf,micd-timeout-ms:
description: description:
Timeout for microphone detection, specified in milliseconds. Timeout for microphone detection, specified in milliseconds.
$ref: "/schemas/types.yaml#/definitions/uint32"
wlf,micd-force-micbias: wlf,micd-force-micbias:
description: description:
......
...@@ -49,7 +49,6 @@ properties: ...@@ -49,7 +49,6 @@ properties:
description: description:
This property controls the Accumulation Dead band which allows to set the This property controls the Accumulation Dead band which allows to set the
level of current below which no accumulation takes place. level of current below which no accumulation takes place.
$ref: /schemas/types.yaml#/definitions/uint32
maximum: 255 maximum: 255
default: 0 default: 0
......
...@@ -73,8 +73,6 @@ properties: ...@@ -73,8 +73,6 @@ properties:
description: | description: |
Temperature sensor trimming factor. It can be used to manually adjust the Temperature sensor trimming factor. It can be used to manually adjust the
temperature measurements within 7.130 degrees Celsius. temperature measurements within 7.130 degrees Celsius.
maxItems: 1
items:
default: 0 default: 0
minimum: 0 minimum: 0
maximum: 7130 maximum: 7130
......
...@@ -52,7 +52,6 @@ properties: ...@@ -52,7 +52,6 @@ properties:
ti,bus-range-microvolt: ti,bus-range-microvolt:
description: | description: |
This is the operating range of the bus voltage in microvolt This is the operating range of the bus voltage in microvolt
$ref: /schemas/types.yaml#/definitions/uint32
enum: [16000000, 32000000] enum: [16000000, 32000000]
default: 32000000 default: 32000000
......
...@@ -39,11 +39,9 @@ properties: ...@@ -39,11 +39,9 @@ properties:
i2c-gpio,delay-us: i2c-gpio,delay-us:
description: delay between GPIO operations (may depend on each platform) description: delay between GPIO operations (may depend on each platform)
$ref: /schemas/types.yaml#/definitions/uint32
i2c-gpio,timeout-ms: i2c-gpio,timeout-ms:
description: timeout to get data description: timeout to get data
$ref: /schemas/types.yaml#/definitions/uint32
# Deprecated properties, do not use in new device tree sources: # Deprecated properties, do not use in new device tree sources:
gpios: gpios:
......
...@@ -66,21 +66,18 @@ properties: ...@@ -66,21 +66,18 @@ properties:
default: 400000 default: 400000
i2c-sda-hold-time-ns: i2c-sda-hold-time-ns:
maxItems: 1
description: | description: |
The property should contain the SDA hold time in nanoseconds. This option The property should contain the SDA hold time in nanoseconds. This option
is only supported in hardware blocks version 1.11a or newer or on is only supported in hardware blocks version 1.11a or newer or on
Microsemi SoCs. Microsemi SoCs.
i2c-scl-falling-time-ns: i2c-scl-falling-time-ns:
maxItems: 1
description: | description: |
The property should contain the SCL falling time in nanoseconds. The property should contain the SCL falling time in nanoseconds.
This value is used to compute the tLOW period. This value is used to compute the tLOW period.
default: 300 default: 300
i2c-sda-falling-time-ns: i2c-sda-falling-time-ns:
maxItems: 1
description: | description: |
The property should contain the SDA falling time in nanoseconds. The property should contain the SDA falling time in nanoseconds.
This value is used to compute the tHIGH period. This value is used to compute the tHIGH period.
......
...@@ -23,7 +23,6 @@ properties: ...@@ -23,7 +23,6 @@ properties:
maxItems: 1 maxItems: 1
shunt-resistor-micro-ohms: shunt-resistor-micro-ohms:
$ref: /schemas/types.yaml#/definitions/uint32
description: | description: |
Value in micro Ohms of the shunt resistor connected between the RS+ and Value in micro Ohms of the shunt resistor connected between the RS+ and
RS- inputs, across which the current is measured. Value needed to compute RS- inputs, across which the current is measured. Value needed to compute
......
...@@ -246,7 +246,6 @@ patternProperties: ...@@ -246,7 +246,6 @@ patternProperties:
Resolution (bits) to use for conversions: Resolution (bits) to use for conversions:
- can be 6, 8, 10 or 12 on stm32f4 - can be 6, 8, 10 or 12 on stm32f4
- can be 8, 10, 12, 14 or 16 on stm32h7 and stm32mp1 - can be 8, 10, 12, 14 or 16 on stm32h7 and stm32mp1
$ref: /schemas/types.yaml#/definitions/uint32
st,adc-channels: st,adc-channels:
description: | description: |
......
...@@ -42,7 +42,6 @@ properties: ...@@ -42,7 +42,6 @@ properties:
const: 1 const: 1
ti,channel0-current-microamp: ti,channel0-current-microamp:
$ref: /schemas/types.yaml#/definitions/uint32
description: Channel 0 current in uA. description: Channel 0 current in uA.
enum: enum:
- 0 - 0
...@@ -51,7 +50,6 @@ properties: ...@@ -51,7 +50,6 @@ properties:
- 20 - 20
ti,channel3-current-microamp: ti,channel3-current-microamp:
$ref: /schemas/types.yaml#/definitions/uint32
description: Channel 3 current in uA. description: Channel 3 current in uA.
enum: enum:
- 0 - 0
......
...@@ -46,31 +46,42 @@ properties: ...@@ -46,31 +46,42 @@ properties:
two properties must be present: two properties must be present:
adi,range-microvolt: adi,range-microvolt:
$ref: /schemas/types.yaml#/definitions/int32-array
description: | description: |
Voltage output range specified as <minimum, maximum> Voltage output range specified as <minimum, maximum>
enum: oneOf:
- [[0, 5000000]] - items:
- [[0, 10000000]] - const: 0
- [[-5000000, 5000000]] - enum: [5000000, 10000000]
- [[-10000000, 10000000]] - items:
- const: -5000000
- const: 5000000
- items:
- const: -10000000
- const: 10000000
adi,range-microamp: adi,range-microamp:
$ref: /schemas/types.yaml#/definitions/int32-array
description: | description: |
Current output range specified as <minimum, maximum> Current output range specified as <minimum, maximum>
enum: oneOf:
- [[0, 20000]] - items:
- [[0, 24000]] - const: 0
- [[4, 24000]] - enum: [20000, 24000]
- [[-20000, 20000]] - items:
- [[-24000, 24000]] - const: 4
- [[-1000, 22000]] - const: 24000
- items:
- const: -20000
- const: 20000
- items:
- const: -24000
- const: 24000
- items:
- const: -1000
- const: 22000
reset-gpios: true reset-gpios: true
adi,dc-dc-ilim-microamp: adi,dc-dc-ilim-microamp:
$ref: /schemas/types.yaml#/definitions/uint32
enum: [150000, 200000, 250000, 300000, 350000, 400000] enum: [150000, 200000, 250000, 300000, 350000, 400000]
description: | description: |
The dc-to-dc converter current limit. The dc-to-dc converter current limit.
......
...@@ -21,7 +21,6 @@ properties: ...@@ -21,7 +21,6 @@ properties:
description: Connected to ADC_RDY pin. description: Connected to ADC_RDY pin.
maxim,led-current-microamp: maxim,led-current-microamp:
$ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 2 minItems: 2
maxItems: 2 maxItems: 2
description: | description: |
......
...@@ -70,11 +70,9 @@ properties: ...@@ -70,11 +70,9 @@ properties:
touchscreen-x-mm: touchscreen-x-mm:
description: horizontal length in mm of the touchscreen description: horizontal length in mm of the touchscreen
$ref: /schemas/types.yaml#/definitions/uint32
touchscreen-y-mm: touchscreen-y-mm:
description: vertical length in mm of the touchscreen description: vertical length in mm of the touchscreen
$ref: /schemas/types.yaml#/definitions/uint32
dependencies: dependencies:
touchscreen-size-x: [ touchscreen-size-y ] touchscreen-size-x: [ touchscreen-size-y ]
......
...@@ -259,7 +259,6 @@ properties: ...@@ -259,7 +259,6 @@ properties:
waiting for I/O signalling and card power supply to be stable, waiting for I/O signalling and card power supply to be stable,
regardless of whether pwrseq-simple is used. Default to 10ms if regardless of whether pwrseq-simple is used. Default to 10ms if
no available. no available.
$ref: /schemas/types.yaml#/definitions/uint32
default: 10 default: 10
supports-cqe: supports-cqe:
......
...@@ -41,13 +41,11 @@ properties: ...@@ -41,13 +41,11 @@ properties:
description: description:
Delay in ms after powering the card and de-asserting the Delay in ms after powering the card and de-asserting the
reset-gpios (if any). reset-gpios (if any).
$ref: /schemas/types.yaml#/definitions/uint32
power-off-delay-us: power-off-delay-us:
description: description:
Delay in us after asserting the reset-gpios (if any) Delay in us after asserting the reset-gpios (if any)
during power off of the card. during power off of the card.
$ref: /schemas/types.yaml#/definitions/uint32
required: required:
- compatible - compatible
......
...@@ -122,7 +122,6 @@ properties: ...@@ -122,7 +122,6 @@ properties:
such as flow control thresholds. such as flow control thresholds.
rx-internal-delay-ps: rx-internal-delay-ps:
$ref: /schemas/types.yaml#/definitions/uint32
description: | description: |
RGMII Receive Clock Delay defined in pico seconds. RGMII Receive Clock Delay defined in pico seconds.
This is used for controllers that have configurable RX internal delays. This is used for controllers that have configurable RX internal delays.
...@@ -140,7 +139,6 @@ properties: ...@@ -140,7 +139,6 @@ properties:
is used for components that can have configurable fifo sizes. is used for components that can have configurable fifo sizes.
tx-internal-delay-ps: tx-internal-delay-ps:
$ref: /schemas/types.yaml#/definitions/uint32
description: | description: |
RGMII Transmit Clock Delay defined in pico seconds. RGMII Transmit Clock Delay defined in pico seconds.
This is used for controllers that have configurable TX internal delays. This is used for controllers that have configurable TX internal delays.
......
...@@ -208,7 +208,6 @@ properties: ...@@ -208,7 +208,6 @@ properties:
Triplet of delays. The 1st cell is reset pre-delay in micro Triplet of delays. The 1st cell is reset pre-delay in micro
seconds. The 2nd cell is reset pulse in micro seconds. The 3rd seconds. The 2nd cell is reset pulse in micro seconds. The 3rd
cell is reset post-delay in micro seconds. cell is reset post-delay in micro seconds.
$ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 3 minItems: 3
maxItems: 3 maxItems: 3
......
...@@ -83,21 +83,18 @@ properties: ...@@ -83,21 +83,18 @@ properties:
for each of the battery capacity lookup table. for each of the battery capacity lookup table.
operating-range-celsius: operating-range-celsius:
$ref: /schemas/types.yaml#/definitions/uint32-array
description: operating temperature range of a battery description: operating temperature range of a battery
items: items:
- description: minimum temperature at which battery can operate - description: minimum temperature at which battery can operate
- description: maximum temperature at which battery can operate - description: maximum temperature at which battery can operate
ambient-celsius: ambient-celsius:
$ref: /schemas/types.yaml#/definitions/uint32-array
description: safe range of ambient temperature description: safe range of ambient temperature
items: items:
- description: alert when ambient temperature is lower than this value - description: alert when ambient temperature is lower than this value
- description: alert when ambient temperature is higher than this value - description: alert when ambient temperature is higher than this value
alert-celsius: alert-celsius:
$ref: /schemas/types.yaml#/definitions/uint32-array
description: safe range of battery temperature description: safe range of battery temperature
items: items:
- description: alert when battery temperature is lower than this value - description: alert when battery temperature is lower than this value
......
...@@ -50,7 +50,6 @@ properties: ...@@ -50,7 +50,6 @@ properties:
maxItems: 1 maxItems: 1
input-current-limit-microamp: input-current-limit-microamp:
$ref: /schemas/types.yaml#/definitions/uint32
description: Maximum input current in micro Amps. description: Maximum input current in micro Amps.
minimum: 50000 minimum: 50000
maximum: 500000 maximum: 500000
......
...@@ -62,7 +62,6 @@ properties: ...@@ -62,7 +62,6 @@ properties:
description: IRQ line information. description: IRQ line information.
dlg,irq-polling-delay-passive-ms: dlg,irq-polling-delay-passive-ms:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 1000 minimum: 1000
maximum: 10000 maximum: 10000
description: | description: |
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment