2 * wm8804-spi.c -- WM8804 S/PDIF transceiver driver - SPI
4 * Copyright 2015 Cirrus Logic Inc
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
13 #include <linux/init.h>
14 #include <linux/module.h>
15 #include <linux/spi/spi.h>
19 static int wm8804_spi_probe(struct spi_device *spi)
21 struct regmap *regmap;
23 regmap = devm_regmap_init_spi(spi, &wm8804_regmap_config);
25 return PTR_ERR(regmap);
27 return wm8804_probe(&spi->dev, regmap);
30 static int wm8804_spi_remove(struct spi_device *spi)
32 wm8804_remove(&spi->dev);
36 static const struct of_device_id wm8804_of_match[] = {
37 { .compatible = "wlf,wm8804", },
40 MODULE_DEVICE_TABLE(of, wm8804_of_match);
42 static struct spi_driver wm8804_spi_driver = {
46 .of_match_table = wm8804_of_match,
48 .probe = wm8804_spi_probe,
49 .remove = wm8804_spi_remove
52 module_spi_driver(wm8804_spi_driver);
54 MODULE_DESCRIPTION("ASoC WM8804 driver - SPI");
56 MODULE_LICENSE("GPL");