Linux 4.19-rc7
[linux-2.6/btrfs-unstable.git] / sound / soc / codecs / adav801.c
blobd82f79dd1b38bec258947002abda6f13d96ed454
1 /*
2 * ADAV801 audio driver
4 * Copyright 2014 Analog Devices Inc.
6 * Licensed under the GPL-2.
7 */
9 #include <linux/module.h>
10 #include <linux/spi/spi.h>
11 #include <linux/regmap.h>
13 #include <sound/soc.h>
15 #include "adav80x.h"
17 static const struct spi_device_id adav80x_spi_id[] = {
18 { "adav801", 0 },
19 { }
21 MODULE_DEVICE_TABLE(spi, adav80x_spi_id);
23 static int adav80x_spi_probe(struct spi_device *spi)
25 struct regmap_config config;
27 config = adav80x_regmap_config;
28 config.read_flag_mask = 0x01;
30 return adav80x_bus_probe(&spi->dev, devm_regmap_init_spi(spi, &config));
33 static struct spi_driver adav80x_spi_driver = {
34 .driver = {
35 .name = "adav801",
37 .probe = adav80x_spi_probe,
38 .id_table = adav80x_spi_id,
40 module_spi_driver(adav80x_spi_driver);
42 MODULE_DESCRIPTION("ASoC ADAV801 driver");
43 MODULE_AUTHOR("Lars-Peter Clausen <lars@metafoo.de>");
44 MODULE_AUTHOR("Yi Li <yi.li@analog.com>>");
45 MODULE_LICENSE("GPL");