~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/sound/soc/codecs/wm8731-spi.c

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /sound/soc/codecs/wm8731-spi.c (Version linux-6.11-rc3) and /sound/soc/codecs/wm8731-spi.c (Version linux-6.2.16)


  1 // SPDX-License-Identifier: GPL-2.0-only            1 // SPDX-License-Identifier: GPL-2.0-only
  2 /*                                                  2 /*
  3  * wm8731.c  --  WM8731 ALSA SoC Audio driver       3  * wm8731.c  --  WM8731 ALSA SoC Audio driver
  4  *                                                  4  *
  5  * Copyright 2005 Openedhand Ltd.                   5  * Copyright 2005 Openedhand Ltd.
  6  * Copyright 2006-12 Wolfson Microelectronics,      6  * Copyright 2006-12 Wolfson Microelectronics, plc
  7  *                                                  7  *
  8  * Author: Richard Purdie <richard@openedhand.      8  * Author: Richard Purdie <richard@openedhand.com>
  9  *                                                  9  *
 10  * Based on wm8753.c by Liam Girdwood              10  * Based on wm8753.c by Liam Girdwood
 11  */                                                11  */
 12                                                    12 
 13 #include <linux/spi/spi.h>                         13 #include <linux/spi/spi.h>
 14 #include <linux/mod_devicetable.h>             << 
 15 #include <linux/module.h>                          14 #include <linux/module.h>
                                                   >>  15 #include <linux/of_device.h>
 16                                                    16 
 17 #include "wm8731.h"                                17 #include "wm8731.h"
 18                                                    18 
 19 static const struct of_device_id wm8731_of_mat     19 static const struct of_device_id wm8731_of_match[] = {
 20         { .compatible = "wlf,wm8731", },           20         { .compatible = "wlf,wm8731", },
 21         { }                                        21         { }
 22 };                                                 22 };
 23 MODULE_DEVICE_TABLE(of, wm8731_of_match);          23 MODULE_DEVICE_TABLE(of, wm8731_of_match);
 24                                                    24 
 25 static int wm8731_spi_probe(struct spi_device      25 static int wm8731_spi_probe(struct spi_device *spi)
 26 {                                                  26 {
 27         struct wm8731_priv *wm8731;                27         struct wm8731_priv *wm8731;
 28         int ret;                                   28         int ret;
 29                                                    29 
 30         wm8731 = devm_kzalloc(&spi->dev, sizeo     30         wm8731 = devm_kzalloc(&spi->dev, sizeof(*wm8731), GFP_KERNEL);
 31         if (wm8731 == NULL)                        31         if (wm8731 == NULL)
 32                 return -ENOMEM;                    32                 return -ENOMEM;
 33                                                    33 
 34         spi_set_drvdata(spi, wm8731);              34         spi_set_drvdata(spi, wm8731);
 35                                                    35 
 36         wm8731->regmap = devm_regmap_init_spi(     36         wm8731->regmap = devm_regmap_init_spi(spi, &wm8731_regmap);
 37         if (IS_ERR(wm8731->regmap)) {              37         if (IS_ERR(wm8731->regmap)) {
 38                 ret = PTR_ERR(wm8731->regmap);     38                 ret = PTR_ERR(wm8731->regmap);
 39                 dev_err(&spi->dev, "Failed to      39                 dev_err(&spi->dev, "Failed to allocate register map: %d\n",
 40                         ret);                      40                         ret);
 41                 return ret;                        41                 return ret;
 42         }                                          42         }
 43                                                    43 
 44         return wm8731_init(&spi->dev, wm8731);     44         return wm8731_init(&spi->dev, wm8731);
 45 }                                                  45 }
 46                                                    46 
 47 static struct spi_driver wm8731_spi_driver = {     47 static struct spi_driver wm8731_spi_driver = {
 48         .driver = {                                48         .driver = {
 49                 .name   = "wm8731",                49                 .name   = "wm8731",
 50                 .of_match_table = wm8731_of_ma     50                 .of_match_table = wm8731_of_match,
 51         },                                         51         },
 52         .probe          = wm8731_spi_probe,        52         .probe          = wm8731_spi_probe,
 53 };                                                 53 };
 54                                                    54 
 55 module_spi_driver(wm8731_spi_driver);              55 module_spi_driver(wm8731_spi_driver);
 56                                                    56 
 57 MODULE_DESCRIPTION("ASoC WM8731 driver - SPI")     57 MODULE_DESCRIPTION("ASoC WM8731 driver - SPI");
 58 MODULE_AUTHOR("Richard Purdie");                   58 MODULE_AUTHOR("Richard Purdie");
 59 MODULE_LICENSE("GPL");                             59 MODULE_LICENSE("GPL");
 60                                                    60 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php