hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/mfd/madera-i2c.c
....@@ -1,12 +1,8 @@
1
-// SPDX-License-Identifier: GPL-2.0
1
+// SPDX-License-Identifier: GPL-2.0-only
22 /*
33 * I2C bus interface to Cirrus Logic Madera codecs
44 *
55 * Copyright (C) 2015-2018 Cirrus Logic
6
- *
7
- * This program is free software; you can redistribute it and/or modify
8
- * it under the terms of the GNU General Public License as published by the
9
- * Free Software Foundation; version 2.
106 */
117
128 #include <linux/device.h>
....@@ -39,6 +35,12 @@
3935 type = id->driver_data;
4036
4137 switch (type) {
38
+ case CS47L15:
39
+ if (IS_ENABLED(CONFIG_MFD_CS47L15)) {
40
+ regmap_16bit_config = &cs47l15_16bit_i2c_regmap;
41
+ regmap_32bit_config = &cs47l15_32bit_i2c_regmap;
42
+ }
43
+ break;
4244 case CS47L35:
4345 if (IS_ENABLED(CONFIG_MFD_CS47L35)) {
4446 regmap_16bit_config = &cs47l35_16bit_i2c_regmap;
....@@ -59,6 +61,14 @@
5961 regmap_32bit_config = &cs47l90_32bit_i2c_regmap;
6062 }
6163 break;
64
+ case CS42L92:
65
+ case CS47L92:
66
+ case CS47L93:
67
+ if (IS_ENABLED(CONFIG_MFD_CS47L92)) {
68
+ regmap_16bit_config = &cs47l92_16bit_i2c_regmap;
69
+ regmap_32bit_config = &cs47l92_32bit_i2c_regmap;
70
+ }
71
+ break;
6272 default:
6373 dev_err(&i2c->dev,
6474 "Unknown Madera I2C device type %ld\n", type);
....@@ -77,7 +87,6 @@
7787 madera = devm_kzalloc(&i2c->dev, sizeof(*madera), GFP_KERNEL);
7888 if (!madera)
7989 return -ENOMEM;
80
-
8190
8291 madera->regmap = devm_regmap_init_i2c(i2c, regmap_16bit_config);
8392 if (IS_ERR(madera->regmap)) {
....@@ -113,10 +122,14 @@
113122 }
114123
115124 static const struct i2c_device_id madera_i2c_id[] = {
125
+ { "cs47l15", CS47L15 },
116126 { "cs47l35", CS47L35 },
117127 { "cs47l85", CS47L85 },
118128 { "cs47l90", CS47L90 },
119129 { "cs47l91", CS47L91 },
130
+ { "cs42l92", CS42L92 },
131
+ { "cs47l92", CS47L92 },
132
+ { "cs47l93", CS47L93 },
120133 { "wm1840", WM1840 },
121134 { }
122135 };