wm0010            159 sound/soc/codecs/wm0010.c 	struct wm0010_priv *wm0010 = snd_soc_component_get_drvdata(component);
wm0010            164 sound/soc/codecs/wm0010.c 	spin_lock_irqsave(&wm0010->irq_lock, flags);
wm0010            165 sound/soc/codecs/wm0010.c 	state = wm0010->state;
wm0010            166 sound/soc/codecs/wm0010.c 	spin_unlock_irqrestore(&wm0010->irq_lock, flags);
wm0010            177 sound/soc/codecs/wm0010.c 		gpio_set_value_cansleep(wm0010->gpio_reset,
wm0010            178 sound/soc/codecs/wm0010.c 					wm0010->gpio_reset_value);
wm0010            180 sound/soc/codecs/wm0010.c 		regulator_disable(wm0010->dbvdd);
wm0010            181 sound/soc/codecs/wm0010.c 		regulator_bulk_disable(ARRAY_SIZE(wm0010->core_supplies),
wm0010            182 sound/soc/codecs/wm0010.c 				       wm0010->core_supplies);
wm0010            186 sound/soc/codecs/wm0010.c 	spin_lock_irqsave(&wm0010->irq_lock, flags);
wm0010            187 sound/soc/codecs/wm0010.c 	wm0010->state = WM0010_POWER_OFF;
wm0010            188 sound/soc/codecs/wm0010.c 	spin_unlock_irqrestore(&wm0010->irq_lock, flags);
wm0010            200 sound/soc/codecs/wm0010.c static void wm0010_mark_boot_failure(struct wm0010_priv *wm0010)
wm0010            205 sound/soc/codecs/wm0010.c 	spin_lock_irqsave(&wm0010->irq_lock, flags);
wm0010            206 sound/soc/codecs/wm0010.c 	state = wm0010->state;
wm0010            207 sound/soc/codecs/wm0010.c 	spin_unlock_irqrestore(&wm0010->irq_lock, flags);
wm0010            209 sound/soc/codecs/wm0010.c 	dev_err(wm0010->dev, "Failed to transition from `%s' state to `%s' state\n",
wm0010            212 sound/soc/codecs/wm0010.c 	wm0010->boot_failed = true;
wm0010            219 sound/soc/codecs/wm0010.c 	struct wm0010_priv *wm0010 = snd_soc_component_get_drvdata(component);
wm0010            226 sound/soc/codecs/wm0010.c 		wm0010_mark_boot_failure(wm0010);
wm0010            239 sound/soc/codecs/wm0010.c 			wm0010_mark_boot_failure(wm0010);
wm0010            243 sound/soc/codecs/wm0010.c 			if (wm0010->state < WM0010_STAGE2)
wm0010            247 sound/soc/codecs/wm0010.c 			wm0010_mark_boot_failure(wm0010);
wm0010            272 sound/soc/codecs/wm0010.c 			wm0010->pll_running = true;
wm0010            277 sound/soc/codecs/wm0010.c 			wm0010_mark_boot_failure(wm0010);
wm0010            282 sound/soc/codecs/wm0010.c 			wm0010_mark_boot_failure(wm0010);
wm0010            287 sound/soc/codecs/wm0010.c 			wm0010_mark_boot_failure(wm0010);
wm0010            292 sound/soc/codecs/wm0010.c 			wm0010_mark_boot_failure(wm0010);
wm0010            297 sound/soc/codecs/wm0010.c 			wm0010_mark_boot_failure(wm0010);
wm0010            302 sound/soc/codecs/wm0010.c 			wm0010_mark_boot_failure(wm0010);
wm0010            307 sound/soc/codecs/wm0010.c 			wm0010_mark_boot_failure(wm0010);
wm0010            316 sound/soc/codecs/wm0010.c 			wm0010_mark_boot_failure(wm0010);
wm0010            322 sound/soc/codecs/wm0010.c 			wm0010_mark_boot_failure(wm0010);
wm0010            326 sound/soc/codecs/wm0010.c 		if (wm0010->boot_failed)
wm0010            345 sound/soc/codecs/wm0010.c 	struct wm0010_priv *wm0010 = snd_soc_component_get_drvdata(component);
wm0010            370 sound/soc/codecs/wm0010.c 	wm0010->boot_failed = false;
wm0010            441 sound/soc/codecs/wm0010.c 		if (!wm0010->pll_running) {
wm0010            442 sound/soc/codecs/wm0010.c 			xfer->t.speed_hz = wm0010->sysclk / 6;
wm0010            444 sound/soc/codecs/wm0010.c 			xfer->t.speed_hz = wm0010->max_spi_freq;
wm0010            446 sound/soc/codecs/wm0010.c 			if (wm0010->board_max_spi_speed &&
wm0010            447 sound/soc/codecs/wm0010.c 			   (wm0010->board_max_spi_speed < wm0010->max_spi_freq))
wm0010            448 sound/soc/codecs/wm0010.c 					xfer->t.speed_hz = wm0010->board_max_spi_speed;
wm0010            452 sound/soc/codecs/wm0010.c 		wm0010->max_spi_freq = xfer->t.speed_hz;
wm0010            470 sound/soc/codecs/wm0010.c 		if (wm0010->boot_failed) {
wm0010            499 sound/soc/codecs/wm0010.c 	struct wm0010_priv *wm0010 = snd_soc_component_get_drvdata(component);
wm0010            538 sound/soc/codecs/wm0010.c 	t.speed_hz = wm0010->sysclk / 10;
wm0010            555 sound/soc/codecs/wm0010.c 			wm0010_mark_boot_failure(wm0010);
wm0010            573 sound/soc/codecs/wm0010.c 	struct wm0010_priv *wm0010 = snd_soc_component_get_drvdata(component);
wm0010            584 sound/soc/codecs/wm0010.c 	spin_lock_irqsave(&wm0010->irq_lock, flags);
wm0010            585 sound/soc/codecs/wm0010.c 	if (wm0010->state != WM0010_POWER_OFF)
wm0010            586 sound/soc/codecs/wm0010.c 		dev_warn(wm0010->dev, "DSP already powered up!\n");
wm0010            587 sound/soc/codecs/wm0010.c 	spin_unlock_irqrestore(&wm0010->irq_lock, flags);
wm0010            589 sound/soc/codecs/wm0010.c 	if (wm0010->sysclk > 26000000) {
wm0010            595 sound/soc/codecs/wm0010.c 	mutex_lock(&wm0010->lock);
wm0010            596 sound/soc/codecs/wm0010.c 	wm0010->pll_running = false;
wm0010            598 sound/soc/codecs/wm0010.c 	dev_dbg(component->dev, "max_spi_freq: %d\n", wm0010->max_spi_freq);
wm0010            600 sound/soc/codecs/wm0010.c 	ret = regulator_bulk_enable(ARRAY_SIZE(wm0010->core_supplies),
wm0010            601 sound/soc/codecs/wm0010.c 				    wm0010->core_supplies);
wm0010            605 sound/soc/codecs/wm0010.c 		mutex_unlock(&wm0010->lock);
wm0010            609 sound/soc/codecs/wm0010.c 	ret = regulator_enable(wm0010->dbvdd);
wm0010            616 sound/soc/codecs/wm0010.c 	gpio_set_value_cansleep(wm0010->gpio_reset, !wm0010->gpio_reset_value);
wm0010            617 sound/soc/codecs/wm0010.c 	spin_lock_irqsave(&wm0010->irq_lock, flags);
wm0010            618 sound/soc/codecs/wm0010.c 	wm0010->state = WM0010_OUT_OF_RESET;
wm0010            619 sound/soc/codecs/wm0010.c 	spin_unlock_irqrestore(&wm0010->irq_lock, flags);
wm0010            621 sound/soc/codecs/wm0010.c 	if (!wait_for_completion_timeout(&wm0010->boot_completion,
wm0010            625 sound/soc/codecs/wm0010.c 	spin_lock_irqsave(&wm0010->irq_lock, flags);
wm0010            626 sound/soc/codecs/wm0010.c 	wm0010->state = WM0010_BOOTROM;
wm0010            627 sound/soc/codecs/wm0010.c 	spin_unlock_irqrestore(&wm0010->irq_lock, flags);
wm0010            633 sound/soc/codecs/wm0010.c 	if (!wait_for_completion_timeout(&wm0010->boot_completion,
wm0010            637 sound/soc/codecs/wm0010.c 	spin_lock_irqsave(&wm0010->irq_lock, flags);
wm0010            638 sound/soc/codecs/wm0010.c 	wm0010->state = WM0010_STAGE2;
wm0010            639 sound/soc/codecs/wm0010.c 	spin_unlock_irqrestore(&wm0010->irq_lock, flags);
wm0010            642 sound/soc/codecs/wm0010.c 	if (wm0010->max_spi_freq) {
wm0010            650 sound/soc/codecs/wm0010.c 		pll_rec.clkctrl1 = wm0010->pll_clkctrl1;
wm0010            671 sound/soc/codecs/wm0010.c 		t.speed_hz = wm0010->sysclk / 6;
wm0010            693 sound/soc/codecs/wm0010.c 				wm0010->pll_running = true;
wm0010            709 sound/soc/codecs/wm0010.c 	spin_lock_irqsave(&wm0010->irq_lock, flags);
wm0010            710 sound/soc/codecs/wm0010.c 	wm0010->state = WM0010_FIRMWARE;
wm0010            711 sound/soc/codecs/wm0010.c 	spin_unlock_irqrestore(&wm0010->irq_lock, flags);
wm0010            713 sound/soc/codecs/wm0010.c 	mutex_unlock(&wm0010->lock);
wm0010            724 sound/soc/codecs/wm0010.c 	mutex_unlock(&wm0010->lock);
wm0010            728 sound/soc/codecs/wm0010.c 	mutex_unlock(&wm0010->lock);
wm0010            729 sound/soc/codecs/wm0010.c 	regulator_bulk_disable(ARRAY_SIZE(wm0010->core_supplies),
wm0010            730 sound/soc/codecs/wm0010.c 			       wm0010->core_supplies);
wm0010            738 sound/soc/codecs/wm0010.c 	struct wm0010_priv *wm0010 = snd_soc_component_get_drvdata(component);
wm0010            749 sound/soc/codecs/wm0010.c 			mutex_lock(&wm0010->lock);
wm0010            751 sound/soc/codecs/wm0010.c 			mutex_unlock(&wm0010->lock);
wm0010            764 sound/soc/codecs/wm0010.c 	struct wm0010_priv *wm0010 = snd_soc_component_get_drvdata(component);
wm0010            767 sound/soc/codecs/wm0010.c 	wm0010->sysclk = freq;
wm0010            770 sound/soc/codecs/wm0010.c 		wm0010->max_spi_freq = 0;
wm0010            774 sound/soc/codecs/wm0010.c 				wm0010->max_spi_freq = pll_clock_map[i].max_pll_spi_speed;
wm0010            775 sound/soc/codecs/wm0010.c 				wm0010->pll_clkctrl1 = pll_clock_map[i].pll_clkctrl1;
wm0010            842 sound/soc/codecs/wm0010.c 	struct wm0010_priv *wm0010 = data;
wm0010            844 sound/soc/codecs/wm0010.c 	switch (wm0010->state) {
wm0010            848 sound/soc/codecs/wm0010.c 		spin_lock(&wm0010->irq_lock);
wm0010            849 sound/soc/codecs/wm0010.c 		complete(&wm0010->boot_completion);
wm0010            850 sound/soc/codecs/wm0010.c 		spin_unlock(&wm0010->irq_lock);
wm0010            861 sound/soc/codecs/wm0010.c 	struct wm0010_priv *wm0010 = snd_soc_component_get_drvdata(component);
wm0010            863 sound/soc/codecs/wm0010.c 	wm0010->component = component;
wm0010            874 sound/soc/codecs/wm0010.c 	struct wm0010_priv *wm0010;
wm0010            876 sound/soc/codecs/wm0010.c 	wm0010 = devm_kzalloc(&spi->dev, sizeof(*wm0010),
wm0010            878 sound/soc/codecs/wm0010.c 	if (!wm0010)
wm0010            881 sound/soc/codecs/wm0010.c 	mutex_init(&wm0010->lock);
wm0010            882 sound/soc/codecs/wm0010.c 	spin_lock_init(&wm0010->irq_lock);
wm0010            884 sound/soc/codecs/wm0010.c 	spi_set_drvdata(spi, wm0010);
wm0010            885 sound/soc/codecs/wm0010.c 	wm0010->dev = &spi->dev;
wm0010            888 sound/soc/codecs/wm0010.c 		memcpy(&wm0010->pdata, dev_get_platdata(&spi->dev),
wm0010            889 sound/soc/codecs/wm0010.c 		       sizeof(wm0010->pdata));
wm0010            891 sound/soc/codecs/wm0010.c 	init_completion(&wm0010->boot_completion);
wm0010            893 sound/soc/codecs/wm0010.c 	wm0010->core_supplies[0].supply = "AVDD";
wm0010            894 sound/soc/codecs/wm0010.c 	wm0010->core_supplies[1].supply = "DCVDD";
wm0010            895 sound/soc/codecs/wm0010.c 	ret = devm_regulator_bulk_get(wm0010->dev, ARRAY_SIZE(wm0010->core_supplies),
wm0010            896 sound/soc/codecs/wm0010.c 				      wm0010->core_supplies);
wm0010            898 sound/soc/codecs/wm0010.c 		dev_err(wm0010->dev, "Failed to obtain core supplies: %d\n",
wm0010            903 sound/soc/codecs/wm0010.c 	wm0010->dbvdd = devm_regulator_get(wm0010->dev, "DBVDD");
wm0010            904 sound/soc/codecs/wm0010.c 	if (IS_ERR(wm0010->dbvdd)) {
wm0010            905 sound/soc/codecs/wm0010.c 		ret = PTR_ERR(wm0010->dbvdd);
wm0010            906 sound/soc/codecs/wm0010.c 		dev_err(wm0010->dev, "Failed to obtain DBVDD: %d\n", ret);
wm0010            910 sound/soc/codecs/wm0010.c 	if (wm0010->pdata.gpio_reset) {
wm0010            911 sound/soc/codecs/wm0010.c 		wm0010->gpio_reset = wm0010->pdata.gpio_reset;
wm0010            913 sound/soc/codecs/wm0010.c 		if (wm0010->pdata.reset_active_high)
wm0010            914 sound/soc/codecs/wm0010.c 			wm0010->gpio_reset_value = 1;
wm0010            916 sound/soc/codecs/wm0010.c 			wm0010->gpio_reset_value = 0;
wm0010            918 sound/soc/codecs/wm0010.c 		if (wm0010->gpio_reset_value)
wm0010            923 sound/soc/codecs/wm0010.c 		ret = devm_gpio_request_one(wm0010->dev, wm0010->gpio_reset,
wm0010            926 sound/soc/codecs/wm0010.c 			dev_err(wm0010->dev,
wm0010            932 sound/soc/codecs/wm0010.c 		dev_err(wm0010->dev, "No reset GPIO configured\n");
wm0010            936 sound/soc/codecs/wm0010.c 	wm0010->state = WM0010_POWER_OFF;
wm0010            939 sound/soc/codecs/wm0010.c 	if (wm0010->pdata.irq_flags)
wm0010            940 sound/soc/codecs/wm0010.c 		trigger = wm0010->pdata.irq_flags;
wm0010            946 sound/soc/codecs/wm0010.c 				   "wm0010", wm0010);
wm0010            948 sound/soc/codecs/wm0010.c 		dev_err(wm0010->dev, "Failed to request IRQ %d: %d\n",
wm0010            952 sound/soc/codecs/wm0010.c 	wm0010->irq = irq;
wm0010            956 sound/soc/codecs/wm0010.c 		dev_err(wm0010->dev, "Failed to set IRQ %d as wake source: %d\n",
wm0010            962 sound/soc/codecs/wm0010.c 		wm0010->board_max_spi_speed = spi->max_speed_hz;
wm0010            964 sound/soc/codecs/wm0010.c 		wm0010->board_max_spi_speed = 0;
wm0010            977 sound/soc/codecs/wm0010.c 	struct wm0010_priv *wm0010 = spi_get_drvdata(spi);
wm0010            979 sound/soc/codecs/wm0010.c 	gpio_set_value_cansleep(wm0010->gpio_reset,
wm0010            980 sound/soc/codecs/wm0010.c 				wm0010->gpio_reset_value);
wm0010            982 sound/soc/codecs/wm0010.c 	irq_set_irq_wake(wm0010->irq, 0);
wm0010            984 sound/soc/codecs/wm0010.c 	if (wm0010->irq)
wm0010            985 sound/soc/codecs/wm0010.c 		free_irq(wm0010->irq, wm0010);
wm0010            146 sound/soc/samsung/bells.c 	struct snd_soc_component *wm0010;
wm0010            155 sound/soc/samsung/bells.c 	wm0010 = rtd->codec_dai->component;
wm0010            170 sound/soc/samsung/bells.c 	ret = snd_soc_component_set_sysclk(wm0010, 0, 0, SYS_MCLK_RATE, 0);
wm0010            172 sound/soc/samsung/bells.c 		dev_err(wm0010->dev, "Failed to set WM0010 clock: %d\n", ret);