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

TOMOYO Linux Cross Reference
Linux/sound/soc/codecs/ads117x.c

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ 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.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /sound/soc/codecs/ads117x.c (Version linux-6.12-rc7) and /sound/soc/codecs/ads117x.c (Version linux-6.11.7)


  1 // SPDX-License-Identifier: GPL-2.0-or-later        1 // SPDX-License-Identifier: GPL-2.0-or-later
  2 /*                                                  2 /*
  3  * ads117x.c  --  Driver for ads1174/8 ADC chi      3  * ads117x.c  --  Driver for ads1174/8 ADC chips
  4  *                                                  4  *
  5  * Copyright 2009 ShotSpotter Inc.                  5  * Copyright 2009 ShotSpotter Inc.
  6  * Author: Graeme Gregory <gg@slimlogic.co.uk>      6  * Author: Graeme Gregory <gg@slimlogic.co.uk>
  7  */                                                 7  */
  8                                                     8 
  9 #include <linux/kernel.h>                           9 #include <linux/kernel.h>
 10 #include <linux/slab.h>                            10 #include <linux/slab.h>
 11 #include <linux/init.h>                            11 #include <linux/init.h>
 12 #include <linux/device.h>                          12 #include <linux/device.h>
 13 #include <linux/module.h>                          13 #include <linux/module.h>
 14 #include <sound/core.h>                            14 #include <sound/core.h>
 15 #include <sound/pcm.h>                             15 #include <sound/pcm.h>
 16 #include <sound/initval.h>                         16 #include <sound/initval.h>
 17 #include <sound/soc.h>                             17 #include <sound/soc.h>
 18                                                    18 
 19 #include <linux/of.h>                              19 #include <linux/of.h>
 20                                                    20 
 21 #define ADS117X_RATES (SNDRV_PCM_RATE_8000_480     21 #define ADS117X_RATES (SNDRV_PCM_RATE_8000_48000)
 22 #define ADS117X_FORMATS (SNDRV_PCM_FMTBIT_S16_     22 #define ADS117X_FORMATS (SNDRV_PCM_FMTBIT_S16_LE)
 23                                                    23 
 24 static const struct snd_soc_dapm_widget ads117     24 static const struct snd_soc_dapm_widget ads117x_dapm_widgets[] = {
 25 SND_SOC_DAPM_INPUT("Input1"),                      25 SND_SOC_DAPM_INPUT("Input1"),
 26 SND_SOC_DAPM_INPUT("Input2"),                      26 SND_SOC_DAPM_INPUT("Input2"),
 27 SND_SOC_DAPM_INPUT("Input3"),                      27 SND_SOC_DAPM_INPUT("Input3"),
 28 SND_SOC_DAPM_INPUT("Input4"),                      28 SND_SOC_DAPM_INPUT("Input4"),
 29 SND_SOC_DAPM_INPUT("Input5"),                      29 SND_SOC_DAPM_INPUT("Input5"),
 30 SND_SOC_DAPM_INPUT("Input6"),                      30 SND_SOC_DAPM_INPUT("Input6"),
 31 SND_SOC_DAPM_INPUT("Input7"),                      31 SND_SOC_DAPM_INPUT("Input7"),
 32 SND_SOC_DAPM_INPUT("Input8"),                      32 SND_SOC_DAPM_INPUT("Input8"),
 33 };                                                 33 };
 34                                                    34 
 35 static const struct snd_soc_dapm_route ads117x     35 static const struct snd_soc_dapm_route ads117x_dapm_routes[] = {
 36         { "Capture", NULL, "Input1" },             36         { "Capture", NULL, "Input1" },
 37         { "Capture", NULL, "Input2" },             37         { "Capture", NULL, "Input2" },
 38         { "Capture", NULL, "Input3" },             38         { "Capture", NULL, "Input3" },
 39         { "Capture", NULL, "Input4" },             39         { "Capture", NULL, "Input4" },
 40         { "Capture", NULL, "Input5" },             40         { "Capture", NULL, "Input5" },
 41         { "Capture", NULL, "Input6" },             41         { "Capture", NULL, "Input6" },
 42         { "Capture", NULL, "Input7" },             42         { "Capture", NULL, "Input7" },
 43         { "Capture", NULL, "Input8" },             43         { "Capture", NULL, "Input8" },
 44 };                                                 44 };
 45                                                    45 
 46 static struct snd_soc_dai_driver ads117x_dai =     46 static struct snd_soc_dai_driver ads117x_dai = {
 47 /* ADC */                                          47 /* ADC */
 48         .name = "ads117x-hifi",                    48         .name = "ads117x-hifi",
 49         .capture = {                               49         .capture = {
 50                 .stream_name = "Capture",          50                 .stream_name = "Capture",
 51                 .channels_min = 1,                 51                 .channels_min = 1,
 52                 .channels_max = 32,                52                 .channels_max = 32,
 53                 .rates = ADS117X_RATES,            53                 .rates = ADS117X_RATES,
 54                 .formats = ADS117X_FORMATS,},      54                 .formats = ADS117X_FORMATS,},
 55 };                                                 55 };
 56                                                    56 
 57 static const struct snd_soc_component_driver s     57 static const struct snd_soc_component_driver soc_component_dev_ads117x = {
 58         .dapm_widgets           = ads117x_dapm     58         .dapm_widgets           = ads117x_dapm_widgets,
 59         .num_dapm_widgets       = ARRAY_SIZE(a     59         .num_dapm_widgets       = ARRAY_SIZE(ads117x_dapm_widgets),
 60         .dapm_routes            = ads117x_dapm     60         .dapm_routes            = ads117x_dapm_routes,
 61         .num_dapm_routes        = ARRAY_SIZE(a     61         .num_dapm_routes        = ARRAY_SIZE(ads117x_dapm_routes),
 62         .idle_bias_on           = 1,               62         .idle_bias_on           = 1,
 63         .use_pmdown_time        = 1,               63         .use_pmdown_time        = 1,
 64         .endianness             = 1,               64         .endianness             = 1,
 65 };                                                 65 };
 66                                                    66 
 67 static int ads117x_probe(struct platform_devic     67 static int ads117x_probe(struct platform_device *pdev)
 68 {                                                  68 {
 69         return devm_snd_soc_register_component     69         return devm_snd_soc_register_component(&pdev->dev,
 70                         &soc_component_dev_ads     70                         &soc_component_dev_ads117x, &ads117x_dai, 1);
 71 }                                                  71 }
 72                                                    72 
 73 #if defined(CONFIG_OF)                             73 #if defined(CONFIG_OF)
 74 static const struct of_device_id ads117x_dt_id     74 static const struct of_device_id ads117x_dt_ids[] = {
 75         { .compatible = "ti,ads1174" },            75         { .compatible = "ti,ads1174" },
 76         { .compatible = "ti,ads1178" },            76         { .compatible = "ti,ads1178" },
 77         { },                                       77         { },
 78 };                                                 78 };
 79 MODULE_DEVICE_TABLE(of, ads117x_dt_ids);           79 MODULE_DEVICE_TABLE(of, ads117x_dt_ids);
 80 #endif                                             80 #endif
 81                                                    81 
 82 static struct platform_driver ads117x_codec_dr     82 static struct platform_driver ads117x_codec_driver = {
 83         .driver = {                                83         .driver = {
 84                         .name = "ads117x-codec     84                         .name = "ads117x-codec",
 85                         .of_match_table = of_m     85                         .of_match_table = of_match_ptr(ads117x_dt_ids),
 86         },                                         86         },
 87                                                    87 
 88         .probe = ads117x_probe,                    88         .probe = ads117x_probe,
 89 };                                                 89 };
 90                                                    90 
 91 module_platform_driver(ads117x_codec_driver);      91 module_platform_driver(ads117x_codec_driver);
 92                                                    92 
 93 MODULE_DESCRIPTION("ASoC ads117x driver");         93 MODULE_DESCRIPTION("ASoC ads117x driver");
 94 MODULE_AUTHOR("Graeme Gregory");                   94 MODULE_AUTHOR("Graeme Gregory");
 95 MODULE_LICENSE("GPL");                             95 MODULE_LICENSE("GPL");
 96                                                    96 

~ [ 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