Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge remote-tracking branch 'asoc/topic/ux500' into for-3.7

+292 -108
+39
Documentation/devicetree/bindings/sound/ux500-mop500.txt
··· 1 + * MOP500 Audio Machine Driver 2 + 3 + This node is responsible for linking together all ux500 Audio Driver components. 4 + 5 + Required properties: 6 + - compatible : "stericsson,snd-soc-mop500" 7 + 8 + Non-standard properties: 9 + - stericsson,cpu-dai : Phandle to the CPU-side DAI 10 + - stericsson,audio-codec : Phandle to the Audio CODEC 11 + - stericsson,card-name : Over-ride default card name 12 + 13 + Example: 14 + 15 + sound { 16 + compatible = "stericsson,snd-soc-mop500"; 17 + 18 + stericsson,cpu-dai = <&msp1 &msp3>; 19 + stericsson,audio-codec = <&codec>; 20 + }; 21 + 22 + msp1: msp@80124000 { 23 + compatible = "stericsson,ux500-msp-i2s"; 24 + reg = <0x80124000 0x1000>; 25 + interrupts = <0 62 0x4>; 26 + v-ape-supply = <&db8500_vape_reg>; 27 + }; 28 + 29 + msp3: msp@80125000 { 30 + compatible = "stericsson,ux500-msp-i2s"; 31 + reg = <0x80125000 0x1000>; 32 + interrupts = <0 62 0x4>; 33 + v-ape-supply = <&db8500_vape_reg>; 34 + }; 35 + 36 + codec: ab8500-codec { 37 + compatible = "stericsson,ab8500-codec"; 38 + stericsson,earpeice-cmv = <950>; /* Units in mV. */ 39 + };
+43
Documentation/devicetree/bindings/sound/ux500-msp.txt
··· 1 + * ux500 MSP (CPU-side Digital Audio Interface) 2 + 3 + Required properties: 4 + - compatible :"stericsson,ux500-msp-i2s" 5 + - reg : Physical base address and length of the device's registers. 6 + 7 + Optional properties: 8 + - interrupts : The interrupt output from the device. 9 + - interrupt-parent : The parent interrupt controller. 10 + - <name>-supply : Phandle to the regulator <name> supply 11 + 12 + Example: 13 + 14 + sound { 15 + compatible = "stericsson,snd-soc-mop500"; 16 + 17 + stericsson,platform-pcm-dma = <&pcm>; 18 + stericsson,cpu-dai = <&msp1 &msp3>; 19 + stericsson,audio-codec = <&codec>; 20 + }; 21 + 22 + pcm: ux500-pcm { 23 + compatible = "stericsson,ux500-pcm"; 24 + }; 25 + 26 + msp1: msp@80124000 { 27 + compatible = "stericsson,ux500-msp-i2s"; 28 + reg = <0x80124000 0x1000>; 29 + interrupts = <0 62 0x4>; 30 + v-ape-supply = <&db8500_vape_reg>; 31 + }; 32 + 33 + msp3: msp@80125000 { 34 + compatible = "stericsson,ux500-msp-i2s"; 35 + reg = <0x80125000 0x1000>; 36 + interrupts = <0 62 0x4>; 37 + v-ape-supply = <&db8500_vape_reg>; 38 + }; 39 + 40 + codec: ab8500-codec { 41 + compatible = "stericsson,ab8500-codec"; 42 + stericsson,earpeice-cmv = <950>; /* Units in mV. */ 43 + };
+1 -78
arch/arm/mach-ux500/board-mop500-msp.c
··· 7 7 #include <linux/platform_device.h> 8 8 #include <linux/init.h> 9 9 #include <linux/gpio.h> 10 - #include <linux/pinctrl/consumer.h> 11 10 12 11 #include <plat/gpio-nomadik.h> 13 12 #include <plat/pincfg.h> ··· 21 22 #include "board-mop500.h" 22 23 #include "devices-db8500.h" 23 24 #include "pins-db8500.h" 24 - 25 - /* MSP1/3 Tx/Rx usage protection */ 26 - static DEFINE_SPINLOCK(msp_rxtx_lock); 27 - 28 - /* Reference Count */ 29 - static int msp_rxtx_ref; 30 - 31 - /* Pin modes */ 32 - struct pinctrl *msp1_p; 33 - struct pinctrl_state *msp1_def; 34 - struct pinctrl_state *msp1_sleep; 35 - 36 - int msp13_i2s_init(void) 37 - { 38 - int retval = 0; 39 - unsigned long flags; 40 - 41 - spin_lock_irqsave(&msp_rxtx_lock, flags); 42 - if (msp_rxtx_ref == 0 && !(IS_ERR(msp1_p) || IS_ERR(msp1_def))) { 43 - retval = pinctrl_select_state(msp1_p, msp1_def); 44 - if (retval) 45 - pr_err("could not set MSP1 defstate\n"); 46 - } 47 - if (!retval) 48 - msp_rxtx_ref++; 49 - spin_unlock_irqrestore(&msp_rxtx_lock, flags); 50 - 51 - return retval; 52 - } 53 - 54 - int msp13_i2s_exit(void) 55 - { 56 - int retval = 0; 57 - unsigned long flags; 58 - 59 - spin_lock_irqsave(&msp_rxtx_lock, flags); 60 - WARN_ON(!msp_rxtx_ref); 61 - msp_rxtx_ref--; 62 - if (msp_rxtx_ref == 0 && !(IS_ERR(msp1_p) || IS_ERR(msp1_sleep))) { 63 - retval = pinctrl_select_state(msp1_p, msp1_sleep); 64 - if (retval) 65 - pr_err("could not set MSP1 sleepstate\n"); 66 - } 67 - spin_unlock_irqrestore(&msp_rxtx_lock, flags); 68 - 69 - return retval; 70 - } 71 25 72 26 static struct stedma40_chan_cfg msp0_dma_rx = { 73 27 .high_priority = true, ··· 84 132 .id = MSP_I2S_1, 85 133 .msp_i2s_dma_rx = NULL, 86 134 .msp_i2s_dma_tx = &msp1_dma_tx, 87 - .msp_i2s_init = msp13_i2s_init, 88 - .msp_i2s_exit = msp13_i2s_exit, 89 135 }; 90 136 91 137 static struct stedma40_chan_cfg msp2_dma_rx = { ··· 169 219 .id = MSP_I2S_3, 170 220 .msp_i2s_dma_rx = &msp1_dma_rx, 171 221 .msp_i2s_dma_tx = NULL, 172 - .msp_i2s_init = msp13_i2s_init, 173 - .msp_i2s_exit = msp13_i2s_exit, 174 222 }; 175 223 176 224 int mop500_msp_init(struct device *parent) 177 225 { 178 - struct platform_device *msp1; 179 - 180 226 pr_info("%s: Register platform-device 'snd-soc-mop500'.\n", __func__); 181 227 platform_device_register(&snd_soc_mop500); 182 228 183 229 pr_info("Initialize MSP I2S-devices.\n"); 184 230 db8500_add_msp_i2s(parent, 0, U8500_MSP0_BASE, IRQ_DB8500_MSP0, 185 231 &msp0_platform_data); 186 - msp1 = db8500_add_msp_i2s(parent, 1, U8500_MSP1_BASE, IRQ_DB8500_MSP1, 232 + db8500_add_msp_i2s(parent, 1, U8500_MSP1_BASE, IRQ_DB8500_MSP1, 187 233 &msp1_platform_data); 188 234 db8500_add_msp_i2s(parent, 2, U8500_MSP2_BASE, IRQ_DB8500_MSP2, 189 235 &msp2_platform_data); 190 236 db8500_add_msp_i2s(parent, 3, U8500_MSP3_BASE, IRQ_DB8500_MSP1, 191 237 &msp3_platform_data); 192 - 193 - /* Get the pinctrl handle for MSP1 */ 194 - if (msp1) { 195 - msp1_p = pinctrl_get(&msp1->dev); 196 - if (IS_ERR(msp1_p)) 197 - dev_err(&msp1->dev, "could not get MSP1 pinctrl\n"); 198 - else { 199 - msp1_def = pinctrl_lookup_state(msp1_p, 200 - PINCTRL_STATE_DEFAULT); 201 - if (IS_ERR(msp1_def)) { 202 - dev_err(&msp1->dev, 203 - "could not get MSP1 defstate\n"); 204 - } 205 - msp1_sleep = pinctrl_lookup_state(msp1_p, 206 - PINCTRL_STATE_SLEEP); 207 - if (IS_ERR(msp1_sleep)) 208 - dev_err(&msp1->dev, 209 - "could not get MSP1 idlestate\n"); 210 - } 211 - } 212 - 213 - pr_info("%s: Register platform-device 'ux500-pcm'\n", __func__); 214 - platform_device_register(&ux500_pcm); 215 238 216 239 return 0; 217 240 }
-2
arch/arm/mach-ux500/include/mach/msp.h
··· 22 22 enum msp_i2s_id id; 23 23 struct stedma40_chan_cfg *msp_i2s_dma_rx; 24 24 struct stedma40_chan_cfg *msp_i2s_dma_tx; 25 - int (*msp_i2s_init) (void); 26 - int (*msp_i2s_exit) (void); 27 25 }; 28 26 29 27 #endif
+4 -2
include/linux/mfd/abx500/ab8500-codec.h
··· 23 23 /* Mic-biases */ 24 24 enum amic_micbias { 25 25 AMIC_MICBIAS_VAMIC1, 26 - AMIC_MICBIAS_VAMIC2 26 + AMIC_MICBIAS_VAMIC2, 27 + AMIC_MICBIAS_UNKNOWN 27 28 }; 28 29 29 30 /* Bias-voltage */ ··· 32 31 EAR_CMV_0_95V, 33 32 EAR_CMV_1_10V, 34 33 EAR_CMV_1_27V, 35 - EAR_CMV_1_58V 34 + EAR_CMV_1_58V, 35 + EAR_CMV_UNKNOWN 36 36 }; 37 37 38 38 /* Analog microphone settings */
+81
sound/soc/codecs/ab8500-codec.c
··· 34 34 #include <linux/mfd/abx500/ab8500-sysctrl.h> 35 35 #include <linux/mfd/abx500/ab8500-codec.h> 36 36 #include <linux/regulator/consumer.h> 37 + #include <linux/of.h> 37 38 38 39 #include <sound/core.h> 39 40 #include <sound/pcm.h> ··· 2395 2394 } 2396 2395 }; 2397 2396 2397 + static void ab8500_codec_of_probe(struct device *dev, struct device_node *np, 2398 + struct ab8500_codec_platform_data *codec) 2399 + { 2400 + u32 value; 2401 + 2402 + if (of_get_property(np, "stericsson,amic1-type-single-ended", NULL)) 2403 + codec->amics.mic1_type = AMIC_TYPE_SINGLE_ENDED; 2404 + else 2405 + codec->amics.mic1_type = AMIC_TYPE_DIFFERENTIAL; 2406 + 2407 + if (of_get_property(np, "stericsson,amic2-type-single-ended", NULL)) 2408 + codec->amics.mic2_type = AMIC_TYPE_SINGLE_ENDED; 2409 + else 2410 + codec->amics.mic2_type = AMIC_TYPE_DIFFERENTIAL; 2411 + 2412 + /* Has a non-standard Vamic been requested? */ 2413 + if (of_get_property(np, "stericsson,amic1a-bias-vamic2", NULL)) 2414 + codec->amics.mic1a_micbias = AMIC_MICBIAS_VAMIC2; 2415 + else 2416 + codec->amics.mic1a_micbias = AMIC_MICBIAS_VAMIC1; 2417 + 2418 + if (of_get_property(np, "stericsson,amic1b-bias-vamic2", NULL)) 2419 + codec->amics.mic1b_micbias = AMIC_MICBIAS_VAMIC2; 2420 + else 2421 + codec->amics.mic1b_micbias = AMIC_MICBIAS_VAMIC1; 2422 + 2423 + if (of_get_property(np, "stericsson,amic2-bias-vamic1", NULL)) 2424 + codec->amics.mic2_micbias = AMIC_MICBIAS_VAMIC1; 2425 + else 2426 + codec->amics.mic2_micbias = AMIC_MICBIAS_VAMIC2; 2427 + 2428 + if (!of_property_read_u32(np, "stericsson,earpeice-cmv", &value)) { 2429 + switch (value) { 2430 + case 950 : 2431 + codec->ear_cmv = EAR_CMV_0_95V; 2432 + break; 2433 + case 1100 : 2434 + codec->ear_cmv = EAR_CMV_1_10V; 2435 + break; 2436 + case 1270 : 2437 + codec->ear_cmv = EAR_CMV_1_27V; 2438 + break; 2439 + case 1580 : 2440 + codec->ear_cmv = EAR_CMV_1_58V; 2441 + break; 2442 + default : 2443 + codec->ear_cmv = EAR_CMV_UNKNOWN; 2444 + dev_err(dev, "Unsuitable earpiece voltage found in DT\n"); 2445 + } 2446 + } else { 2447 + dev_warn(dev, "No earpiece voltage found in DT - using default\n"); 2448 + codec->ear_cmv = EAR_CMV_0_95V; 2449 + } 2450 + } 2451 + 2398 2452 static int ab8500_codec_probe(struct snd_soc_codec *codec) 2399 2453 { 2400 2454 struct device *dev = codec->dev; 2455 + struct device_node *np = dev->of_node; 2401 2456 struct ab8500_codec_drvdata *drvdata = dev_get_drvdata(dev); 2402 2457 struct ab8500_platform_data *pdata; 2403 2458 struct filter_control *fc; ··· 2463 2406 2464 2407 /* Setup AB8500 according to board-settings */ 2465 2408 pdata = dev_get_platdata(dev->parent); 2409 + 2410 + if (np) { 2411 + if (!pdata) 2412 + pdata = devm_kzalloc(dev, 2413 + sizeof(struct ab8500_platform_data), 2414 + GFP_KERNEL); 2415 + 2416 + if (pdata && !pdata->codec) 2417 + pdata->codec 2418 + = devm_kzalloc(dev, 2419 + sizeof(struct ab8500_codec_platform_data), 2420 + GFP_KERNEL); 2421 + 2422 + if (!(pdata && pdata->codec)) 2423 + return -ENOMEM; 2424 + 2425 + ab8500_codec_of_probe(dev, np, pdata->codec); 2426 + 2427 + } else { 2428 + if (!(pdata && pdata->codec)) { 2429 + dev_err(dev, "No codec platform data or DT found\n"); 2430 + return -EINVAL; 2431 + } 2432 + } 2466 2433 2467 2434 status = ab8500_audio_setup_mics(codec, &pdata->codec->amics); 2468 2435 if (status < 0) {
+42 -5
sound/soc/ux500/mop500.c
··· 16 16 #include <linux/module.h> 17 17 #include <linux/io.h> 18 18 #include <linux/spi/spi.h> 19 + #include <linux/of.h> 19 20 20 21 #include <sound/soc.h> 21 22 #include <sound/initval.h> ··· 57 56 .num_links = ARRAY_SIZE(mop500_dai_links), 58 57 }; 59 58 59 + static int __devinit mop500_of_probe(struct platform_device *pdev, 60 + struct device_node *np) 61 + { 62 + struct device_node *codec_np, *msp_np[2]; 63 + int i; 64 + 65 + msp_np[0] = of_parse_phandle(np, "stericsson,cpu-dai", 0); 66 + msp_np[1] = of_parse_phandle(np, "stericsson,cpu-dai", 1); 67 + codec_np = of_parse_phandle(np, "stericsson,audio-codec", 0); 68 + 69 + if (!(msp_np[0] && msp_np[1] && codec_np)) { 70 + dev_err(&pdev->dev, "Phandle missing or invalid\n"); 71 + return -EINVAL; 72 + } 73 + 74 + for (i = 0; i < 2; i++) { 75 + mop500_dai_links[i].cpu_of_node = msp_np[i]; 76 + mop500_dai_links[i].cpu_dai_name = NULL; 77 + mop500_dai_links[i].codec_of_node = codec_np; 78 + mop500_dai_links[i].codec_name = NULL; 79 + } 80 + 81 + snd_soc_of_parse_card_name(&mop500_card, "stericsson,card-name"); 82 + 83 + return 0; 84 + } 60 85 static int __devinit mop500_probe(struct platform_device *pdev) 61 86 { 87 + struct device_node *np = pdev->dev.of_node; 62 88 int ret; 63 - 64 - pr_debug("%s: Enter.\n", __func__); 65 89 66 90 dev_dbg(&pdev->dev, "%s: Enter.\n", __func__); 67 91 68 92 mop500_card.dev = &pdev->dev; 93 + 94 + if (np) { 95 + ret = mop500_of_probe(pdev, np); 96 + if (ret) 97 + return ret; 98 + } 69 99 70 100 dev_dbg(&pdev->dev, "%s: Card %s: Set platform drvdata.\n", 71 101 __func__, mop500_card.name); ··· 115 83 ret = snd_soc_register_card(&mop500_card); 116 84 if (ret) 117 85 dev_err(&pdev->dev, 118 - "Error: snd_soc_register_card failed (%d)!\n", 119 - ret); 86 + "Error: snd_soc_register_card failed (%d)!\n", ret); 120 87 121 88 return ret; 122 89 } ··· 128 97 129 98 snd_soc_unregister_card(mop500_card); 130 99 mop500_ab8500_remove(mop500_card); 131 - 100 + 132 101 return 0; 133 102 } 103 + 104 + static const struct of_device_id snd_soc_mop500_match[] = { 105 + { .compatible = "stericsson,snd-soc-mop500", }, 106 + {}, 107 + }; 134 108 135 109 static struct platform_driver snd_soc_mop500_driver = { 136 110 .driver = { 137 111 .owner = THIS_MODULE, 138 112 .name = "snd-soc-mop500", 113 + .of_match_table = snd_soc_mop500_match, 139 114 }, 140 115 .probe = mop500_probe, 141 116 .remove = __devexit_p(mop500_remove),
+6
sound/soc/ux500/ux500_msp_dai.c
··· 833 833 return 0; 834 834 } 835 835 836 + static const struct of_device_id ux500_msp_i2s_match[] = { 837 + { .compatible = "stericsson,ux500-msp-i2s", }, 838 + {}, 839 + }; 840 + 836 841 static struct platform_driver msp_i2s_driver = { 837 842 .driver = { 838 843 .name = "ux500-msp-i2s", 839 844 .owner = THIS_MODULE, 845 + .of_match_table = ux500_msp_i2s_match, 840 846 }, 841 847 .probe = ux500_msp_drv_probe, 842 848 .remove = ux500_msp_drv_remove,
+70 -19
sound/soc/ux500/ux500_msp_i2s.c
··· 15 15 16 16 #include <linux/module.h> 17 17 #include <linux/platform_device.h> 18 + #include <linux/pinctrl/consumer.h> 18 19 #include <linux/delay.h> 19 20 #include <linux/slab.h> 21 + #include <linux/of.h> 20 22 21 23 #include <mach/hardware.h> 22 24 #include <mach/msp.h> ··· 26 24 #include <sound/soc.h> 27 25 28 26 #include "ux500_msp_i2s.h" 27 + 28 + /* MSP1/3 Tx/Rx usage protection */ 29 + static DEFINE_SPINLOCK(msp_rxtx_lock); 29 30 30 31 /* Protocol desciptors */ 31 32 static const struct msp_protdesc prot_descs[] = { ··· 357 352 358 353 static int enable_msp(struct ux500_msp *msp, struct ux500_msp_config *config) 359 354 { 360 - int status = 0; 355 + int status = 0, retval = 0; 361 356 u32 reg_val_DMACR, reg_val_GCR; 357 + unsigned long flags; 362 358 363 359 /* Check msp state whether in RUN or CONFIGURED Mode */ 364 - if ((msp->msp_state == MSP_STATE_IDLE) && (msp->plat_init)) { 365 - status = msp->plat_init(); 366 - if (status) { 367 - dev_err(msp->dev, "%s: ERROR: Failed to init MSP (%d)!\n", 368 - __func__, status); 369 - return status; 360 + if (msp->msp_state == MSP_STATE_IDLE) { 361 + spin_lock_irqsave(&msp_rxtx_lock, flags); 362 + if (msp->pinctrl_rxtx_ref == 0 && 363 + !(IS_ERR(msp->pinctrl_p) || IS_ERR(msp->pinctrl_def))) { 364 + retval = pinctrl_select_state(msp->pinctrl_p, 365 + msp->pinctrl_def); 366 + if (retval) 367 + pr_err("could not set MSP defstate\n"); 370 368 } 369 + if (!retval) 370 + msp->pinctrl_rxtx_ref++; 371 + spin_unlock_irqrestore(&msp_rxtx_lock, flags); 371 372 } 372 373 373 374 /* Configure msp with protocol dependent settings */ ··· 631 620 632 621 int ux500_msp_i2s_close(struct ux500_msp *msp, unsigned int dir) 633 622 { 634 - int status = 0; 623 + int status = 0, retval = 0; 624 + unsigned long flags; 635 625 636 626 dev_dbg(msp->dev, "%s: Enter (dir = 0x%01x).\n", __func__, dir); 637 627 ··· 643 631 writel((readl(msp->registers + MSP_GCR) & 644 632 (~(FRAME_GEN_ENABLE | SRG_ENABLE))), 645 633 msp->registers + MSP_GCR); 646 - if (msp->plat_exit) 647 - status = msp->plat_exit(); 648 - if (status) 649 - dev_warn(msp->dev, 650 - "%s: WARN: ux500_msp_i2s_exit failed (%d)!\n", 651 - __func__, status); 634 + 635 + spin_lock_irqsave(&msp_rxtx_lock, flags); 636 + WARN_ON(!msp->pinctrl_rxtx_ref); 637 + msp->pinctrl_rxtx_ref--; 638 + if (msp->pinctrl_rxtx_ref == 0 && 639 + !(IS_ERR(msp->pinctrl_p) || IS_ERR(msp->pinctrl_sleep))) { 640 + retval = pinctrl_select_state(msp->pinctrl_p, 641 + msp->pinctrl_sleep); 642 + if (retval) 643 + pr_err("could not set MSP sleepstate\n"); 644 + } 645 + spin_unlock_irqrestore(&msp_rxtx_lock, flags); 646 + 652 647 writel(0, msp->registers + MSP_GCR); 653 648 writel(0, msp->registers + MSP_TCF); 654 649 writel(0, msp->registers + MSP_RCF); ··· 684 665 { 685 666 struct resource *res = NULL; 686 667 struct i2s_controller *i2s_cont; 668 + struct device_node *np = pdev->dev.of_node; 687 669 struct ux500_msp *msp; 688 - 689 - dev_dbg(&pdev->dev, "%s: Enter (name: %s, id: %d).\n", __func__, 690 - pdev->name, platform_data->id); 691 670 692 671 *msp_p = devm_kzalloc(&pdev->dev, sizeof(struct ux500_msp), GFP_KERNEL); 693 672 msp = *msp_p; 694 673 if (!msp) 695 674 return -ENOMEM; 696 675 676 + if (np) { 677 + if (!platform_data) { 678 + platform_data = devm_kzalloc(&pdev->dev, 679 + sizeof(struct msp_i2s_platform_data), GFP_KERNEL); 680 + if (!platform_data) 681 + ret = -ENOMEM; 682 + } 683 + } else 684 + if (!platform_data) 685 + ret = -EINVAL; 686 + 687 + if (ret) 688 + goto err_res; 689 + 690 + dev_dbg(&pdev->dev, "%s: Enter (name: %s, id: %d).\n", __func__, 691 + pdev->name, platform_data->id); 692 + 697 693 msp->id = platform_data->id; 698 694 msp->dev = &pdev->dev; 699 - msp->plat_init = platform_data->msp_i2s_init; 700 - msp->plat_exit = platform_data->msp_i2s_exit; 701 695 msp->dma_cfg_rx = platform_data->msp_i2s_dma_rx; 702 696 msp->dma_cfg_tx = platform_data->msp_i2s_dma_tx; 703 697 ··· 746 714 msp->id); 747 715 dev_dbg(&pdev->dev, "I2S device-name: '%s'\n", i2s_cont->name); 748 716 msp->i2s_cont = i2s_cont; 717 + 718 + msp->pinctrl_p = pinctrl_get(msp->dev); 719 + if (IS_ERR(msp->pinctrl_p)) 720 + dev_err(&pdev->dev, "could not get MSP pinctrl\n"); 721 + else { 722 + msp->pinctrl_def = pinctrl_lookup_state(msp->pinctrl_p, 723 + PINCTRL_STATE_DEFAULT); 724 + if (IS_ERR(msp->pinctrl_def)) { 725 + dev_err(&pdev->dev, 726 + "could not get MSP defstate (%li)\n", 727 + PTR_ERR(msp->pinctrl_def)); 728 + } 729 + msp->pinctrl_sleep = pinctrl_lookup_state(msp->pinctrl_p, 730 + PINCTRL_STATE_SLEEP); 731 + if (IS_ERR(msp->pinctrl_sleep)) 732 + dev_err(&pdev->dev, 733 + "could not get MSP idlestate (%li)\n", 734 + PTR_ERR(msp->pinctrl_def)); 735 + } 749 736 750 737 return 0; 751 738 }
+6 -2
sound/soc/ux500/ux500_msp_i2s.h
··· 524 524 struct dma_chan *rx_pipeid; 525 525 enum msp_state msp_state; 526 526 int (*transfer) (struct ux500_msp *msp, struct i2s_message *message); 527 - int (*plat_init) (void); 528 - int (*plat_exit) (void); 529 527 struct timer_list notify_timer; 530 528 int def_elem_len; 531 529 unsigned int dir_busy; 532 530 int loopback_enable; 533 531 u32 backup_regs[MAX_MSP_BACKUP_REGS]; 534 532 unsigned int f_bitclk; 533 + /* Pin modes */ 534 + struct pinctrl *pinctrl_p; 535 + struct pinctrl_state *pinctrl_def; 536 + struct pinctrl_state *pinctrl_sleep; 537 + /* Reference Count */ 538 + int pinctrl_rxtx_ref; 535 539 }; 536 540 537 541 struct ux500_msp_dma_params {