Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-only
0002 /*
0003  * ADAV801 audio driver
0004  *
0005  * Copyright 2014 Analog Devices Inc.
0006  */
0007 
0008 #include <linux/module.h>
0009 #include <linux/spi/spi.h>
0010 #include <linux/regmap.h>
0011 
0012 #include <sound/soc.h>
0013 
0014 #include "adav80x.h"
0015 
0016 static const struct spi_device_id adav80x_spi_id[] = {
0017     { "adav801", 0 },
0018     { }
0019 };
0020 MODULE_DEVICE_TABLE(spi, adav80x_spi_id);
0021 
0022 static int adav80x_spi_probe(struct spi_device *spi)
0023 {
0024     struct regmap_config config;
0025 
0026     config = adav80x_regmap_config;
0027     config.read_flag_mask = 0x01;
0028 
0029     return adav80x_bus_probe(&spi->dev, devm_regmap_init_spi(spi, &config));
0030 }
0031 
0032 static struct spi_driver adav80x_spi_driver = {
0033     .driver = {
0034         .name   = "adav801",
0035     },
0036     .probe      = adav80x_spi_probe,
0037     .id_table   = adav80x_spi_id,
0038 };
0039 module_spi_driver(adav80x_spi_driver);
0040 
0041 MODULE_DESCRIPTION("ASoC ADAV801 driver");
0042 MODULE_AUTHOR("Lars-Peter Clausen <lars@metafoo.de>");
0043 MODULE_AUTHOR("Yi Li <yi.li@analog.com>>");
0044 MODULE_LICENSE("GPL");