x86/speculation/mds: Fix documentation typo
[linux/fpc-iii.git] / sound / soc / codecs / pcm3168a-spi.c
blob03945a27ae405aa14de8df9e91ca65e4d7eaa9ee
1 /*
2 * PCM3168A codec spi driver
4 * Copyright (C) 2015 Imagination Technologies Ltd.
6 * Author: Damien Horsley <Damien.Horsley@imgtec.com>
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms and conditions of the GNU General Public License,
10 * version 2, as published by the Free Software Foundation.
13 #include <linux/init.h>
14 #include <linux/module.h>
15 #include <linux/spi/spi.h>
17 #include <sound/soc.h>
19 #include "pcm3168a.h"
21 static int pcm3168a_spi_probe(struct spi_device *spi)
23 struct regmap *regmap;
25 regmap = devm_regmap_init_spi(spi, &pcm3168a_regmap);
26 if (IS_ERR(regmap))
27 return PTR_ERR(regmap);
29 return pcm3168a_probe(&spi->dev, regmap);
32 static int pcm3168a_spi_remove(struct spi_device *spi)
34 pcm3168a_remove(&spi->dev);
36 return 0;
39 static const struct spi_device_id pcm3168a_spi_id[] = {
40 { "pcm3168a", },
41 { },
43 MODULE_DEVICE_TABLE(spi, pcm3168a_spi_id);
45 static const struct of_device_id pcm3168a_of_match[] = {
46 { .compatible = "ti,pcm3168a", },
47 { }
49 MODULE_DEVICE_TABLE(of, pcm3168a_of_match);
51 static struct spi_driver pcm3168a_spi_driver = {
52 .probe = pcm3168a_spi_probe,
53 .remove = pcm3168a_spi_remove,
54 .id_table = pcm3168a_spi_id,
55 .driver = {
56 .name = "pcm3168a",
57 .of_match_table = pcm3168a_of_match,
58 .pm = &pcm3168a_pm_ops,
61 module_spi_driver(pcm3168a_spi_driver);
63 MODULE_DESCRIPTION("PCM3168A SPI codec driver");
64 MODULE_AUTHOR("Damien Horsley <Damien.Horsley@imgtec.com>");
65 MODULE_LICENSE("GPL v2");