1 // SPDX-License-Identifier: GPL-2.0-only << 2 /* 1 /* 3 * ADAV803 audio driver 2 * ADAV803 audio driver 4 * 3 * 5 * Copyright 2014 Analog Devices Inc. 4 * Copyright 2014 Analog Devices Inc. >> 5 * >> 6 * Licensed under the GPL-2. 6 */ 7 */ 7 8 8 #include <linux/module.h> 9 #include <linux/module.h> 9 #include <linux/i2c.h> 10 #include <linux/i2c.h> 10 #include <linux/regmap.h> 11 #include <linux/regmap.h> 11 12 12 #include <sound/soc.h> 13 #include <sound/soc.h> 13 14 14 #include "adav80x.h" 15 #include "adav80x.h" 15 16 16 static const struct i2c_device_id adav803_id[] 17 static const struct i2c_device_id adav803_id[] = { 17 { "adav803" }, !! 18 { "adav803", 0 }, 18 { } 19 { } 19 }; 20 }; 20 MODULE_DEVICE_TABLE(i2c, adav803_id); 21 MODULE_DEVICE_TABLE(i2c, adav803_id); 21 22 22 static int adav803_probe(struct i2c_client *cl !! 23 static int adav803_probe(struct i2c_client *client, >> 24 const struct i2c_device_id *id) 23 { 25 { 24 return adav80x_bus_probe(&client->dev, 26 return adav80x_bus_probe(&client->dev, 25 devm_regmap_init_i2c(client, & 27 devm_regmap_init_i2c(client, &adav80x_regmap_config)); 26 } 28 } 27 29 >> 30 static int adav803_remove(struct i2c_client *client) >> 31 { >> 32 snd_soc_unregister_codec(&client->dev); >> 33 return 0; >> 34 } >> 35 28 static struct i2c_driver adav803_driver = { 36 static struct i2c_driver adav803_driver = { 29 .driver = { 37 .driver = { 30 .name = "adav803", 38 .name = "adav803", 31 }, 39 }, 32 .probe = adav803_probe, 40 .probe = adav803_probe, >> 41 .remove = adav803_remove, 33 .id_table = adav803_id, 42 .id_table = adav803_id, 34 }; 43 }; 35 module_i2c_driver(adav803_driver); 44 module_i2c_driver(adav803_driver); 36 45 37 MODULE_DESCRIPTION("ASoC ADAV803 driver"); 46 MODULE_DESCRIPTION("ASoC ADAV803 driver"); 38 MODULE_AUTHOR("Lars-Peter Clausen <lars@metafo 47 MODULE_AUTHOR("Lars-Peter Clausen <lars@metafoo.de>"); 39 MODULE_AUTHOR("Yi Li <yi.li@analog.com>>"); 48 MODULE_AUTHOR("Yi Li <yi.li@analog.com>>"); 40 MODULE_LICENSE("GPL"); 49 MODULE_LICENSE("GPL"); 41 50
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.