14 #include <linux/module.h>
15 #include <linux/slab.h>
16 #include <linux/i2c.h>
78 {
"ADC",
NULL,
"WM1250 Input" },
79 {
"WM1250 Output",
NULL,
"DAC" },
121 .hw_params = wm1250_ev1_hw_params,
124 #define WM1250_EV1_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000 |\
125 SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_64000)
128 .name =
"wm1250-ev1",
130 .stream_name =
"Playback",
137 .stream_name =
"Capture",
143 .ops = &wm1250_ev1_ops,
147 .dapm_widgets = wm1250_ev1_dapm_widgets,
148 .num_dapm_widgets =
ARRAY_SIZE(wm1250_ev1_dapm_widgets),
149 .dapm_routes = wm1250_ev1_dapm_routes,
150 .num_dapm_routes =
ARRAY_SIZE(wm1250_ev1_dapm_routes),
152 .set_bias_level = wm1250_ev1_set_bias_level,
153 .idle_bias_off =
true,
167 dev_err(&i2c->
dev,
"Unable to allocate private data\n");
174 wm1250->
gpios[
i].label = wm1250_gpio_names[
i];
182 dev_err(&i2c->
dev,
"Failed to get GPIOs: %d\n", ret);
194 static void wm1250_ev1_free(
struct i2c_client *i2c)
211 dev_err(&i2c->
dev,
"Failed to read ID: %d\n", board);
215 id = (board & 0xfe) >> 2;
219 dev_err(&i2c->
dev,
"Unknown board ID %d\n",
id);
232 dev_err(&i2c->
dev,
"Failed to register CODEC: %d\n", ret);
233 wm1250_ev1_free(i2c);
243 wm1250_ev1_free(i2c);
254 static struct i2c_driver wm1250_ev1_i2c_driver = {
256 .name =
"wm1250-ev1",
259 .probe = wm1250_ev1_probe,
261 .id_table = wm1250_ev1_i2c_id,