#include #include #include #include "pcm1863.h" static int pcm1863_i2c_probe(struct i2c_client *i2c, const struct i2c_device_id *id) { struct regmap *regmap; struct regmap_config config = pcm1863_regmap; config.read_flag_mask = 0x80; config.write_flag_mask = 0x80; regmap = devm_regmap_init_i2c(i2c, &config); if (IS_ERR(regmap)) return PTR_ERR(regmap); return pcm1863_probe(&i2c->dev, regmap); } static int pcm1863_i2c_remove(struct i2c_client *i2c) { pcm1863_remove(&i2c->dev); return 0; } static const struct i2c_device_id pcm1863_i2c_id[] = { { "pcm1863", }, { } }; MODULE_DEVICE_TABLE(i2c, pcm1863_i2c_id); /*static const struct of_device_id pcm1863_of_match[] = { { .compatible = "ti,pcm1863", }, { } }; MODULE_DEVICE_TABLE(of, pcm1863_of_match);*/ static struct i2c_driver pcm1863_i2c_driver = { .probe = pcm1863_i2c_probe, .remove = pcm1863_i2c_remove, .id_table = pcm1863_i2c_id, .driver = { .name = "pcm1863", .of_match_table = pcm1863_of_match, .pm = &pcm1863_pm_ops, }, }; module_i2c_driver(pcm1863_i2c_driver); MODULE_DESCRIPTION("ASoC pcm1863 codec driver - I2C"); MODULE_AUTHOR("Dummy Name "); MODULE_LICENSE("GPL v2");