.. | .. |
---|
1 | | -// SPDX-License-Identifier: GPL-2.0 |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
2 | 2 | /* |
---|
3 | 3 | * I2C bus interface to Cirrus Logic Madera codecs |
---|
4 | 4 | * |
---|
5 | 5 | * 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. |
---|
10 | 6 | */ |
---|
11 | 7 | |
---|
12 | 8 | #include <linux/device.h> |
---|
.. | .. |
---|
39 | 35 | type = id->driver_data; |
---|
40 | 36 | |
---|
41 | 37 | 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; |
---|
42 | 44 | case CS47L35: |
---|
43 | 45 | if (IS_ENABLED(CONFIG_MFD_CS47L35)) { |
---|
44 | 46 | regmap_16bit_config = &cs47l35_16bit_i2c_regmap; |
---|
.. | .. |
---|
59 | 61 | regmap_32bit_config = &cs47l90_32bit_i2c_regmap; |
---|
60 | 62 | } |
---|
61 | 63 | 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; |
---|
62 | 72 | default: |
---|
63 | 73 | dev_err(&i2c->dev, |
---|
64 | 74 | "Unknown Madera I2C device type %ld\n", type); |
---|
.. | .. |
---|
77 | 87 | madera = devm_kzalloc(&i2c->dev, sizeof(*madera), GFP_KERNEL); |
---|
78 | 88 | if (!madera) |
---|
79 | 89 | return -ENOMEM; |
---|
80 | | - |
---|
81 | 90 | |
---|
82 | 91 | madera->regmap = devm_regmap_init_i2c(i2c, regmap_16bit_config); |
---|
83 | 92 | if (IS_ERR(madera->regmap)) { |
---|
.. | .. |
---|
113 | 122 | } |
---|
114 | 123 | |
---|
115 | 124 | static const struct i2c_device_id madera_i2c_id[] = { |
---|
| 125 | + { "cs47l15", CS47L15 }, |
---|
116 | 126 | { "cs47l35", CS47L35 }, |
---|
117 | 127 | { "cs47l85", CS47L85 }, |
---|
118 | 128 | { "cs47l90", CS47L90 }, |
---|
119 | 129 | { "cs47l91", CS47L91 }, |
---|
| 130 | + { "cs42l92", CS42L92 }, |
---|
| 131 | + { "cs47l92", CS47L92 }, |
---|
| 132 | + { "cs47l93", CS47L93 }, |
---|
120 | 133 | { "wm1840", WM1840 }, |
---|
121 | 134 | { } |
---|
122 | 135 | }; |
---|