wm8737.c (020abf03cd659388f94cb328e1e1df0656e0d7ff) wm8737.c (53a5a83d24d8ee9567bfcbaf3b37ca5a00ab16a9)
1/*
2 * wm8737.c -- WM8737 ALSA SoC Audio driver
3 *
4 * Copyright 2010 Wolfson Microelectronics plc
5 *
6 * Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
7 *
8 * This program is free software; you can redistribute it and/or modify

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

15#include <linux/init.h>
16#include <linux/delay.h>
17#include <linux/pm.h>
18#include <linux/i2c.h>
19#include <linux/platform_device.h>
20#include <linux/regulator/consumer.h>
21#include <linux/spi/spi.h>
22#include <linux/slab.h>
1/*
2 * wm8737.c -- WM8737 ALSA SoC Audio driver
3 *
4 * Copyright 2010 Wolfson Microelectronics plc
5 *
6 * Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
7 *
8 * This program is free software; you can redistribute it and/or modify

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

15#include <linux/init.h>
16#include <linux/delay.h>
17#include <linux/pm.h>
18#include <linux/i2c.h>
19#include <linux/platform_device.h>
20#include <linux/regulator/consumer.h>
21#include <linux/spi/spi.h>
22#include <linux/slab.h>
23#include <linux/of_device.h>
23#include <sound/core.h>
24#include <sound/pcm.h>
25#include <sound/pcm_params.h>
26#include <sound/soc.h>
27#include <sound/soc-dapm.h>
28#include <sound/initval.h>
29#include <sound/tlv.h>
30

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

629 .resume = wm8737_resume,
630 .set_bias_level = wm8737_set_bias_level,
631
632 .reg_cache_size = WM8737_REGISTER_COUNT - 1, /* Skip reset */
633 .reg_word_size = sizeof(u16),
634 .reg_cache_default = wm8737_reg,
635};
636
24#include <sound/core.h>
25#include <sound/pcm.h>
26#include <sound/pcm_params.h>
27#include <sound/soc.h>
28#include <sound/soc-dapm.h>
29#include <sound/initval.h>
30#include <sound/tlv.h>
31

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

630 .resume = wm8737_resume,
631 .set_bias_level = wm8737_set_bias_level,
632
633 .reg_cache_size = WM8737_REGISTER_COUNT - 1, /* Skip reset */
634 .reg_word_size = sizeof(u16),
635 .reg_cache_default = wm8737_reg,
636};
637
638static const struct of_device_id wm8737_of_match[] = {
639 { .compatible = "wlf,wm8737", },
640 { }
641};
642
643MODULE_DEVICE_TABLE(of, wm8737_of_match);
644
637#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
638static __devinit int wm8737_i2c_probe(struct i2c_client *i2c,
639 const struct i2c_device_id *id)
640{
641 struct wm8737_priv *wm8737;
642 int ret;
643
644 wm8737 = kzalloc(sizeof(struct wm8737_priv), GFP_KERNEL);

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

668 { }
669};
670MODULE_DEVICE_TABLE(i2c, wm8737_i2c_id);
671
672static struct i2c_driver wm8737_i2c_driver = {
673 .driver = {
674 .name = "wm8737",
675 .owner = THIS_MODULE,
645#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
646static __devinit int wm8737_i2c_probe(struct i2c_client *i2c,
647 const struct i2c_device_id *id)
648{
649 struct wm8737_priv *wm8737;
650 int ret;
651
652 wm8737 = kzalloc(sizeof(struct wm8737_priv), GFP_KERNEL);

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

676 { }
677};
678MODULE_DEVICE_TABLE(i2c, wm8737_i2c_id);
679
680static struct i2c_driver wm8737_i2c_driver = {
681 .driver = {
682 .name = "wm8737",
683 .owner = THIS_MODULE,
684 .of_match_table = wm8737_of_match,
676 },
677 .probe = wm8737_i2c_probe,
678 .remove = __devexit_p(wm8737_i2c_remove),
679 .id_table = wm8737_i2c_id,
680};
681#endif
682
683#if defined(CONFIG_SPI_MASTER)

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

706 kfree(spi_get_drvdata(spi));
707 return 0;
708}
709
710static struct spi_driver wm8737_spi_driver = {
711 .driver = {
712 .name = "wm8737",
713 .owner = THIS_MODULE,
685 },
686 .probe = wm8737_i2c_probe,
687 .remove = __devexit_p(wm8737_i2c_remove),
688 .id_table = wm8737_i2c_id,
689};
690#endif
691
692#if defined(CONFIG_SPI_MASTER)

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

715 kfree(spi_get_drvdata(spi));
716 return 0;
717}
718
719static struct spi_driver wm8737_spi_driver = {
720 .driver = {
721 .name = "wm8737",
722 .owner = THIS_MODULE,
723 .of_match_table = wm8737_of_match,
714 },
715 .probe = wm8737_spi_probe,
716 .remove = __devexit_p(wm8737_spi_remove),
717};
718#endif /* CONFIG_SPI_MASTER */
719
720static int __init wm8737_modinit(void)
721{

--- 33 unchanged lines hidden ---
724 },
725 .probe = wm8737_spi_probe,
726 .remove = __devexit_p(wm8737_spi_remove),
727};
728#endif /* CONFIG_SPI_MASTER */
729
730static int __init wm8737_modinit(void)
731{

--- 33 unchanged lines hidden ---