mbox series

[00/12] Add support for the Cirrus Logic CS48L32 audio codecs

Message ID 20221109165331.29332-1-rf@opensource.cirrus.com
Headers show
Series Add support for the Cirrus Logic CS48L32 audio codecs | expand

Message

Richard Fitzgerald Nov. 9, 2022, 4:53 p.m. UTC
The CS48L32 is a high-performance low-power audio DSP for smartphones
and other portable audio devices. It has various digital audio I/O,
a programmable Halo Core DSP, fixed-function audio processors,
configurable GPIO and microphone bias regulators.

The CS48L31 and CS48L33 were derivatives of the CS48L32.

Piotr Stankiewicz (2):
  mfd: cs48l32: Add support for CS48L31/32/33 codecs
  pinctrl: cirrus: Add support for CS48L31/32/33 codecs

Richard Fitzgerald (9):
  dt-bindings: mfd: Add Cirrus Logic CS48L32 audio codec
  mfd: cs48l32: Add register definitions for Cirrus Logic CS48L31/32/33
  dt-bindings: pinctrl: Add Cirrus Logic CS48L31/32/33
  regulator: arizona-micsupp: Don't hardcode use of ARIZONA defines
  regulator: arizona-micsupp: Don't use a common regulator name
  regulator: arizona-micsupp: Support Cirrus Logic CS48L31/32/33
  irqchip: cirrus: Add driver for Cirrus Logic CS48L31/32/33 codecs
  ASoC: wm_adsp: Allow client to hook into pre_run callback
  dt-bindings: sound: Add Cirrus Logic CS48L31/32/33 codecs

Stuart Henderson (1):
  ASoC: cs48l32: Add codec driver for Cirrus Logic CS48L31/32/33

 .../bindings/mfd/cirrus,cs48l32.yaml          |  166 +
 .../bindings/pinctrl/cirrus,cs48l32.yaml      |   98 +
 .../bindings/sound/cirrus,cs48l32.yaml        |   96 +
 MAINTAINERS                                   |   12 +-
 drivers/irqchip/Kconfig                       |    3 +
 drivers/irqchip/Makefile                      |    1 +
 drivers/irqchip/irq-cirrus-cs48l32.c          |  281 ++
 drivers/irqchip/irq-cirrus-cs48l32.h          |   74 +
 drivers/mfd/Kconfig                           |   13 +
 drivers/mfd/Makefile                          |    2 +
 drivers/mfd/cs48l32-tables.c                  |  541 ++++
 drivers/mfd/cs48l32.c                         |  434 +++
 drivers/mfd/cs48l32.h                         |   28 +
 drivers/pinctrl/cirrus/Kconfig                |    5 +
 drivers/pinctrl/cirrus/Makefile               |    2 +
 drivers/pinctrl/cirrus/pinctrl-cs48l32.c      |  932 ++++++
 drivers/pinctrl/cirrus/pinctrl-cs48l32.h      |   62 +
 drivers/regulator/Kconfig                     |    8 +-
 drivers/regulator/arizona-micsupp.c           |   78 +-
 include/dt-bindings/sound/cs48l32.h           |   25 +
 include/linux/irqchip/irq-cirrus-cs48l32.h    |  101 +
 include/linux/mfd/cs48l32/core.h              |   49 +
 include/linux/mfd/cs48l32/registers.h         |  509 +++
 include/sound/cs48l32.h                       |   89 +
 sound/soc/codecs/Kconfig                      |    9 +
 sound/soc/codecs/Makefile                     |    2 +
 sound/soc/codecs/cs48l32-core.c               | 2782 +++++++++++++++++
 sound/soc/codecs/cs48l32.c                    | 1211 +++++++
 sound/soc/codecs/cs48l32.h                    |  386 +++
 sound/soc/codecs/wm_adsp.c                    |   11 +
 sound/soc/codecs/wm_adsp.h                    |    1 +
 31 files changed, 7997 insertions(+), 14 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/mfd/cirrus,cs48l32.yaml
 create mode 100644 Documentation/devicetree/bindings/pinctrl/cirrus,cs48l32.yaml
 create mode 100644 Documentation/devicetree/bindings/sound/cirrus,cs48l32.yaml
 create mode 100644 drivers/irqchip/irq-cirrus-cs48l32.c
 create mode 100644 drivers/irqchip/irq-cirrus-cs48l32.h
 create mode 100644 drivers/mfd/cs48l32-tables.c
 create mode 100644 drivers/mfd/cs48l32.c
 create mode 100644 drivers/mfd/cs48l32.h
 create mode 100644 drivers/pinctrl/cirrus/pinctrl-cs48l32.c
 create mode 100644 drivers/pinctrl/cirrus/pinctrl-cs48l32.h
 create mode 100644 include/dt-bindings/sound/cs48l32.h
 create mode 100644 include/linux/irqchip/irq-cirrus-cs48l32.h
 create mode 100644 include/linux/mfd/cs48l32/core.h
 create mode 100644 include/linux/mfd/cs48l32/registers.h
 create mode 100644 include/sound/cs48l32.h
 create mode 100644 sound/soc/codecs/cs48l32-core.c
 create mode 100644 sound/soc/codecs/cs48l32.c
 create mode 100644 sound/soc/codecs/cs48l32.h

Comments

Linus Walleij Nov. 10, 2022, 10:02 a.m. UTC | #1
On Wed, Nov 9, 2022 at 5:53 PM Richard Fitzgerald
<rf@opensource.cirrus.com> wrote:

> From: Piotr Stankiewicz <piotrs@opensource.cirrus.com>
>
> Codecs in this family have multiple digital I/O functions for audio,
> DSP subsystem, GPIO and various special functions. All muxable pins
> are selectable as either a GPIO or an alternate function.
>
> Signed-off-by: Piotr Stankiewicz <piotrs@opensource.cirrus.com>
> Signed-off-by: Qi Zhou <qi.zhou@cirrus.com>
> Signed-off-by: Stuart Henderson <stuarth@opensource.cirrus.com>
> Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>

This looks OK.
Acked-by: Linus Walleij <linus.walleij@linaro.org>

Does this patch have compile-time dependencies on the other
patches or is it something I can just merge separately?

Yours,
Linus Walleij
Krzysztof Kozlowski Nov. 14, 2022, 8:36 a.m. UTC | #2
On 09/11/2022 17:53, Richard Fitzgerald wrote:
> The CS48L32 has multiple digital and analog audio I/O, a
> high-performance low-power programmable audio DSP, and a variety of
> power-efficient fixed-function audio processors, with digital
> mixing and routing.
> 
> Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
> ---
>  .../bindings/mfd/cirrus,cs48l32.yaml          | 166 ++++++++++++++++++
>  1 file changed, 166 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/mfd/cirrus,cs48l32.yaml
> 
> diff --git a/Documentation/devicetree/bindings/mfd/cirrus,cs48l32.yaml b/Documentation/devicetree/bindings/mfd/cirrus,cs48l32.yaml
> new file mode 100644
> index 000000000000..d128600c0b72
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mfd/cirrus,cs48l32.yaml
> @@ -0,0 +1,166 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/mfd/cirrus,cs48l32.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Cirrus Logic CS48L32 audio CODECs Multi-Functional Device
> +
> +maintainers:
> +  - patches@opensource.cirrus.com
> +
> +description: |
> +  The CS48L32 is an audio SoC with extensive digital capabilities
> +  and a range of digital and analogue I/O.
> +
> +  See also the child driver bindings in:
> +
> +    bindings/pinctrl/cirrus,cs48l32.yaml
> +    bindings/regulator/wlf,arizona.yaml
> +    bindings/sound/cirrus,cs48l32.yaml
> +
> +allOf:
> +  - $ref: /schemas/pinctrl/cirrus,cs48l32.yaml#

There is no such file.

Best regards,
Krzysztof
Krzysztof Kozlowski Nov. 14, 2022, 8:39 a.m. UTC | #3
On 09/11/2022 17:53, Richard Fitzgerald wrote:
> Codecs in this family have multiple digital I/O functions for audio,
> DSP subsystem, GPIO and various special functions. All muxable pins
> are selectable as either a GPIO or one of the available alternate
> functions.
> 
> Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
> ---
>  .../bindings/pinctrl/cirrus,cs48l32.yaml      | 98 +++++++++++++++++++
>  1 file changed, 98 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/pinctrl/cirrus,cs48l32.yaml
> 
> diff --git a/Documentation/devicetree/bindings/pinctrl/cirrus,cs48l32.yaml b/Documentation/devicetree/bindings/pinctrl/cirrus,cs48l32.yaml
> new file mode 100644
> index 000000000000..b24fbae6a8f8
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/pinctrl/cirrus,cs48l32.yaml
> @@ -0,0 +1,98 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/pinctrl/cirrus,cs48l32.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Cirrus Logic CS48L32 audio codec pinctrl driver

Drop driver.
s/pinctrl/Pin Controller/


> +
> +maintainers:
> +  - patches@opensource.cirrus.com
> +
> +description: |
> +The Cirrus Logic CS48L32 codec has a number of GPIO functions for
> +interfacing to external hardware. Certain groups of GPIO pins also
> +have an alternate function.
> +
> +The properties for this driver exist within the parent MFD driver node.

Drop driver... so probably entire sentence.

> +See the core bindings for the parent MFD driver for an example:

Drop driver. Describe hardware instead.

> +
> +    Documentation/devicetree/bindings/mfd/cirrus,cs48l32.yaml
> +
> +And the generic pinctrl bindings:
> +
> +    Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt

Drop entire sentence.

> +
> +properties:

Your schema does not match on its own. Where is the compatible? This is
not how schemas for devices (also MFD) is done.

> +  pin-settings:
> +    description:
> +      One subnode is required to contain the default settings. It
> +      contains an arbitrary number of configuration subnodes, one for
> +      each group or pin configuration you want to apply as a default.
> +    type: object
> +    patternProperties:
> +      '-pins$':
> +        type: object
> +        allOf:
> +          - $ref: "pincfg-node.yaml#"
> +          - $ref: "pinmux-node.yaml#"

Drop quotes.

Except this, test your patches before sending.

Best regards,
Krzysztof
Krzysztof Kozlowski Nov. 14, 2022, 8:45 a.m. UTC | #4
On 09/11/2022 17:53, Richard Fitzgerald wrote:
> Codecs in this family have multiple digital and analog audio I/O that
> support a variety of external hardware connections and configurations.
> 
> Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
> ---
>  .../bindings/sound/cirrus,cs48l32.yaml        | 96 +++++++++++++++++++
>  include/dt-bindings/sound/cs48l32.h           | 25 +++++
>  2 files changed, 121 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/sound/cirrus,cs48l32.yaml
>  create mode 100644 include/dt-bindings/sound/cs48l32.h
> 
> diff --git a/Documentation/devicetree/bindings/sound/cirrus,cs48l32.yaml b/Documentation/devicetree/bindings/sound/cirrus,cs48l32.yaml
> new file mode 100644
> index 000000000000..70fb294c6dc1
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/cirrus,cs48l32.yaml
> @@ -0,0 +1,96 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/sound/cirrus,cs48l32.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Cirrus Logic CS48L31/32/33 audio CODECs
> +
> +maintainers:
> +  - patches@opensource.cirrus.com
> +
> +description: |
> +  This describes audio configuration bindings for these codecs.

Don't start with "This". Instead describe the hardware.

> +
> +  See also the core bindings for the parent MFD driver:
> +
> +    Documentation/devicetree/bindings/mfd/cirrus,cs48l32.yaml

Same comment as for pinctrl patch.

> +
> +  and defines for values used in these bindings:
> +
> +    include/dt-bindings/sound/cs48l32.h
> +
> +  The properties are all contained in the parent MFD node.
> +
> +properties:

Missing compatible. What's the point to organize bindings like that? The
schema on its own does nothing - does not match anything.

> +  '#sound-dai-cells':
> +    const: 1
> +
> +  cirrus,in-type:
> +    description:
> +      A list of input type settings for each input. A maximum of 8 cells,
> +      with four cells per input in the order INnL_1, INnR_1 INnL_2 INnR_2.
> +      (where _1 and _2 are the alternative mux selections for that INn).
> +      If the array is shorter than the number of inputs the unspecified
> +      inputs default to CS48L32_IN_TYPE_DIFF.
> +    $ref: "/schemas/types.yaml#/definitions/uint32-matrix"

Drop quotes.

> +    minItems: 1
> +    maxItems: 8
> +    items:
> +      items:
> +        - description:
> +            The first cell is INnL_1 input type. One of the CS48L32_IN_TYPE_xxx.
> +            For non-muxed inputs this sets the type of INnL.

What is the "input type"? Referring to constants is not enough,
especially that they are not descriptive. Explain here the values.

> +            minimum: 0
> +            maximum: 1
> +        - description:
> +            The second cell is INnR_1 input type. One of the CS48L32_IN_TYPE_xxx.
> +            For non-muxed inputs this sets the type of INnR.
> +            minimum: 0
> +            maximum: 1
> +        - description:
> +            The third cell is INnL_2 input type. One of the CS48L32_IN_TYPE_xxx.
> +            For non-muxed inputs this cell must be 0.
> +            minimum: 0
> +            maximum: 1
> +        - description:
> +            The fourth cell is INnR_2 input type. One of the CS48L32_IN_TYPE_xxx.
> +            For non-muxed inputs this cell must be 0.
> +            minimum: 0
> +            maximum: 1
> +
> +  cirrus,max-channels-clocked:
> +    description:
> +      Maximum number of channels that clocks will be generated for. When using
> +      multiple data lines, every sample slot can transfer multiple channels
> +      (one per data line). This pdata sets the maximum number of slots.
> +      One cell for each ASP, use a value of zero for ASPs that should be
> +      handled normally.
> +    $ref: /schemas/types.yaml#/definitions/uint32-array
> +    minItems: 1
> +    maxItems: 4
> +    items:
> +      default: 0
> +
> +  cirrus,pdm-sup:
> +    description:
> +      Indicates how the MICBIAS pins have been externally connected to DMICs
> +      on each input. One cell per input (IN1, IN2, ...). One of the
> +      CS48L32_MICBIAS_xxx values.
> +      See the INn_PDM_SUP field in the datasheet for a description.

No, explain here.

> +    $ref: /schemas/types.yaml#/definitions/uint32-array
> +    minItems: 1
> +    maxItems: 4
> +
> +examples:
> +  - |
> +        cs48l32@0 {

Node names should be generic.
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation

> +                compatible = "cirrus,cs48l32";
> +

Use 4 spaces for example indentation.

> +                cirrus,in-type = <
> +                        CS48L32_IN_TYPE_DIFF CS48L32_IN_TYPE_DIFF /* IN1[LR]_1 differential */
> +                        CS48L32_IN_TYPE_SE   CS48L32_IN_TYPE_SE   /* IN1[LR]_2 single-ended */
> +                        CS48L32_IN_TYPE_DIFF CS48L32_IN_TYPE_DIFF /* IN2[LR]_1 differential */
> +                >;
> +                cirrus,max-channels-clocked = <2 0 0>;
> +        };
> diff --git a/include/dt-bindings/sound/cs48l32.h b/include/dt-bindings/sound/cs48l32.h
> new file mode 100644
> index 000000000000..0b774da0a6c8
> --- /dev/null
> +++ b/include/dt-bindings/sound/cs48l32.h
> @@ -0,0 +1,25 @@
> +/* SPDX-License-Identifier: GPL-2.0-only */

Dual license.

> +/*
> + * Device Tree defines for CS48L32 codec.
> + *
> + * Copyright (C) 2016-2018, 2022 Cirrus Logic, Inc. and
> + *               Cirrus Logic International Semiconductor Ltd.
> + */
> +
> +#ifndef DT_BINDINGS_SOUND_CS48L32_H
> +#define DT_BINDINGS_SOUND_CS48L32_H
> +
> +#define CS48L32_IN_TYPE_DIFF		0
> +#define CS48L32_IN_TYPE_SE		1
> +
> +#define CS48L32_PDM_SUP_VOUT_MIC	0
> +#define CS48L32_PDM_SUP_MICBIAS1	1
> +#define CS48L32_PDM_SUP_MICBIAS2	2
> +#define CS48L32_PDM_SUP_MICBIAS3	3
> +
> +#define CS48L32_PDM_FMT_MODE_A_LSB_FIRST	0x0000
> +#define CS48L32_PDM_FMT_MODE_B_LSB_FIRST	0x4000
> +#define CS48L32_PDM_FMT_MODE_A_MSB_FIRST	0x8000
> +#define CS48L32_PDM_FMT_MODE_B_MSB_FIRST	0xc000

Register values do not belong to bindings.

> +
> +#endif

Best regards,
Krzysztof
Richard Fitzgerald Nov. 14, 2022, 11 a.m. UTC | #5
On 14/11/2022 08:45, Krzysztof Kozlowski wrote:
> On 09/11/2022 17:53, Richard Fitzgerald wrote:
>> Codecs in this family have multiple digital and analog audio I/O that
>> support a variety of external hardware connections and configurations.
>>
>> Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
>> ---
>>   .../bindings/sound/cirrus,cs48l32.yaml        | 96 +++++++++++++++++++
>>   include/dt-bindings/sound/cs48l32.h           | 25 +++++
>>   2 files changed, 121 insertions(+)
>>   create mode 100644 Documentation/devicetree/bindings/sound/cirrus,cs48l32.yaml
>>   create mode 100644 include/dt-bindings/sound/cs48l32.h
>>
>> diff --git a/Documentation/devicetree/bindings/sound/cirrus,cs48l32.yaml b/Documentation/devicetree/bindings/sound/cirrus,cs48l32.yaml
>> new file mode 100644
>> index 000000000000..70fb294c6dc1
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/sound/cirrus,cs48l32.yaml
>> @@ -0,0 +1,96 @@
>> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/sound/cirrus,cs48l32.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Cirrus Logic CS48L31/32/33 audio CODECs
>> +
>> +maintainers:
>> +  - patches@opensource.cirrus.com
>> +
>> +description: |
>> +  This describes audio configuration bindings for these codecs.
> 
> Don't start with "This". Instead describe the hardware.
> 
>> +
>> +  See also the core bindings for the parent MFD driver:
>> +
>> +    Documentation/devicetree/bindings/mfd/cirrus,cs48l32.yaml
> 
> Same comment as for pinctrl patch.
> 
>> +
>> +  and defines for values used in these bindings:
>> +
>> +    include/dt-bindings/sound/cs48l32.h
>> +
>> +  The properties are all contained in the parent MFD node.
>> +
>> +properties:
> 
> Missing compatible. What's the point to organize bindings like that? The
> schema on its own does nothing - does not match anything.

Do you mean child drivers should not share the MFD node? Or do you mean
that if they share the MFD node all the child driver bindings should be
documented in the MFD schema instead of having a sub-schema for each
class of hardware functionality?

I'm certainly willing to collapse all the bindings into a single MFD
schema yaml. For this driver we followed the same structure that was
accepted for madera (and there was some discussion when we upstreamed
madera about how the bindings should be organized which resulted in
them being changed). We pretty much assumed that the safe bet was to do
the same that was accepted by the maintainer last time around.
Krzysztof Kozlowski Nov. 14, 2022, 11:03 a.m. UTC | #6
On 14/11/2022 12:00, Richard Fitzgerald wrote:
> On 14/11/2022 08:45, Krzysztof Kozlowski wrote:
>> On 09/11/2022 17:53, Richard Fitzgerald wrote:
>>> Codecs in this family have multiple digital and analog audio I/O that
>>> support a variety of external hardware connections and configurations.
>>>
>>> Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
>>> ---
>>>   .../bindings/sound/cirrus,cs48l32.yaml        | 96 +++++++++++++++++++
>>>   include/dt-bindings/sound/cs48l32.h           | 25 +++++
>>>   2 files changed, 121 insertions(+)
>>>   create mode 100644 Documentation/devicetree/bindings/sound/cirrus,cs48l32.yaml
>>>   create mode 100644 include/dt-bindings/sound/cs48l32.h
>>>
>>> diff --git a/Documentation/devicetree/bindings/sound/cirrus,cs48l32.yaml b/Documentation/devicetree/bindings/sound/cirrus,cs48l32.yaml
>>> new file mode 100644
>>> index 000000000000..70fb294c6dc1
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/sound/cirrus,cs48l32.yaml
>>> @@ -0,0 +1,96 @@
>>> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
>>> +%YAML 1.2
>>> +---
>>> +$id: http://devicetree.org/schemas/sound/cirrus,cs48l32.yaml#
>>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>>> +
>>> +title: Cirrus Logic CS48L31/32/33 audio CODECs
>>> +
>>> +maintainers:
>>> +  - patches@opensource.cirrus.com
>>> +
>>> +description: |
>>> +  This describes audio configuration bindings for these codecs.
>>
>> Don't start with "This". Instead describe the hardware.
>>
>>> +
>>> +  See also the core bindings for the parent MFD driver:
>>> +
>>> +    Documentation/devicetree/bindings/mfd/cirrus,cs48l32.yaml
>>
>> Same comment as for pinctrl patch.
>>
>>> +
>>> +  and defines for values used in these bindings:
>>> +
>>> +    include/dt-bindings/sound/cs48l32.h
>>> +
>>> +  The properties are all contained in the parent MFD node.
>>> +
>>> +properties:
>>
>> Missing compatible. What's the point to organize bindings like that? The
>> schema on its own does nothing - does not match anything.
> 
> Do you mean child drivers should not share the MFD node? Or do you mean
> that if they share the MFD node all the child driver bindings should be
> documented in the MFD schema instead of having a sub-schema for each
> class of hardware functionality?

I mean, that regular binding has a compatible which allows the schema to
be matched.

Splitting parts from top-level properties is used only for re-usable
shared/common schemas, which does not seem the case here.

> 
> I'm certainly willing to collapse all the bindings into a single MFD
> schema yaml. For this driver we followed the same structure that was
> accepted for madera (and there was some discussion when we upstreamed
> madera about how the bindings should be organized which resulted in
> them being changed). We pretty much assumed that the safe bet was to do
> the same that was accepted by the maintainer last time around.

Just merge it with MFD binding.

Best regards,
Krzysztof
Richard Fitzgerald Nov. 14, 2022, 12:34 p.m. UTC | #7
On 14/11/2022 11:03, Krzysztof Kozlowski wrote:
> On 14/11/2022 12:00, Richard Fitzgerald wrote:
>> On 14/11/2022 08:45, Krzysztof Kozlowski wrote:
>>> On 09/11/2022 17:53, Richard Fitzgerald wrote:
>>>> Codecs in this family have multiple digital and analog audio I/O that
>>>> support a variety of external hardware connections and configurations.
>>>>
>>>> Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
>>>> ---
>>>>    .../bindings/sound/cirrus,cs48l32.yaml        | 96 +++++++++++++++++++
>>>>    include/dt-bindings/sound/cs48l32.h           | 25 +++++
>>>>    2 files changed, 121 insertions(+)
>>>>    create mode 100644 Documentation/devicetree/bindings/sound/cirrus,cs48l32.yaml
>>>>    create mode 100644 include/dt-bindings/sound/cs48l32.h
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/sound/cirrus,cs48l32.yaml b/Documentation/devicetree/bindings/sound/cirrus,cs48l32.yaml
>>>> new file mode 100644
>>>> index 000000000000..70fb294c6dc1
>>>> --- /dev/null
>>>> +++ b/Documentation/devicetree/bindings/sound/cirrus,cs48l32.yaml
>>>> @@ -0,0 +1,96 @@
>>>> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
>>>> +%YAML 1.2
>>>> +---
>>>> +$id: http://devicetree.org/schemas/sound/cirrus,cs48l32.yaml#
>>>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>>>> +
>>>> +title: Cirrus Logic CS48L31/32/33 audio CODECs
>>>> +
>>>> +maintainers:
>>>> +  - patches@opensource.cirrus.com
>>>> +
>>>> +description: |
>>>> +  This describes audio configuration bindings for these codecs.
>>>
>>> Don't start with "This". Instead describe the hardware.
>>>
>>>> +
>>>> +  See also the core bindings for the parent MFD driver:
>>>> +
>>>> +    Documentation/devicetree/bindings/mfd/cirrus,cs48l32.yaml
>>>
>>> Same comment as for pinctrl patch.
>>>
>>>> +
>>>> +  and defines for values used in these bindings:
>>>> +
>>>> +    include/dt-bindings/sound/cs48l32.h
>>>> +
>>>> +  The properties are all contained in the parent MFD node.
>>>> +
>>>> +properties:
>>>
>>> Missing compatible. What's the point to organize bindings like that? The
>>> schema on its own does nothing - does not match anything.
>>
>> Do you mean child drivers should not share the MFD node? Or do you mean
>> that if they share the MFD node all the child driver bindings should be
>> documented in the MFD schema instead of having a sub-schema for each
>> class of hardware functionality?
> 
> I mean, that regular binding has a compatible which allows the schema to
> be matched.
> 
> Splitting parts from top-level properties is used only for re-usable
> shared/common schemas, which does not seem the case here.
> 

Ok, that's good. None of these drivers are re-useable standalone.
I'll squash the bindings all into MFD schema for V2.

>>
>> I'm certainly willing to collapse all the bindings into a single MFD
>> schema yaml. For this driver we followed the same structure that was
>> accepted for madera (and there was some discussion when we upstreamed
>> madera about how the bindings should be organized which resulted in
>> them being changed). We pretty much assumed that the safe bet was to do
>> the same that was accepted by the maintainer last time around.
> 
> Just merge it with MFD binding.
> 
> Best regards,
> Krzysztof
>
Mark Brown Nov. 23, 2022, 1:11 p.m. UTC | #8
On Wed, 9 Nov 2022 16:53:19 +0000, Richard Fitzgerald wrote:
> The CS48L32 is a high-performance low-power audio DSP for smartphones
> and other portable audio devices. It has various digital audio I/O,
> a programmable Halo Core DSP, fixed-function audio processors,
> configurable GPIO and microphone bias regulators.
> 
> The CS48L31 and CS48L33 were derivatives of the CS48L32.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[10/12] ASoC: wm_adsp: Allow client to hook into pre_run callback
        commit: fe07130870c8540bc0cddbaa8d4521ecdba6b560

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark