On Fri, Feb 26, 2021 at 01:53:00PM +0100, Marjan Pascolo wrote: > Hi Maxime, > > Il 17/02/2021 12:03, Maxime Ripard ha scritto: > > Hi, > > > > On Wed, Feb 10, 2021 at 05:22:37PM +0100, Marjan Pascolo wrote: > > > On Allwinner SoC interrupt debounce can be controlled by two oscillator > > > (32KHz and 24MHz) and a prescale divider. > > > Oscillator and prescale divider are set through > > > device tree property "input-debounce" which have 1uS accuracy. > > > For acheive nS precision a new device tree poperty is made > > > named "input-debounce-ns". > > > "input-debounce-ns" is checked only if "input-debounce" > > > property is not defined. > > > > > > Suggested-by: Maxime Ripard > > > Signed-off-by: Marjan Pascolo > > > --- > > > --- > > >  .../pinctrl/allwinner,sun4i-a10-pinctrl.yaml  |  9 +++++++ > > >  drivers/pinctrl/sunxi/pinctrl-sunxi.c         | 25 ++++++++++++++++--- > > >  2 files changed, 30 insertions(+), 4 deletions(-) > > > > > > diff --git > > > a/Documentation/devicetree/bindings/pinctrl/allwinner,sun4i-a10-pinctrl.yaml > > > b/Documentation/devicetree/bindings/pinctrl/allwinner,sun4i-a10-pinctrl.yaml > > > index 5240487dfe50..346776de3a44 100644 > > > --- > > > a/Documentation/devicetree/bindings/pinctrl/allwinner,sun4i-a10-pinctrl.yaml > > > +++ > > > b/Documentation/devicetree/bindings/pinctrl/allwinner,sun4i-a10-pinctrl.yaml > > > @@ -93,6 +93,15 @@ properties: > > >      minItems: 1 > > >      maxItems: 5 > > > > > > +  input-debounce-ns: > > > +    description: > > > +      Debouncing periods in nanoseconds, one period per interrupt > > > +      bank found in the controller. > > > +      Only checked if input-debounce is not present > > > +    $ref: /schemas/types.yaml#/definitions/uint32-array > > > +    minItems: 1 > > > +    maxItems: 5 > > > + > > This should be a separate patch, with the DT maintainers in Cc. > > > > You should enforce that the properties are mutually exclusive through > > the schema too > > I'm sorry, I've ignored documentaion about /Documentation. > > I see that some additional YAML operator (like oneOf) are used. > > oneOf should fit the schema, but I can't understand if oneOf's options must > be a literal value, or if could also be a node. > > Otherwise I'll use if ..then..else. dependencies is what you're looking for, not oneOf or if Maxime