Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a32eb702 authored by Mark Brown's avatar Mark Brown
Browse files

Merge remote-tracking branch 'asoc/topic/adav80x' into asoc-adau1977

parents e479d85c 0c2d6964
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -47,7 +47,8 @@ config SND_SOC_BFIN_EVAL_ADAV80X
	tristate "Support for the EVAL-ADAV80X boards on Blackfin eval boards"
	depends on SND_BF5XX_I2S && (SPI_MASTER || I2C)
	select SND_BF5XX_SOC_I2S
	select SND_SOC_ADAV80X
	select SND_SOC_ADAV801 if SPI_MASTER
	select SND_SOC_ADAV803 if I2C
	help
	  Say Y if you want to add support for the Analog Devices EVAL-ADAV801 or
	  EVAL-ADAV803 board connected to one of the Blackfin evaluation boards
+10 −1
Original line number Diff line number Diff line
@@ -22,7 +22,8 @@ config SND_SOC_ALL_CODECS
	select SND_SOC_AD1980 if SND_SOC_AC97_BUS
	select SND_SOC_AD73311
	select SND_SOC_ADAU1373 if I2C
	select SND_SOC_ADAV80X if SND_SOC_I2C_AND_SPI
	select SND_SOC_ADAV801 if SPI_MASTER
	select SND_SOC_ADAV803 if I2C
	select SND_SOC_ADAU1701 if I2C
	select SND_SOC_ADS117X
	select SND_SOC_AK4104 if SPI_MASTER
@@ -202,6 +203,14 @@ config SND_SOC_ADAU1373
config SND_SOC_ADAV80X
	tristate

config SND_SOC_ADAV801
	tristate
	select SND_SOC_ADAV80X

config SND_SOC_ADAV803
	tristate
	select SND_SOC_ADAV80X

config SND_SOC_ADS117X
	tristate

+4 −0
Original line number Diff line number Diff line
@@ -8,6 +8,8 @@ snd-soc-ad73311-objs := ad73311.o
snd-soc-adau1701-objs := adau1701.o
snd-soc-adau1373-objs := adau1373.o
snd-soc-adav80x-objs := adav80x.o
snd-soc-adav801-objs := adav801.o
snd-soc-adav803-objs := adav803.o
snd-soc-ads117x-objs := ads117x.o
snd-soc-ak4104-objs := ak4104.o
snd-soc-ak4535-objs := ak4535.o
@@ -139,6 +141,8 @@ obj-$(CONFIG_SND_SOC_AD73311) += snd-soc-ad73311.o
obj-$(CONFIG_SND_SOC_ADAU1373)	+= snd-soc-adau1373.o
obj-$(CONFIG_SND_SOC_ADAU1701)  += snd-soc-adau1701.o
obj-$(CONFIG_SND_SOC_ADAV80X)  += snd-soc-adav80x.o
obj-$(CONFIG_SND_SOC_ADAV801)  += snd-soc-adav801.o
obj-$(CONFIG_SND_SOC_ADAV803)  += snd-soc-adav803.o
obj-$(CONFIG_SND_SOC_ADS117X)	+= snd-soc-ads117x.o
obj-$(CONFIG_SND_SOC_AK4104)	+= snd-soc-ak4104.o
obj-$(CONFIG_SND_SOC_AK4535)	+= snd-soc-ak4535.o
+53 −0
Original line number Diff line number Diff line
/*
 * ADAV801 audio driver
 *
 * Copyright 2014 Analog Devices Inc.
 *
 * Licensed under the GPL-2.
 */

#include <linux/module.h>
#include <linux/spi/spi.h>
#include <linux/regmap.h>

#include <sound/soc.h>

#include "adav80x.h"

static const struct spi_device_id adav80x_spi_id[] = {
	{ "adav801", 0 },
	{ }
};
MODULE_DEVICE_TABLE(spi, adav80x_spi_id);

static int adav80x_spi_probe(struct spi_device *spi)
{
	struct regmap_config config;

	config = adav80x_regmap_config;
	config.read_flag_mask = 0x01;

	return adav80x_bus_probe(&spi->dev, devm_regmap_init_spi(spi, &config));
}

static int adav80x_spi_remove(struct spi_device *spi)
{
	snd_soc_unregister_codec(&spi->dev);
	return 0;
}

static struct spi_driver adav80x_spi_driver = {
	.driver = {
		.name	= "adav801",
		.owner	= THIS_MODULE,
	},
	.probe		= adav80x_spi_probe,
	.remove		= adav80x_spi_remove,
	.id_table	= adav80x_spi_id,
};
module_spi_driver(adav80x_spi_driver);

MODULE_DESCRIPTION("ASoC ADAV801 driver");
MODULE_AUTHOR("Lars-Peter Clausen <lars@metafoo.de>");
MODULE_AUTHOR("Yi Li <yi.li@analog.com>>");
MODULE_LICENSE("GPL");
+50 −0
Original line number Diff line number Diff line
/*
 * ADAV803 audio driver
 *
 * Copyright 2014 Analog Devices Inc.
 *
 * Licensed under the GPL-2.
 */

#include <linux/module.h>
#include <linux/i2c.h>
#include <linux/regmap.h>

#include <sound/soc.h>

#include "adav80x.h"

static const struct i2c_device_id adav803_id[] = {
	{ "adav803", 0 },
	{ }
};
MODULE_DEVICE_TABLE(i2c, adav803_id);

static int adav803_probe(struct i2c_client *client,
			     const struct i2c_device_id *id)
{
	return adav80x_bus_probe(&client->dev,
		devm_regmap_init_i2c(client, &adav80x_regmap_config));
}

static int adav803_remove(struct i2c_client *client)
{
	snd_soc_unregister_codec(&client->dev);
	return 0;
}

static struct i2c_driver adav803_driver = {
	.driver = {
		.name = "adav803",
		.owner = THIS_MODULE,
	},
	.probe = adav803_probe,
	.remove = adav803_remove,
	.id_table = adav803_id,
};
module_i2c_driver(adav803_driver);

MODULE_DESCRIPTION("ASoC ADAV803 driver");
MODULE_AUTHOR("Lars-Peter Clausen <lars@metafoo.de>");
MODULE_AUTHOR("Yi Li <yi.li@analog.com>>");
MODULE_LICENSE("GPL");
Loading