Message ID | 20250321222432.8212-1-nikola.jelic83@gmail.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [V6,1/2] ASoC: dt-bindings: Add cmx655 codec | expand |
On Fri, Mar 21, 2025 at 11:22:47PM +0100, Nikola Jelic wrote: > The driver is for cmx655d audio codecs from CML Micro. The CMX655D is an This is not a driver, but binding. Drop the first sentence. > ultra-low power voice codec targeted at digital voice and sensor > applications. > > Signed-off-by: Nikola Jelic <nikola.jelic83@gmail.com> > > --- Do not attach (thread) your patchsets to some other threads (unrelated or older versions). This buries them deep in the mailbox and might interfere with applying entire sets. > > 2025-01-25 Nikola Jelic <nikola.jelic83@gmail.com> V1 > * /Documentation/devicetree/bindings/sound/cml,cmx655d.yaml: added the device tree binding > * /Documentation/devicetree/bindings/sound/cmx655.txt: added the device tree description file > * /Documentation/devicetree/bindings/vendor-prefixes.yaml: added CML Micro, Ltd. to the vendor prefixes > * /sound/soc/codecs/Kconfig: added SND_SOC_CMX655D and its dependencies > * /sound/soc/codecs/Makefile: added snd-soc-cmx655 and its dependencies > * /sound/soc/codecs/cmx655.c: added the main driver file for the codec > * /sound/soc/codecs/cmx655.h: added the main header file for the codec > * /sound/soc/codecs/cmx655_i2c.c: added the i2c adapter for the codec > * /sound/soc/codecs/cmx655_spi.c: added the spi adapter for the codec How are these related to this patch? Per-patch changelog is supposed to have only per-patch changes. ... > .../bindings/sound/cml,cmx655d.yaml | 62 +++++++++++++++++++ > .../devicetree/bindings/vendor-prefixes.yaml | 2 + > MAINTAINERS | 7 +++ > 3 files changed, 71 insertions(+) > create mode 100644 Documentation/devicetree/bindings/sound/cml,cmx655d.yaml > > diff --git a/Documentation/devicetree/bindings/sound/cml,cmx655d.yaml b/Documentation/devicetree/bindings/sound/cml,cmx655d.yaml > new file mode 100644 > index 000000000000..577e1d4942c6 > --- /dev/null > +++ b/Documentation/devicetree/bindings/sound/cml,cmx655d.yaml > @@ -0,0 +1,62 @@ > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/sound/cml,cmx655d.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: CML Micro CMX655D codec > + > +maintainers: > + - Richard Walton <rwalton@cmlmicro.com> Some ack on taking maintainer duties would be useful. > + - Nikola Jelic <nikola.jelic83@gmail.com> > + > +description: > + The CMX655D is an ultra-low power voice codec. > + > +allOf: > + - $ref: dai-common.yaml# > + > +properties: > + compatible: > + const: cml,cmx655d > + > + reg: > + maxItems: 1 > + > + "#sound-dai-cells": > + const: 0 > + > + reset-gpios: > + maxItems: 1 > + > + interrupts: > + maxItems: 1 > + > + interrupt-names: > + const: cmx-irq The name equal to device name is not really usefull. Drop interrupt-names from binding and DTS. > + > +required: > + - compatible > + - reg > + - '#sound-dai-cells' > + > +unevaluatedProperties: false > + > +examples: > + - | > + #include <dt-bindings/interrupt-controller/irq.h> > + #include <dt-bindings/gpio/gpio.h> > + i2c { > + #address-cells = <1>; > + #size-cells = <0>; > + audio-codec@54 { > + compatible = "cml,cmx655d"; > + reg = <0x54>; > + #sound-dai-cells = <0>; > + reset-gpios = <&gpio 24 GPIO_ACTIVE_LOW>; > + interrupt-parent = <&gpio>; > + interrupts = <25 IRQ_TYPE_EDGE_RISING>; > + }; > + Drop stray blank line. Best regards, Krzysztof
diff --git a/Documentation/devicetree/bindings/sound/cml,cmx655d.yaml b/Documentation/devicetree/bindings/sound/cml,cmx655d.yaml new file mode 100644 index 000000000000..577e1d4942c6 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/cml,cmx655d.yaml @@ -0,0 +1,62 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/cml,cmx655d.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: CML Micro CMX655D codec + +maintainers: + - Richard Walton <rwalton@cmlmicro.com> + - Nikola Jelic <nikola.jelic83@gmail.com> + +description: + The CMX655D is an ultra-low power voice codec. + +allOf: + - $ref: dai-common.yaml# + +properties: + compatible: + const: cml,cmx655d + + reg: + maxItems: 1 + + "#sound-dai-cells": + const: 0 + + reset-gpios: + maxItems: 1 + + interrupts: + maxItems: 1 + + interrupt-names: + const: cmx-irq + +required: + - compatible + - reg + - '#sound-dai-cells' + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/irq.h> + #include <dt-bindings/gpio/gpio.h> + i2c { + #address-cells = <1>; + #size-cells = <0>; + audio-codec@54 { + compatible = "cml,cmx655d"; + reg = <0x54>; + #sound-dai-cells = <0>; + reset-gpios = <&gpio 24 GPIO_ACTIVE_LOW>; + interrupt-parent = <&gpio>; + interrupts = <25 IRQ_TYPE_EDGE_RISING>; + }; + + }; +... diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml index 86f6a19b28ae..49ea70169b1b 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml @@ -310,6 +310,8 @@ patternProperties: description: Carl Cloos Schweisstechnik GmbH. "^cloudengines,.*": description: Cloud Engines, Inc. + "^cml,.*": + description: CML Micro, Ltd. "^cnm,.*": description: Chips&Media, Inc. "^cnxt,.*": diff --git a/MAINTAINERS b/MAINTAINERS index cc6536141bb3..9d4b1bdb4456 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -5801,6 +5801,13 @@ C: irc://irc.oftc.net/bcache F: include/linux/closure.h F: lib/closure.c +CML CODEC DRIVER +M: Nikola Jelic <nikola.jelic83@gmail.com> +M: Richard Walton <rwalton@cmlmicro.com> +L: linux-sound@vger.kernel.org +S: Maintained +F: Documentation/devicetree/bindings/sound/cml,cmx655d.yaml + CMPC ACPI DRIVER M: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com> L: platform-driver-x86@vger.kernel.org
The driver is for cmx655d audio codecs from CML Micro. The CMX655D is an ultra-low power voice codec targeted at digital voice and sensor applications. Signed-off-by: Nikola Jelic <nikola.jelic83@gmail.com> --- 2025-01-25 Nikola Jelic <nikola.jelic83@gmail.com> V1 * /Documentation/devicetree/bindings/sound/cml,cmx655d.yaml: added the device tree binding * /Documentation/devicetree/bindings/sound/cmx655.txt: added the device tree description file * /Documentation/devicetree/bindings/vendor-prefixes.yaml: added CML Micro, Ltd. to the vendor prefixes * /sound/soc/codecs/Kconfig: added SND_SOC_CMX655D and its dependencies * /sound/soc/codecs/Makefile: added snd-soc-cmx655 and its dependencies * /sound/soc/codecs/cmx655.c: added the main driver file for the codec * /sound/soc/codecs/cmx655.h: added the main header file for the codec * /sound/soc/codecs/cmx655_i2c.c: added the i2c adapter for the codec * /sound/soc/codecs/cmx655_spi.c: added the spi adapter for the codec 2025-02-03 Nikola Jelic <nikola.jelic83@gmail.com> V2 * mailin-list: added the missing recipients * mail-header: fixed the subjects of the emails, to align with the norms for the subsystem * /Documentation/devicetree/bindings/sound/cmx655.txt: removed the file, obsolete now * /sound/soc/codecs/Kconfig: changed the dependencies between the configuration options * /sound/soc/codecs/Makefile: renamed i2c and spi files and fixed the dependencies * /sound/soc/codecs/cmx655.c: Removed unnecessary comments. Fixed the comments to conform to the kerneldoc format. cmx655_volatile_reg: removed unnecessary bool ret variable. cmx655_regmap: changed cache type to REGCACHE_MAPLE. Changes symbol exports to the GPL variant. Changed usage of master/slave to primary/secondary. Introduced the constraint mechanism for the baud rates. cmx655_dai_startup: added the function for registering the constraints. Renamed several controls and widgets to be more verbose and precise. cmx655_common_register_component: moved majority of the registration code from i2c and spi into this function. * /sound/soc/codecs/cmx655.h: Removed unnecessary comments. Fixed the comments to conform to the kerneldoc format. Introduced the usage of the BIT() macro. cmx655_common_register_component: changed the function's signature * /sound/soc/codecs/cmx655-i2c.c: Renamed the file Reduced the initialisation code, moved to cmx655.c * /sound/soc/codecs/cmx655-spi.c: Renamed the file Reduced the initialisation code, moved to cmx655.c 2025-02-07 Nikola Jelic <nikola.jelic83@gmail.com> V3 * mail-header: added versioning to the patch series * mail-body: added a minimalistic changelog for the patch series * /Documentation/devicetree/bindings/sound/cml,cmx655d.yaml: Removed '|' from the description field. Added descriptions to all used properties. Removed pinctrl-* properties. Fixed description for the cmx655,classd-oc-reset-attempts property. Added minimum and maximum for the cmx655,classd-oc-reset-attempts property. Fixed the example of usage. * /sound/soc/codecs/cmx655-i2c.c: Added a holder variable for the regmap. Removed gpio toggling during removal. * /sound/soc/codecs/cmx655-spi.c: Added a holder variable for the regmap. Removed gpio toggling during removal. * /sound/soc/codecs/cmx655.c: cmx655_start_sys_clk: added newlines after for-loops. cmx655_get_sys_clk_config: removed brackets around case values. cmx655_setup_rate: error causes an immediate return, no silent drops anymore. Removed the constraints functions and structures. cmx655_component_remove: added a newline after variable initialisation. cmx655_companding: removed "enum" from the name. cmx655_alc_gain: removed "Gain" from the name. cmx655_mic_dapm_event: removed brackets around case values. CMX655_DAPM_MIC: new macro used for the microphone definitions. cmx655_parse_data_from_of: fixed the name of the custom property. cmx655_common_unregister_component: added gpio toggling. * /sound/soc/codecs/cmx655.c: CMX655_DAPM_MIC: new macro introduced. 2025-02-10 Nikola Jelic <nikola.jelic83@gmail.com> V4 * mail-header: capital 'V' for the patch series version * /sound/soc/codecs/cmx655-i2c.c: removed version.h header. * /sound/soc/codecs/cmx655-spi.c: removed version.h header. * /sound/soc/codecs/cmx655.c: Removed version.h heaer. cmx655_get_sys_clk_config: fixed logical to bitwise 'or'. cmx655_mic_dapm_event: fixed reg_val checking. 2025-02-14 Nikola Jelic <nikola.jelic83@gmail.com> V5 * /Documentation/devicetree/bindings/sound/cml,cmx655d.yaml: "compatible" changed to const. Removed unnecessary descriptions of properties. cml,classd-oc-reset-attempts: removed altogether. Removed "status" from the example. Fixed the order of the properties in the example. * /sound/soc/codecs/cmx655.c: Moved reset_attempts to the module parameter. cmx655_irq_thread: uses the module parameter now. cmx655_parse_data_from_of: removed. cmx655_common_register_component: doesn't invoke cmx655_parse_data_from_of anymore. * /sound/soc/codecs/cmx655.h: CMX655_DAPM_MIC: fixed formatting issues. cmx655_data: removed oc_cnt_max field. 2025-03-21 Nikola Jelic <nikola.jelic83@gmail.com> V6 * branch: rebased to next-20250321 tag * mail-body: Much more verbose changelog. Fixed inconsistency between changelogs in two patches. Added "in-reply-to". * MAINTAINERS: added the "CML CODEC DRIVER" entry * /sound/soc/codecs/Kconfig: Fixed a typo in the SND_SOC_ALL_CODECS imply section. Added "help" sections to the added configuration options. --- .../bindings/sound/cml,cmx655d.yaml | 62 +++++++++++++++++++ .../devicetree/bindings/vendor-prefixes.yaml | 2 + MAINTAINERS | 7 +++ 3 files changed, 71 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/cml,cmx655d.yaml