Skip to content

Commit

Permalink
Merge remote-tracking branches 'asoc/topic/wm8741', 'asoc/topic/wm875…
Browse files Browse the repository at this point in the history
…3', 'asoc/topic/wm8904', 'asoc/topic/wm8960' and 'asoc/topic/wm8983' into asoc-next
  • Loading branch information
Mark Brown committed Aug 30, 2015
6 parents 384ea79 + 84eac61 + b970499 + 779ea47 + 3176bf2 + 85e7118 commit 02dc14d
Show file tree
Hide file tree
Showing 6 changed files with 211 additions and 162 deletions.
62 changes: 14 additions & 48 deletions sound/soc/codecs/wm8741.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,25 +61,6 @@ static const struct reg_default wm8741_reg_defaults[] = {
{ 32, 0x0002 }, /* R32 - ADDITONAL_CONTROL_1 */
};

static bool wm8741_readable(struct device *dev, unsigned int reg)
{
switch (reg) {
case WM8741_DACLLSB_ATTENUATION:
case WM8741_DACLMSB_ATTENUATION:
case WM8741_DACRLSB_ATTENUATION:
case WM8741_DACRMSB_ATTENUATION:
case WM8741_VOLUME_CONTROL:
case WM8741_FORMAT_CONTROL:
case WM8741_FILTER_CONTROL:
case WM8741_MODE_CONTROL_1:
case WM8741_MODE_CONTROL_2:
case WM8741_ADDITIONAL_CONTROL_1:
return true;
default:
return false;
}
}

static int wm8741_reset(struct snd_soc_codec *codec)
{
return snd_soc_write(codec, WM8741_RESET, 0);
Expand Down Expand Up @@ -278,51 +259,38 @@ static int wm8741_set_dai_sysclk(struct snd_soc_dai *codec_dai,
switch (freq) {
case 0:
wm8741->sysclk_constraints = NULL;
wm8741->sysclk = freq;
return 0;

break;
case 11289600:
wm8741->sysclk_constraints = &constraints_11289;
wm8741->sysclk = freq;
return 0;

break;
case 12288000:
wm8741->sysclk_constraints = &constraints_12288;
wm8741->sysclk = freq;
return 0;

break;
case 16384000:
wm8741->sysclk_constraints = &constraints_16384;
wm8741->sysclk = freq;
return 0;

break;
case 16934400:
wm8741->sysclk_constraints = &constraints_16934;
wm8741->sysclk = freq;
return 0;

break;
case 18432000:
wm8741->sysclk_constraints = &constraints_18432;
wm8741->sysclk = freq;
return 0;

break;
case 22579200:
case 33868800:
wm8741->sysclk_constraints = &constraints_22579;
wm8741->sysclk = freq;
return 0;

break;
case 24576000:
wm8741->sysclk_constraints = &constraints_24576;
wm8741->sysclk = freq;
return 0;

break;
case 36864000:
wm8741->sysclk_constraints = &constraints_36864;
wm8741->sysclk = freq;
return 0;
break;
default:
return -EINVAL;
}
return -EINVAL;

wm8741->sysclk = freq;
return 0;
}

static int wm8741_set_dai_fmt(struct snd_soc_dai *codec_dai,
Expand Down Expand Up @@ -554,8 +522,6 @@ static const struct regmap_config wm8741_regmap = {
.reg_defaults = wm8741_reg_defaults,
.num_reg_defaults = ARRAY_SIZE(wm8741_reg_defaults),
.cache_type = REGCACHE_RBTREE,

.readable_reg = wm8741_readable,
};

static int wm8741_set_pdata(struct device *dev, struct wm8741_priv *wm8741)
Expand Down
6 changes: 0 additions & 6 deletions sound/soc/codecs/wm8753.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,6 @@ static bool wm8753_volatile(struct device *dev, unsigned int reg)
return reg == WM8753_RESET;
}

static bool wm8753_writeable(struct device *dev, unsigned int reg)
{
return reg <= WM8753_ADCTL2;
}

/* codec private data */
struct wm8753_priv {
struct regmap *regmap;
Expand Down Expand Up @@ -1509,7 +1504,6 @@ static const struct regmap_config wm8753_regmap = {
.val_bits = 9,

.max_register = WM8753_ADCTL2,
.writeable_reg = wm8753_writeable,
.volatile_reg = wm8753_volatile,

.cache_type = REGCACHE_RBTREE,
Expand Down
4 changes: 3 additions & 1 deletion sound/soc/codecs/wm8904.c
Original file line number Diff line number Diff line change
Expand Up @@ -1837,7 +1837,9 @@ static int wm8904_set_bias_level(struct snd_soc_codec *codec,

switch (level) {
case SND_SOC_BIAS_ON:
clk_prepare_enable(wm8904->mclk);
ret = clk_prepare_enable(wm8904->mclk);
if (ret)
return ret;
break;

case SND_SOC_BIAS_PREPARE:
Expand Down
Loading

0 comments on commit 02dc14d

Please sign in to comment.