Link: https://lore.kernel.org/r/20260217200002.683975158@linuxfoundation.org Tested-by: Florian Fainelli <florian.fainelli@broadcom.com> Tested-by: Takeshi Ogasawara <takeshi.ogasawara@futuring-girl.com> Tested-by: Peter Schneider <pschneider1968@googlemail.com> Tested-by: Jon Hunter <jonathanh@nvidia.com> Tested-by: Salvatore Bonaccorso <carnil@debian.org> Tested-by: Brett A C Sheffield <bacs@librecast.net> Tested-by: Mark Brown <broonie@kernel.org> Tested-by: Luna Jernberg <droidbittin@gmail.com> Tested-by: Ronald Warsow <rwarsow@gmx.de> Tested-by: Justin M. Forbes <jforbes@fedoraproject.org> Tested-by: Ron Economos <re@w6rz.net> Tested-by: Miguel Ojeda <ojeda@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
46 lines
1008 B
C
46 lines
1008 B
C
// SPDX-License-Identifier: GPL-2.0-only
|
|
/*
|
|
* ALSA SoC TLV320AIC23 codec driver SPI interface
|
|
*
|
|
* Author: Arun KS, <arunks@mistralsolutions.com>
|
|
* Copyright: (C) 2008 Mistral Solutions Pvt Ltd.,
|
|
*
|
|
* Based on sound/soc/codecs/wm8731.c by Richard Purdie
|
|
*/
|
|
|
|
#include <linux/module.h>
|
|
#include <linux/regmap.h>
|
|
#include <linux/spi/spi.h>
|
|
#include <sound/soc.h>
|
|
|
|
#include "tlv320aic23.h"
|
|
|
|
static int aic23_spi_probe(struct spi_device *spi)
|
|
{
|
|
int ret;
|
|
struct regmap *regmap;
|
|
|
|
dev_dbg(&spi->dev, "probing tlv320aic23 spi device\n");
|
|
|
|
spi->mode = SPI_MODE_0;
|
|
ret = spi_setup(spi);
|
|
if (ret < 0)
|
|
return ret;
|
|
|
|
regmap = devm_regmap_init_spi(spi, &tlv320aic23_regmap);
|
|
return tlv320aic23_probe(&spi->dev, regmap);
|
|
}
|
|
|
|
static struct spi_driver aic23_spi = {
|
|
.driver = {
|
|
.name = "tlv320aic23",
|
|
},
|
|
.probe = aic23_spi_probe,
|
|
};
|
|
|
|
module_spi_driver(aic23_spi);
|
|
|
|
MODULE_DESCRIPTION("ASoC TLV320AIC23 codec driver SPI");
|
|
MODULE_AUTHOR("Arun KS <arunks@mistralsolutions.com>");
|
|
MODULE_LICENSE("GPL");
|