wm8731.c (6702dfcc571d962df499f7466f54e07d044e6cd1) | wm8731.c (cef6daa919c6912c4da629c3cee9c789f90583b1) |
---|---|
1/* 2 * wm8731.c -- WM8731 ALSA SoC Audio driver 3 * 4 * Copyright 2005 Openedhand Ltd. 5 * Copyright 2006-12 Wolfson Microelectronics, plc 6 * 7 * Author: Richard Purdie <richard@openedhand.com> 8 * --- 482 unchanged lines hidden (view full) --- 491 enum snd_soc_bias_level level) 492{ 493 struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec); 494 int ret; 495 u16 reg; 496 497 switch (level) { 498 case SND_SOC_BIAS_ON: | 1/* 2 * wm8731.c -- WM8731 ALSA SoC Audio driver 3 * 4 * Copyright 2005 Openedhand Ltd. 5 * Copyright 2006-12 Wolfson Microelectronics, plc 6 * 7 * Author: Richard Purdie <richard@openedhand.com> 8 * --- 482 unchanged lines hidden (view full) --- 491 enum snd_soc_bias_level level) 492{ 493 struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec); 494 int ret; 495 u16 reg; 496 497 switch (level) { 498 case SND_SOC_BIAS_ON: |
499 if (wm8731->mclk) 500 clk_prepare_enable(wm8731->mclk); | 499 if (wm8731->mclk) { 500 ret = clk_prepare_enable(wm8731->mclk); 501 if (ret) 502 return ret; 503 } |
501 break; 502 case SND_SOC_BIAS_PREPARE: 503 break; 504 case SND_SOC_BIAS_STANDBY: 505 if (snd_soc_codec_get_bias_level(codec) == SND_SOC_BIAS_OFF) { 506 ret = regulator_bulk_enable(ARRAY_SIZE(wm8731->supplies), 507 wm8731->supplies); 508 if (ret != 0) --- 337 unchanged lines hidden --- | 504 break; 505 case SND_SOC_BIAS_PREPARE: 506 break; 507 case SND_SOC_BIAS_STANDBY: 508 if (snd_soc_codec_get_bias_level(codec) == SND_SOC_BIAS_OFF) { 509 ret = regulator_bulk_enable(ARRAY_SIZE(wm8731->supplies), 510 wm8731->supplies); 511 if (ret != 0) --- 337 unchanged lines hidden --- |