Message ID | 20240716-adi-v1-1-79c0122986e7@nxp.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | mfd: add adp5585 gpio and pwm support | expand |
On Tue, Jul 16, 2024 at 03:28:24PM -0400, Frank Li wrote: > Add adi5585, which provide gpio, pwm and keypad controller. > > Signed-off-by: Frank Li <Frank.Li@nxp.com> > --- > .../devicetree/bindings/mfd/adi,adp5585.yaml | 83 ++++++++++++++++++++++ > 1 file changed, 83 insertions(+) > > diff --git a/Documentation/devicetree/bindings/mfd/adi,adp5585.yaml b/Documentation/devicetree/bindings/mfd/adi,adp5585.yaml > new file mode 100644 > index 0000000000000..03c4760242ddd > --- /dev/null > +++ b/Documentation/devicetree/bindings/mfd/adi,adp5585.yaml > @@ -0,0 +1,83 @@ > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/mfd/adi,adp5585.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: ADI adp5585 GPIO, PWM, keypad controller > + > +maintainers: > + - Frank Li <Frank.Li@nxp.com> > + > +description: > + adp5585 is a multifunctional device that can provide GPIO, PWM and keypad. > + > +properties: > + compatible: > + const: adi,adp5585 > + > + reg: > + items: > + description: I2C device address. > + > + gpio: > + type: object > + properties: > + compatible: > + const: adp5585-gpio > + > + gpio-controller: true > + > + "#gpio-cells": > + const: 2 > + > + required: > + - compatible > + - gpio-controller > + - "#gpio-cells" > + > + additionalProperties: false > + > + pwm: > + $ref: /schemas/pwm/pwm.yaml > + properties: > + compatible: > + const: adp5585-pwm > + > + "#pwm-cells": > + const: 3 > + > + required: > + - compatible > + - "#pwm-cells" > + > + unevaluatedProperties: false > + > +required: > + - compatible > + - reg > + > +additionalProperties: false > + > +examples: > + - | > + i2c { > + #address-cells = <1>; > + #size-cells = <0>; > + > + mfd@34 { > + compatible = "adi,adp5585"; > + reg = <0x34>; > + > + gpio { > + compatible = "adp5585-gpio"; Missing vendor prefix. However, ... > + gpio-controller; > + #gpio-cells = <2>; > + }; > + > + pwm { > + compatible = "adp5585-pwm"; > + #pwm-cells = <3>; > + }; There's no need for these child nodes. This can be just: mfd@34 { compatible = "adi,adp5585"; reg = <0x34>; gpio-controller; #gpio-cells = <2>; #pwm-cells = <3>; }; Rob
diff --git a/Documentation/devicetree/bindings/mfd/adi,adp5585.yaml b/Documentation/devicetree/bindings/mfd/adi,adp5585.yaml new file mode 100644 index 0000000000000..03c4760242ddd --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/adi,adp5585.yaml @@ -0,0 +1,83 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mfd/adi,adp5585.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: ADI adp5585 GPIO, PWM, keypad controller + +maintainers: + - Frank Li <Frank.Li@nxp.com> + +description: + adp5585 is a multifunctional device that can provide GPIO, PWM and keypad. + +properties: + compatible: + const: adi,adp5585 + + reg: + items: + description: I2C device address. + + gpio: + type: object + properties: + compatible: + const: adp5585-gpio + + gpio-controller: true + + "#gpio-cells": + const: 2 + + required: + - compatible + - gpio-controller + - "#gpio-cells" + + additionalProperties: false + + pwm: + $ref: /schemas/pwm/pwm.yaml + properties: + compatible: + const: adp5585-pwm + + "#pwm-cells": + const: 3 + + required: + - compatible + - "#pwm-cells" + + unevaluatedProperties: false + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + mfd@34 { + compatible = "adi,adp5585"; + reg = <0x34>; + + gpio { + compatible = "adp5585-gpio"; + gpio-controller; + #gpio-cells = <2>; + }; + + pwm { + compatible = "adp5585-pwm"; + #pwm-cells = <3>; + }; + }; + };
Add adi5585, which provide gpio, pwm and keypad controller. Signed-off-by: Frank Li <Frank.Li@nxp.com> --- .../devicetree/bindings/mfd/adi,adp5585.yaml | 83 ++++++++++++++++++++++ 1 file changed, 83 insertions(+)