Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(341)

Side by Side Diff: sound/soc/fsl/p1022_ds.c

Issue 6577007: CHROMIUM: ASoC: Import entire upstream ASoC tree (Closed)
Patch Set: Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sound/soc/fsl/mpc8610_hpcd.c ('k') | sound/soc/imx/eukrea-tlv320.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /** 1 /**
2 * Freescale P1022DS ALSA SoC Machine driver 2 * Freescale P1022DS ALSA SoC Machine driver
3 * 3 *
4 * Author: Timur Tabi <timur@freescale.com> 4 * Author: Timur Tabi <timur@freescale.com>
5 * 5 *
6 * Copyright 2010 Freescale Semiconductor, Inc. 6 * Copyright 2010 Freescale Semiconductor, Inc.
7 * 7 *
8 * This file is licensed under the terms of the GNU General Public License 8 * This file is licensed under the terms of the GNU General Public License
9 * version 2. This program is licensed "as is" without any warranty of any 9 * version 2. This program is licensed "as is" without any warranty of any
10 * kind, whether express or implied. 10 * kind, whether express or implied.
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 char platform_name[2][DAI_NAME_SIZE]; /* One for each DMA channel */ 78 char platform_name[2][DAI_NAME_SIZE]; /* One for each DMA channel */
79 }; 79 };
80 80
81 /** 81 /**
82 * p1022_ds_machine_probe: initialize the board 82 * p1022_ds_machine_probe: initialize the board
83 * 83 *
84 * This function is used to initialize the board-specific hardware. 84 * This function is used to initialize the board-specific hardware.
85 * 85 *
86 * Here we program the DMACR and PMUXCR registers. 86 * Here we program the DMACR and PMUXCR registers.
87 */ 87 */
88 static int p1022_ds_machine_probe(struct platform_device *sound_device) 88 static int p1022_ds_machine_probe(struct snd_soc_card *card)
89 { 89 {
90 struct snd_soc_card *card = platform_get_drvdata(sound_device);
91 struct machine_data *mdata = 90 struct machine_data *mdata =
92 container_of(card, struct machine_data, card); 91 container_of(card, struct machine_data, card);
93 struct ccsr_guts_85xx __iomem *guts; 92 struct ccsr_guts_85xx __iomem *guts;
94 93
95 guts = ioremap(guts_phys, sizeof(struct ccsr_guts_85xx)); 94 guts = ioremap(guts_phys, sizeof(struct ccsr_guts_85xx));
96 if (!guts) { 95 if (!guts) {
97 dev_err(card->dev, "could not map global utilities\n"); 96 dev_err(card->dev, "could not map global utilities\n");
98 return -ENOMEM; 97 return -ENOMEM;
99 } 98 }
100 99
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 152
154 return 0; 153 return 0;
155 } 154 }
156 155
157 /** 156 /**
158 * p1022_ds_machine_remove: Remove the sound device 157 * p1022_ds_machine_remove: Remove the sound device
159 * 158 *
160 * This function is called to remove the sound device for one SSI. We 159 * This function is called to remove the sound device for one SSI. We
161 * de-program the DMACR and PMUXCR register. 160 * de-program the DMACR and PMUXCR register.
162 */ 161 */
163 static int p1022_ds_machine_remove(struct platform_device *sound_device) 162 static int p1022_ds_machine_remove(struct snd_soc_card *card)
164 { 163 {
165 struct snd_soc_card *card = platform_get_drvdata(sound_device);
166 struct machine_data *mdata = 164 struct machine_data *mdata =
167 container_of(card, struct machine_data, card); 165 container_of(card, struct machine_data, card);
168 struct ccsr_guts_85xx __iomem *guts; 166 struct ccsr_guts_85xx __iomem *guts;
169 167
170 guts = ioremap(guts_phys, sizeof(struct ccsr_guts_85xx)); 168 guts = ioremap(guts_phys, sizeof(struct ccsr_guts_85xx));
171 if (!guts) { 169 if (!guts) {
172 dev_err(card->dev, "could not map global utilities\n"); 170 dev_err(card->dev, "could not map global utilities\n");
173 return -ENOMEM; 171 return -ENOMEM;
174 } 172 }
175 173
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 { 581 {
584 platform_driver_unregister(&p1022_ds_driver); 582 platform_driver_unregister(&p1022_ds_driver);
585 } 583 }
586 584
587 module_init(p1022_ds_init); 585 module_init(p1022_ds_init);
588 module_exit(p1022_ds_exit); 586 module_exit(p1022_ds_exit);
589 587
590 MODULE_AUTHOR("Timur Tabi <timur@freescale.com>"); 588 MODULE_AUTHOR("Timur Tabi <timur@freescale.com>");
591 MODULE_DESCRIPTION("Freescale P1022 DS ALSA SoC machine driver"); 589 MODULE_DESCRIPTION("Freescale P1022 DS ALSA SoC machine driver");
592 MODULE_LICENSE("GPL v2"); 590 MODULE_LICENSE("GPL v2");
OLDNEW
« no previous file with comments | « sound/soc/fsl/mpc8610_hpcd.c ('k') | sound/soc/imx/eukrea-tlv320.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698