Unverified Commit 5c5c69e9 authored by Mark Brown's avatar Mark Brown
Browse files

ASoC: wm8731: Overhaul of the driver

Merge series from Mark Brown <broonie@kernel.org>:

This series contains a bunch of fairly minor changes which overhaul and
modernise the WM8731 driver, there should be no impact on the driver's
functionality.
parents 5f6c3f90 64a1a4e0
Loading
Loading
Loading
Loading
+97 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/wlf,wm8731.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Wolfson Microelectromics WM8731 audio CODEC

maintainers:
  - patches@opensource.cirrus.com

description: |
  Wolfson Microelectronics WM8731 audio CODEC

  Pins on the device (for linking into audio routes):
    * LOUT: Left Channel Line Output
    * ROUT: Right Channel Line Output
    * LHPOUT: Left Channel Headphone Output
    * RHPOUT: Right Channel Headphone Output
    * LLINEIN: Left Channel Line Input
    * RLINEIN: Right Channel Line Input
    * MICIN: Microphone Input

properties:
  compatible:
    enum:
      - wlf,wm8731

  reg:
    maxItems: 1

  "#sound-dai-cells":
    const: 0

  clocks:
    description: Clock provider for MCLK pin.
    maxItems: 1

  clock-names:
    items:
      - const: mclk

  AVDD-supply:
    description: Analog power supply regulator on the AVDD pin.

  HPVDD-supply:
    description: Headphone power supply regulator on the HPVDD pin.

  DBVDD-supply:
    description: Digital buffer supply regulator for the DBVDD pin.

  DCVDD-supply:
    description: Digital core supply regulator for the DCVDD pin.

  spi-max-frequency: true

additionalProperties: false

required:
  - reg
  - compatible
  - AVDD-supply
  - HPVDD-supply
  - DBVDD-supply
  - DCVDD-supply

examples:
  - |
    spi {
        #address-cells = <1>;
        #size-cells = <0>;
        wm8731_i2c: codec@0 {
            compatible = "wlf,wm8731";
            reg = <0>;
            spi-max-frequency = <12500000>;

            AVDD-supply = <&avdd_reg>;
            HPVDD-supply = <&hpvdd_reg>;
            DCVDD-supply = <&dcvdd_reg>;
            DBVDD-supply = <&dbvdd_reg>;
        };
    };
  - |

    i2c {
        #address-cells = <1>;
        #size-cells = <0>;
        wm8731_spi: codec@1b {
            compatible = "wlf,wm8731";
            reg = <0x1b>;

            AVDD-supply = <&avdd_reg>;
            HPVDD-supply = <&hpvdd_reg>;
            DCVDD-supply = <&dcvdd_reg>;
            DBVDD-supply = <&dbvdd_reg>;
        };
    };
+0 −27
Original line number Diff line number Diff line
WM8731 audio CODEC

This device supports both I2C and SPI (configured with pin strapping
on the board).

Required properties:

  - compatible : "wlf,wm8731"

  - reg : the I2C address of the device for I2C, the chip select
          number for SPI.

Example:

wm8731: codec@1a {
	compatible = "wlf,wm8731";
	reg = <0x1a>;
};

Available audio endpoints for an audio-routing table:
 * LOUT: Left Channel Line Output
 * ROUT: Right Channel Line Output
 * LHPOUT: Left Channel Headphone Output
 * RHPOUT: Right Channel Headphone Output
 * LLINEIN: Left Channel Line Input
 * RLINEIN: Right Channel Line Input
 * MICIN: Microphone Input
+2 −1
Original line number Diff line number Diff line
@@ -211,7 +211,8 @@ CONFIG_SND_ATMEL_SOC_WM8904=m
CONFIG_SND_AT91_SOC_SAM9X5_WM8731=m
CONFIG_SND_KIRKWOOD_SOC=y
CONFIG_SND_SOC_ALC5623=y
CONFIG_SND_SOC_WM8731=y
CONFIG_SND_SOC_WM8731_I2C=y
CONFIG_SND_SOC_WM8731_SPI=y
CONFIG_SND_SIMPLE_CARD=y
CONFIG_HID_DRAGONRISE=y
CONFIG_HID_GYRATION=y
+2 −2
Original line number Diff line number Diff line
@@ -42,9 +42,9 @@ config SND_ATMEL_SOC_SSC_DMA
config SND_AT91_SOC_SAM9G20_WM8731
	tristate "SoC Audio support for WM8731-based At91sam9g20 evaluation board"
	depends on ARCH_AT91 || COMPILE_TEST
	depends on ATMEL_SSC && SND_SOC_I2C_AND_SPI
	depends on ATMEL_SSC && I2C
	select SND_ATMEL_SOC_SSC_PDC
	select SND_SOC_WM8731
	select SND_SOC_WM8731_I2C
	help
	  Say Y if you want to add support for SoC audio on WM8731-based
	  AT91sam9g20 evaluation board.
+1 −1
Original line number Diff line number Diff line
@@ -58,7 +58,7 @@ config SND_SOC_DB1200
	select SND_SOC_AC97_CODEC
	select SND_SOC_WM9712
	select SND_SOC_AU1XPSC_I2S
	select SND_SOC_WM8731
	select SND_SOC_WM8731_I2C
	help
	  Select this option to enable audio (AC97 and I2S) on the
	  Alchemy/AMD/RMI/NetLogic Db1200, Db1550 and Db1300 evaluation boards.
Loading