dt-bindings: sound: adau1372: Add bindings documentation
Subsystems (4)
PATCH v2 1/2 dt-bindings: sound: adau1372: Add bindings documentation
Add device tree binding documentation for Analog Devices ADAU1372.
---
Changes in v2:
- Added Rob's reviewed-by
.../bindings/sound/adi,adau1372.yaml | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/adi,adau1372.yaml
Documentation/devicetree/bindings/sound/adi,adau1372.yaml new file +67 -0
@@ -0,0 +1,67 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/adi,adau1372.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + + +title: Analog Devices ADAU1372 CODEC + +maintainers: + - Alexandre Belloni <[email protected]> + +description: | + Analog Devices ADAU1372 four inputs and two outputs codec. + https://www.analog.com/media/en/technical-documentation/data-sheets/ADAU1372.pdf + +properties: + compatible: + enum: + - adi,adau1372 + + reg: + maxItems: 1 + + "#sound-dai-cells": + const: 0 + + clocks: + maxItems: 1 + + clock-names: + const: "mclk" + + powerdown-gpios: + description: GPIO used for hardware power-down. + maxItems: 1 + +required: + - "#sound-dai-cells" + - compatible + - reg + - clocks + - clock-names + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + audio-codec@3c { + compatible = "adi,adau1372"; + reg = <0x3c>; + #sound-dai-cells = <0>; + clock-names = "mclk"; + clocks = <&adau1372z_xtal>; + }; + }; + + adau1372z_xtal: clock { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <12288000>; + }; +... +
Signature · 1 line
2.28.0
PATCH v2 2/2 ASoC: Add ADAU1372 audio CODEC support
From: Lars-Peter Clausen <[email protected]>
Add support for the Analog Devices ADAU1372 audio CODEC.
---
Changes in v2:
- Fix Microphone bias
sound/soc/codecs/Kconfig | 16 + sound/soc/codecs/Makefile | 6 + sound/soc/codecs/adau1372-i2c.c | 40 ++ sound/soc/codecs/adau1372-spi.c | 58 ++ sound/soc/codecs/adau1372.c | 1062 +++++++++++++++++++++++++++++++ sound/soc/codecs/adau1372.h | 21 + 6 files changed, 1203 insertions(+) create mode 100644 sound/soc/codecs/adau1372-i2c.c create mode 100644 sound/soc/codecs/adau1372-spi.c create mode 100644 sound/soc/codecs/adau1372.c create mode 100644 sound/soc/codecs/adau1372.h
sound/soc/codecs/Kconfig +16 -0
@@ -23,6 +23,8 @@ config SND_SOC_ALL_CODECS imply SND_SOC_AD193X_I2C imply SND_SOC_AD1980 imply SND_SOC_AD73311 + imply SND_SOC_ADAU1372_I2C + imply SND_SOC_ADAU1372_SPI imply SND_SOC_ADAU1373 imply SND_SOC_ADAU1761_I2C imply SND_SOC_ADAU1761_SPI
@@ -363,6 +365,20 @@ config SND_SOC_AD73311 config SND_SOC_ADAU_UTILS tristate +config SND_SOC_ADAU1372 + tristate + select SND_SOC_ADAU_UTILS + +config SND_SOC_ADAU1372_I2C + tristate "Analog Devices ADAU1372 CODEC (I2C)" + select SND_SOC_ADAU1372 + select REGMAP_I2C + +config SND_SOC_ADAU1372_SPI + tristate "Analog Devices ADAU1372 CODEC (SPI)" + select SND_SOC_ADAU1372 + select REGMAP_SPI + config SND_SOC_ADAU1373 tristate depends on I2C
sound/soc/codecs/Makefile +6 -0
@@ -9,6 +9,9 @@ snd-soc-ad193x-i2c-objs := ad193x-i2c.o snd-soc-ad1980-objs := ad1980.o snd-soc-ad73311-objs := ad73311.o snd-soc-adau-utils-objs := adau-utils.o +snd-soc-adau1372-objs := adau1372.o +snd-soc-adau1372-i2c-objs := adau1372-i2c.o +snd-soc-adau1372-spi-objs := adau1372-spi.o snd-soc-adau1373-objs := adau1373.o snd-soc-adau1701-objs := adau1701.o snd-soc-adau17x1-objs := adau17x1.o
@@ -316,6 +319,9 @@ obj-$(CONFIG_SND_SOC_AD193X_I2C) += snd-soc-ad193x-i2c.o obj-$(CONFIG_SND_SOC_AD1980) += snd-soc-ad1980.o obj-$(CONFIG_SND_SOC_AD73311) += snd-soc-ad73311.o obj-$(CONFIG_SND_SOC_ADAU_UTILS) += snd-soc-adau-utils.o +obj-$(CONFIG_SND_SOC_ADAU1372) += snd-soc-adau1372.o +obj-$(CONFIG_SND_SOC_ADAU1372_I2C) += snd-soc-adau1372-i2c.o +obj-$(CONFIG_SND_SOC_ADAU1372_SPI) += snd-soc-adau1372-spi.o obj-$(CONFIG_SND_SOC_ADAU1373) += snd-soc-adau1373.o obj-$(CONFIG_SND_SOC_ADAU1701) += snd-soc-adau1701.o obj-$(CONFIG_SND_SOC_ADAU17X1) += snd-soc-adau17x1.o
sound/soc/codecs/adau1372-i2c.c new file +40 -0
@@ -0,0 +1,40 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* +* Driver for ADAU1372 codec +* +* Copyright 2016 Analog Devices Inc. +* Author: Lars-Peter Clausen <[email protected]> +*/ + +#include <linux/i2c.h> +#include <linux/mod_devicetable.h> +#include <linux/module.h> +#include <linux/regmap.h> +#include <sound/soc.h> + +#include "adau1372.h" + +static int adau1372_i2c_probe (struct i2c_client *client,const struct i2c_device_id *id) +{ +return adau1372_probe (&client->dev, +devm_regmap_init_i2c (client, &adau1372_regmap_config),NULL ); +} + +static const struct i2c_device_id adau1372_i2c_ids[] = { + {"adau1372" ,0 }, + { } +}; +MODULE_DEVICE_TABLE (i2c, adau1372_i2c_ids); + +static struct i2c_driver adau1372_i2c_driver = { + .driver = { + .name ="adau1372" , + }, + .probe = adau1372_i2c_probe, + .id_table = adau1372_i2c_ids, +}; +module_i2c_driver (adau1372_i2c_driver); + +MODULE_DESCRIPTION ("ASoC ADAU1372 CODEC I2C driver" ); +MODULE_AUTHOR ("Lars-Peter Clausen <[email protected]>" ); +MODULE_LICENSE ("GPL v2" );
sound/soc/codecs/adau1372-spi.c new file +58 -0
58 lines not on this page · raw message
sound/soc/codecs/adau1372.c new file +1062 -0
1,062 lines not on this page · raw message
sound/soc/codecs/adau1372.h new file +21 -0
@@ -0,0 +1,21 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* +* ADAU1372 driver +* +* Copyright 2016 Analog Devices Inc. +* Author: Lars-Peter Clausen <[email protected]> +*/ + +#ifndef SOUND_SOC_CODECS_ADAU1372_H +#define SOUND_SOC_CODECS_ADAU1372_H + +#include <linux/regmap.h> + +struct device ; + +int adau1372_probe (struct device *dev,struct regmap *regmap, +void (*switch_mode)(struct device *dev)); + +extern const struct regmap_config adau1372_regmap_config; + +#endif
Signature · 1 line
2.28.0
Mark Brown
maintainerQuoted 1 line · Alexandre Belloni
Add device tree binding documentation for Analog Devices ADAU1372.
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/2] ASoC: adau1372: Add bindings documentation
commit: 32025c7c50c602a6c0bc3bef0e9a774003e2e7ae
[2/2] ASoC: Add ADAU1372 audio CODEC support
commit: 6cd4c6459e47402ab90802eca61a18b231434053All 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