Message ID | 1668165992-6493-1-git-send-email-wangweidong.a@awinic.com |
---|---|
Headers | show |
Series | ASoC: codecs: Add Awinic AW883XX audio amplifier driver | expand |
On 11/11/2022 12:26, wangweidong.a@awinic.com wrote: > From: Weidong Wang <wangweidong.a@awinic.com> > > Add a DT schema for describing Awinic AW883xx audio amplifiers. They are > controlled using I2C. > > Signed-off-by: Weidong Wang <wangweidong.a@awinic.com> > --- > .../devicetree/bindings/sound/awinic,aw883xx.yaml | 60 ++++++++++++++++++++++ > 1 file changed, 60 insertions(+) > create mode 100644 Documentation/devicetree/bindings/sound/awinic,aw883xx.yaml > > diff --git a/Documentation/devicetree/bindings/sound/awinic,aw883xx.yaml b/Documentation/devicetree/bindings/sound/awinic,aw883xx.yaml > new file mode 100644 > index 0000000..1c0c726 > --- /dev/null > +++ b/Documentation/devicetree/bindings/sound/awinic,aw883xx.yaml > @@ -0,0 +1,60 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/sound/awinic,aw883xx.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Awinic AW883xx Smart Audio Amplifier > + > +maintainers: > + - Stephan Gerhold <stephan@gerhold.net> > + > +description: > + The Awinic AW883XX is an I2S/TDM input, high efficiency > + digital Smart K audio amplifier with an integrated 10.25V > + smart boost convert. > + > +allOf: > + - $ref: name-prefix.yaml# > + > +properties: > + compatible: > + const: awinic,aw883xx_smartpa > + > + reg: > + maxItems: 1 > + > + reset-gpio: reset-gpios > + maxItems: 1 > + > + irq-gpio: irq-gpios > + maxItems: 1 You also need here description > + > + sound-channel: > + maxItems: 1 What's this? Does not look like a standard property. You need type and description (and sometimes also vendor prefix...). > + > + sound-name-prefix: true > + > +required: > + - compatible > + - reg > + - reset-gpio > + - irq-gpio > + - sound-channel > + > +additionalProperties: false > + > +examples: > + - | > + i2c { > + #address-cells = <1>; > + #size-cells = <0>; > + > + aw883xx_smartpa@34 { Node names should be generic, so codec or amplifier https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation > + compatible = "awinic,aw883xx_smartpa"; > + reg = <0x34>; > + reset-gpio = <&ap_gpio 92 0>; > + irq-gpio = <&ap_gpio 93 0>; Use defines for flags. > + sound-channel = <0>; > + }; > + }; Best regards, Krzysztof
From: Weidong Wang <wangweidong.a@awinic.com> The Awinic AW883XX is an I2S/TDM input, high efficiency digital Smart K audio amplifier with an integrated 10.25V smart boost convert Add a DT schema for describing Awinic AW883xx audio amplifiers. They are controlled using I2C. v2 -> v3 : i2c reads and writes are changed to regmap The monitor, calib, and spin files were deleted Deleted firmware load retry Linux version compatibility and driver version control were removed The global variable was deleted The renaming of dai was removed Platform compatibility was removed Simplified log information use module_i2c_driver Delete the custom interface and use the kernel standard interface Weidong Wang (6): ASoC: codecs: Add i2c and codec registration for aw883xx and their associated operation functions ASoC: codecs: Added configuration file parsing for aw883xx ASoC: codecs: Add aw883xx chip control logic, such as power-on and power-off ASoC: codecs: Realize aw883xx register configuration and register address file ASoC: dt-bindings: Add schema for "awinic,aw883xx" ASoC:codecs:aw883xx corresponds to the modified Makefile and Kconfig .../devicetree/bindings/sound/awinic,aw883xx.yaml | 60 + sound/soc/codecs/Kconfig | 10 + sound/soc/codecs/Makefile | 7 + sound/soc/codecs/aw883xx/aw883xx.c | 1806 +++++++++++++++ sound/soc/codecs/aw883xx/aw883xx.h | 155 ++ sound/soc/codecs/aw883xx/aw883xx_bin_parse.c | 1294 +++++++++++ sound/soc/codecs/aw883xx/aw883xx_bin_parse.h | 145 ++ sound/soc/codecs/aw883xx/aw883xx_data_type.h | 148 ++ sound/soc/codecs/aw883xx/aw883xx_device.c | 1618 +++++++++++++ sound/soc/codecs/aw883xx/aw883xx_device.h | 544 +++++ sound/soc/codecs/aw883xx/aw883xx_init.c | 549 +++++ sound/soc/codecs/aw883xx/aw883xx_pid_2049_reg.h | 2387 ++++++++++++++++++++ 12 files changed, 8723 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/awinic,aw883xx.yaml create mode 100644 sound/soc/codecs/aw883xx/aw883xx.c create mode 100644 sound/soc/codecs/aw883xx/aw883xx.h create mode 100644 sound/soc/codecs/aw883xx/aw883xx_bin_parse.c create mode 100644 sound/soc/codecs/aw883xx/aw883xx_bin_parse.h create mode 100644 sound/soc/codecs/aw883xx/aw883xx_data_type.h create mode 100644 sound/soc/codecs/aw883xx/aw883xx_device.c create mode 100644 sound/soc/codecs/aw883xx/aw883xx_device.h create mode 100644 sound/soc/codecs/aw883xx/aw883xx_init.c create mode 100644 sound/soc/codecs/aw883xx/aw883xx_pid_2049_reg.h