ad1836.c (cf0dbba515415bb19b11f9323d5f7bebd7f24fd6) ad1836.c (b2c812e22de88bb79c290c0e718280f10b64a48d)
1/*
2 * File: sound/soc/codecs/ad1836.c
3 * Author: Barry Song <Barry.Song@analog.com>
4 *
5 * Created: Aug 04 2009
6 * Description: Driver for AD1836 sound chip
7 *
8 * Modified:
9 * Copyright 2009 Analog Devices Inc.
10 *
11 * Bugs: Enter bugs at http://blackfin.uclinux.org/
12 *
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
17 */
18
19#include <linux/init.h>
1/*
2 * File: sound/soc/codecs/ad1836.c
3 * Author: Barry Song <Barry.Song@analog.com>
4 *
5 * Created: Aug 04 2009
6 * Description: Driver for AD1836 sound chip
7 *
8 * Modified:
9 * Copyright 2009 Analog Devices Inc.
10 *
11 * Bugs: Enter bugs at http://blackfin.uclinux.org/
12 *
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
17 */
18
19#include <linux/init.h>
20#include <linux/slab.h>
21#include <linux/module.h>
22#include <linux/kernel.h>
23#include <linux/device.h>
24#include <sound/core.h>
25#include <sound/pcm.h>
26#include <sound/pcm_params.h>
27#include <sound/initval.h>
28#include <sound/soc.h>

--- 244 unchanged lines hidden (view full) ---

273 if (ad1836_codec) {
274 dev_err(codec->dev, "Another ad1836 is registered\n");
275 return -EINVAL;
276 }
277
278 mutex_init(&codec->mutex);
279 INIT_LIST_HEAD(&codec->dapm_widgets);
280 INIT_LIST_HEAD(&codec->dapm_paths);
20#include <linux/module.h>
21#include <linux/kernel.h>
22#include <linux/device.h>
23#include <sound/core.h>
24#include <sound/pcm.h>
25#include <sound/pcm_params.h>
26#include <sound/initval.h>
27#include <sound/soc.h>

--- 244 unchanged lines hidden (view full) ---

272 if (ad1836_codec) {
273 dev_err(codec->dev, "Another ad1836 is registered\n");
274 return -EINVAL;
275 }
276
277 mutex_init(&codec->mutex);
278 INIT_LIST_HEAD(&codec->dapm_widgets);
279 INIT_LIST_HEAD(&codec->dapm_paths);
281 codec->private_data = ad1836;
280 snd_soc_codec_set_drvdata(codec, ad1836);
282 codec->reg_cache = ad1836->reg_cache;
283 codec->reg_cache_size = AD1836_NUM_REGS;
284 codec->name = "AD1836";
285 codec->owner = THIS_MODULE;
286 codec->dai = &ad1836_dai;
287 codec->num_dai = 1;
288 INIT_LIST_HEAD(&codec->dapm_widgets);
289 INIT_LIST_HEAD(&codec->dapm_paths);

--- 130 unchanged lines hidden ---
281 codec->reg_cache = ad1836->reg_cache;
282 codec->reg_cache_size = AD1836_NUM_REGS;
283 codec->name = "AD1836";
284 codec->owner = THIS_MODULE;
285 codec->dai = &ad1836_dai;
286 codec->num_dai = 1;
287 INIT_LIST_HEAD(&codec->dapm_widgets);
288 INIT_LIST_HEAD(&codec->dapm_paths);

--- 130 unchanged lines hidden ---