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

Merge remote-tracking branches 'asoc/topic/cs4265', 'asoc/topic/cs4271',...

Merge remote-tracking branches 'asoc/topic/cs4265', 'asoc/topic/cs4271', 'asoc/topic/cs42l51' and 'asoc/topic/cs42l73' into asoc-next
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -36,7 +36,8 @@ config SND_EP93XX_SOC_EDB93XX
	tristate "SoC Audio support for Cirrus Logic EDB93xx boards"
	depends on SND_EP93XX_SOC && (MACH_EDB9301 || MACH_EDB9302 || MACH_EDB9302A || MACH_EDB9307A || MACH_EDB9315A)
	select SND_EP93XX_SOC_I2S
	select SND_SOC_CS4271
	select SND_SOC_CS4271_I2C if I2C
	select SND_SOC_CS4271_SPI if SPI_MASTER
	help
	  Say Y or M here if you want to add support for I2S audio on the
	  Cirrus Logic EDB93xx boards.
+17 −4
Original line number Diff line number Diff line
@@ -50,7 +50,8 @@ config SND_SOC_ALL_CODECS
	select SND_SOC_CS42L73 if I2C
	select SND_SOC_CS4265 if I2C
	select SND_SOC_CS4270 if I2C
	select SND_SOC_CS4271 if SND_SOC_I2C_AND_SPI
	select SND_SOC_CS4271_I2C if I2C
	select SND_SOC_CS4271_SPI if SPI_MASTER
	select SND_SOC_CS42XX8_I2C if I2C
	select SND_SOC_CX20442 if TTY
	select SND_SOC_DA7210 if I2C
@@ -337,7 +338,8 @@ config SND_SOC_CS42L51
	tristate

config SND_SOC_CS42L51_I2C
	tristate
	tristate "Cirrus Logic CS42L51 CODEC (I2C)"
	depends on I2C
	select SND_SOC_CS42L51

config SND_SOC_CS42L52
@@ -371,8 +373,19 @@ config SND_SOC_CS4270_VD33_ERRATA
	depends on SND_SOC_CS4270

config SND_SOC_CS4271
	tristate "Cirrus Logic CS4271 CODEC"
	depends on SND_SOC_I2C_AND_SPI
	tristate

config SND_SOC_CS4271_I2C
	tristate "Cirrus Logic CS4271 CODEC (I2C)"
	depends on I2C
	select SND_SOC_CS4271
	select REGMAP_I2C

config SND_SOC_CS4271_SPI
	tristate "Cirrus Logic CS4271 CODEC (SPI)"
	depends on SPI_MASTER
	select SND_SOC_CS4271
	select REGMAP_SPI

config SND_SOC_CS42XX8
	tristate
+4 −0
Original line number Diff line number Diff line
@@ -41,6 +41,8 @@ snd-soc-cs42l73-objs := cs42l73.o
snd-soc-cs4265-objs := cs4265.o
snd-soc-cs4270-objs := cs4270.o
snd-soc-cs4271-objs := cs4271.o
snd-soc-cs4271-i2c-objs := cs4271-i2c.o
snd-soc-cs4271-spi-objs := cs4271-spi.o
snd-soc-cs42xx8-objs := cs42xx8.o
snd-soc-cs42xx8-i2c-objs := cs42xx8-i2c.o
snd-soc-cx20442-objs := cx20442.o
@@ -217,6 +219,8 @@ obj-$(CONFIG_SND_SOC_CS42L73) += snd-soc-cs42l73.o
obj-$(CONFIG_SND_SOC_CS4265)	+= snd-soc-cs4265.o
obj-$(CONFIG_SND_SOC_CS4270)	+= snd-soc-cs4270.o
obj-$(CONFIG_SND_SOC_CS4271)	+= snd-soc-cs4271.o
obj-$(CONFIG_SND_SOC_CS4271_I2C)	+= snd-soc-cs4271-i2c.o
obj-$(CONFIG_SND_SOC_CS4271_SPI)	+= snd-soc-cs4271-spi.o
obj-$(CONFIG_SND_SOC_CS42XX8)	+= snd-soc-cs42xx8.o
obj-$(CONFIG_SND_SOC_CS42XX8_I2C) += snd-soc-cs42xx8-i2c.o
obj-$(CONFIG_SND_SOC_CX20442)	+= snd-soc-cx20442.o
+0 −2
Original line number Diff line number Diff line
@@ -32,7 +32,6 @@
#include "cs4265.h"

struct cs4265_private {
	struct device *dev;
	struct regmap *regmap;
	struct gpio_desc *reset_gpio;
	u8 format;
@@ -598,7 +597,6 @@ static int cs4265_i2c_probe(struct i2c_client *i2c_client,
			       GFP_KERNEL);
	if (cs4265 == NULL)
		return -ENOMEM;
	cs4265->dev = &i2c_client->dev;

	cs4265->regmap = devm_regmap_init_i2c(i2c_client, &cs4265_regmap);
	if (IS_ERR(cs4265->regmap)) {
+62 −0
Original line number Diff line number Diff line
/*
 * CS4271 I2C audio driver
 *
 * Copyright (c) 2010 Alexander Sverdlin <subaparts@yandex.ru>
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

#include <linux/module.h>
#include <linux/i2c.h>
#include <linux/regmap.h>
#include <sound/soc.h>
#include "cs4271.h"

static int cs4271_i2c_probe(struct i2c_client *client,
			     const struct i2c_device_id *id)
{
	struct regmap_config config;

	config = cs4271_regmap_config;
	config.reg_bits = 8;
	config.val_bits = 8;

	return cs4271_probe(&client->dev,
			    devm_regmap_init_i2c(client, &config));
}

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

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

static struct i2c_driver cs4271_i2c_driver = {
	.driver = {
		.name = "cs4271",
		.owner = THIS_MODULE,
		.of_match_table = of_match_ptr(cs4271_dt_ids),
	},
	.probe = cs4271_i2c_probe,
	.remove = cs4271_i2c_remove,
	.id_table = cs4271_i2c_id,
};
module_i2c_driver(cs4271_i2c_driver);

MODULE_DESCRIPTION("ASoC CS4271 I2C Driver");
MODULE_AUTHOR("Alexander Sverdlin <subaparts@yandex.ru>");
MODULE_LICENSE("GPL");
Loading