ARM: dts: omap5: Add bus_dma_limit for L3 bus
[linux/fpc-iii.git] / sound / soc / codecs / ssm2602-i2c.c
blobafab81383d3ada182cabd577e3e32397b556b69d
1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3 * SSM2602/SSM2603/SSM2604 I2C audio driver
5 * Copyright 2014 Analog Devices Inc.
6 */
8 #include <linux/module.h>
9 #include <linux/i2c.h>
10 #include <linux/regmap.h>
12 #include <sound/soc.h>
14 #include "ssm2602.h"
17 * ssm2602 2 wire address is determined by GPIO5
18 * state during powerup.
19 * low = 0x1a
20 * high = 0x1b
22 static int ssm2602_i2c_probe(struct i2c_client *client,
23 const struct i2c_device_id *id)
25 return ssm2602_probe(&client->dev, id->driver_data,
26 devm_regmap_init_i2c(client, &ssm2602_regmap_config));
29 static const struct i2c_device_id ssm2602_i2c_id[] = {
30 { "ssm2602", SSM2602 },
31 { "ssm2603", SSM2602 },
32 { "ssm2604", SSM2604 },
33 { }
35 MODULE_DEVICE_TABLE(i2c, ssm2602_i2c_id);
37 static const struct of_device_id ssm2602_of_match[] = {
38 { .compatible = "adi,ssm2602", },
39 { .compatible = "adi,ssm2603", },
40 { .compatible = "adi,ssm2604", },
41 { }
43 MODULE_DEVICE_TABLE(of, ssm2602_of_match);
45 static struct i2c_driver ssm2602_i2c_driver = {
46 .driver = {
47 .name = "ssm2602",
48 .of_match_table = ssm2602_of_match,
50 .probe = ssm2602_i2c_probe,
51 .id_table = ssm2602_i2c_id,
53 module_i2c_driver(ssm2602_i2c_driver);
55 MODULE_DESCRIPTION("ASoC SSM2602/SSM2603/SSM2604 I2C driver");
56 MODULE_AUTHOR("Cliff Cai");
57 MODULE_LICENSE("GPL");