Skip to contentSkip to conversation

dt-bindings: microchip: atmel,at91rm9200-tcb: remove mandatory interrupts property

PATCH In review Eugen Hristev 3 participants 5 messages Feb 4, 2022 – Feb 11, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dt-bindings: microchip: atmel,at91rm9200-tcb: remove mandatory interrupts property

The timer block can be used only to be read and to measure time in a polling fashion. This can be used by Linux like this for example, or it can be used by different projects which do not have interrupt controllers, or do not wish to enable them (e.g. U-boot).
As DT is ABI, the binding should relate to all possible use cases and describe the hardware and the requirements.
The interrupt is not a hard requirement for the timer to function in a specific way.
Thus, choose to remove the interrupts property from the mandatory list of properties.

---
 .../devicetree/bindings/soc/microchip/atmel,at91rm9200-tcb.yaml  | 1 -
 1 file changed, 1 deletion(-)
Documentation/devicetree/bindings/soc/microchip/atmel,at91rm9200-tcb.yaml +0 -1
index 597d67fba92f..27f78459b892 100644
@@ -134,7 +134,6 @@ allOf:
 required:
   - compatible
   - reg
-  - interrupts
   - clocks
   - clock-names
   - '#address-cells'
Signature · 1 line
2.25.1
#1 lore raw
Quoted 11 lines · Eugen Hristev

The timer block can be used only to be read and to measure time in a polling fashion. This can be used by Linux like this for example, or it can be used by different projects which do not have interrupt controllers, or do not wish to enable them (e.g. U-boot).
As DT is ABI, the binding should relate to all possible use cases and describe the hardware and the requirements.
The interrupt is not a hard requirement for the timer to function in a specific way.
Thus, choose to remove the interrupts property from the mandatory list of properties.

The correct hardware description is that the interrupt is present on the IP. Having software behave differently depending on the presence of that property is configuration, not hardware description.

Quoted 20 lines
---
 .../devicetree/bindings/soc/microchip/atmel,at91rm9200-tcb.yaml  | 1 -
 1 file changed, 1 deletion(-)
Documentation/devicetree/bindings/soc/microchip/atmel,at91rm9200-tcb.yaml +0 -1
index 597d67fba92f..27f78459b892 100644
@@ -134,7 +134,6 @@ allOf:
 required:
   - compatible
   - reg
-  - interrupts
   - clocks
   - clock-names
   - '#address-cells'
Signature · 1 line
2.25.1
Signature · 3 lines
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw
Quoted 13 lines · Alexandre Belloni
Quoted 11 lines · Eugen Hristev

The timer block can be used only to be read and to measure time in a polling fashion. This can be used by Linux like this for example, or it can be used by different projects which do not have interrupt controllers, or do not wish to enable them (e.g. U-boot).
As DT is ABI, the binding should relate to all possible use cases and describe the hardware and the requirements.
The interrupt is not a hard requirement for the timer to function in a specific way.
Thus, choose to remove the interrupts property from the mandatory list of properties.

Quoted 3 lines

The correct hardware description is that the interrupt is present on the IP. Having software behave differently depending on the presence of that property is configuration, not hardware description.

I agree. The interrupt is present on the IP, thus the property exists and it's described.
However, the interrupt is not mandatory for IP operations. Thus it should not be in the list of mandatory properties.

Quoted 27 lines
Quoted 19 lines
---
  .../devicetree/bindings/soc/microchip/atmel,at91rm9200-tcb.yaml  | 1 -
  1 file changed, 1 deletion(-)
Documentation/devicetree/bindings/soc/microchip/atmel,at91rm9200-tcb.yaml +0 -2
index 597d67fba92f..27f78459b892 100644
@@ -134,7 +134,6 @@ allOf:
  required:
    - compatible
    - reg
-  - interrupts
    - clocks
    - clock-names
    - '#address-cells'
--
Quoted 2 lines

2.25.1

--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

#3 lore raw
Quoted 14 lines · On 04/02/2022 10:28:43+0000, [email protected] wrote:
Quoted 13 lines · Alexandre Belloni
Quoted 11 lines · Eugen Hristev

The timer block can be used only to be read and to measure time in a polling fashion. This can be used by Linux like this for example, or it can be used by different projects which do not have interrupt controllers, or do not wish to enable them (e.g. U-boot).
As DT is ABI, the binding should relate to all possible use cases and describe the hardware and the requirements.
The interrupt is not a hard requirement for the timer to function in a specific way.
Thus, choose to remove the interrupts property from the mandatory list of properties.

Quoted 9 lines
Quoted 3 lines

The correct hardware description is that the interrupt is present on the IP. Having software behave differently depending on the presence of that property is configuration, not hardware description.

I agree. The interrupt is present on the IP, thus the property exists and it's described.
However, the interrupt is not mandatory for IP operations. Thus it should not be in the list of mandatory properties.

If the interrupt is always present, it is mandatory, it doesn't matter whether is is used or necessary to get the IP to work.

Quoted 28 lines
Quoted 27 lines
Quoted 19 lines
---
  .../devicetree/bindings/soc/microchip/atmel,at91rm9200-tcb.yaml  | 1 -
  1 file changed, 1 deletion(-)
Documentation/devicetree/bindings/soc/microchip/atmel,at91rm9200-tcb.yaml +0 -2
index 597d67fba92f..27f78459b892 100644
@@ -134,7 +134,6 @@ allOf:
  required:
    - compatible
    - reg
-  - interrupts
    - clocks
    - clock-names
    - '#address-cells'
--
Quoted 2 lines

2.25.1

--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Signature · 3 lines
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
maintainer
#4 lore raw
Quoted 19 lines · Alexandre Belloni
Quoted 18 lines · On 04/02/2022 10:28:43+0000, [email protected] wrote:
Quoted 16 lines · Alexandre Belloni
Quoted 11 lines · Eugen Hristev

The timer block can be used only to be read and to measure time in a polling fashion. This can be used by Linux like this for example, or it can be used by different projects which do not have interrupt controllers, or do not wish to enable them (e.g. U-boot).
As DT is ABI, the binding should relate to all possible use cases and describe the hardware and the requirements.
The interrupt is not a hard requirement for the timer to function in a specific way.
Thus, choose to remove the interrupts property from the mandatory list of properties.

The correct hardware description is that the interrupt is present on the IP. Having software behave differently depending on the presence of that property is configuration, not hardware description.

Quoted 8 lines
Quoted 5 lines

I agree. The interrupt is present on the IP, thus the property exists and it's described.
However, the interrupt is not mandatory for IP operations. Thus it should not be in the list of mandatory properties.

If the interrupt is always present, it is mandatory, it doesn't matter whether is is used or necessary to get the IP to work.

Agreed.