diff options
Diffstat (limited to 'sound/soc/codecs')
-rw-r--r-- | sound/soc/codecs/alc5632.c | 10 | ||||
-rw-r--r-- | sound/soc/codecs/cs42xx8.c | 11 | ||||
-rw-r--r-- | sound/soc/codecs/da732x.c | 3 | ||||
-rw-r--r-- | sound/soc/codecs/max98090.c | 7 |
4 files changed, 22 insertions, 9 deletions
diff --git a/sound/soc/codecs/alc5632.c b/sound/soc/codecs/alc5632.c index ec071a6306ef..85942ca36cbf 100644 --- a/sound/soc/codecs/alc5632.c +++ b/sound/soc/codecs/alc5632.c | |||
@@ -1061,7 +1061,6 @@ static int alc5632_resume(struct snd_soc_codec *codec) | |||
1061 | static int alc5632_probe(struct snd_soc_codec *codec) | 1061 | static int alc5632_probe(struct snd_soc_codec *codec) |
1062 | { | 1062 | { |
1063 | struct alc5632_priv *alc5632 = snd_soc_codec_get_drvdata(codec); | 1063 | struct alc5632_priv *alc5632 = snd_soc_codec_get_drvdata(codec); |
1064 | int ret; | ||
1065 | 1064 | ||
1066 | /* power on device */ | 1065 | /* power on device */ |
1067 | alc5632_set_bias_level(codec, SND_SOC_BIAS_STANDBY); | 1066 | alc5632_set_bias_level(codec, SND_SOC_BIAS_STANDBY); |
@@ -1075,7 +1074,7 @@ static int alc5632_probe(struct snd_soc_codec *codec) | |||
1075 | return -EINVAL; | 1074 | return -EINVAL; |
1076 | } | 1075 | } |
1077 | 1076 | ||
1078 | return ret; | 1077 | return 0; |
1079 | } | 1078 | } |
1080 | 1079 | ||
1081 | /* power down chip */ | 1080 | /* power down chip */ |
@@ -1191,11 +1190,18 @@ static const struct i2c_device_id alc5632_i2c_table[] = { | |||
1191 | }; | 1190 | }; |
1192 | MODULE_DEVICE_TABLE(i2c, alc5632_i2c_table); | 1191 | MODULE_DEVICE_TABLE(i2c, alc5632_i2c_table); |
1193 | 1192 | ||
1193 | static const struct of_device_id alc5632_of_match[] = { | ||
1194 | { .compatible = "realtek,alc5632", }, | ||
1195 | { } | ||
1196 | }; | ||
1197 | MODULE_DEVICE_TABLE(of, alc5632_of_match); | ||
1198 | |||
1194 | /* i2c codec control layer */ | 1199 | /* i2c codec control layer */ |
1195 | static struct i2c_driver alc5632_i2c_driver = { | 1200 | static struct i2c_driver alc5632_i2c_driver = { |
1196 | .driver = { | 1201 | .driver = { |
1197 | .name = "alc5632", | 1202 | .name = "alc5632", |
1198 | .owner = THIS_MODULE, | 1203 | .owner = THIS_MODULE, |
1204 | .of_match_table = of_match_ptr(alc5632_of_match), | ||
1199 | }, | 1205 | }, |
1200 | .probe = alc5632_i2c_probe, | 1206 | .probe = alc5632_i2c_probe, |
1201 | .remove = alc5632_i2c_remove, | 1207 | .remove = alc5632_i2c_remove, |
diff --git a/sound/soc/codecs/cs42xx8.c b/sound/soc/codecs/cs42xx8.c index 082299a4e2fa..85020322eee7 100644 --- a/sound/soc/codecs/cs42xx8.c +++ b/sound/soc/codecs/cs42xx8.c | |||
@@ -495,17 +495,16 @@ int cs42xx8_probe(struct device *dev, struct regmap *regmap) | |||
495 | regcache_cache_bypass(cs42xx8->regmap, true); | 495 | regcache_cache_bypass(cs42xx8->regmap, true); |
496 | 496 | ||
497 | /* Validate the chip ID */ | 497 | /* Validate the chip ID */ |
498 | regmap_read(cs42xx8->regmap, CS42XX8_CHIPID, &val); | 498 | ret = regmap_read(cs42xx8->regmap, CS42XX8_CHIPID, &val); |
499 | if (val < 0) { | 499 | if (ret < 0) { |
500 | dev_err(dev, "failed to get device ID: %x", val); | 500 | dev_err(dev, "failed to get device ID, ret = %d", ret); |
501 | ret = -EINVAL; | ||
502 | goto err_enable; | 501 | goto err_enable; |
503 | } | 502 | } |
504 | 503 | ||
505 | /* The top four bits of the chip ID should be 0000 */ | 504 | /* The top four bits of the chip ID should be 0000 */ |
506 | if ((val & CS42XX8_CHIPID_CHIP_ID_MASK) != 0x00) { | 505 | if (((val & CS42XX8_CHIPID_CHIP_ID_MASK) >> 4) != 0x00) { |
507 | dev_err(dev, "unmatched chip ID: %d\n", | 506 | dev_err(dev, "unmatched chip ID: %d\n", |
508 | val & CS42XX8_CHIPID_CHIP_ID_MASK); | 507 | (val & CS42XX8_CHIPID_CHIP_ID_MASK) >> 4); |
509 | ret = -EINVAL; | 508 | ret = -EINVAL; |
510 | goto err_enable; | 509 | goto err_enable; |
511 | } | 510 | } |
diff --git a/sound/soc/codecs/da732x.c b/sound/soc/codecs/da732x.c index 7d168ec71cd7..48f3fef68484 100644 --- a/sound/soc/codecs/da732x.c +++ b/sound/soc/codecs/da732x.c | |||
@@ -1571,7 +1571,8 @@ static int da732x_i2c_probe(struct i2c_client *i2c, | |||
1571 | } | 1571 | } |
1572 | 1572 | ||
1573 | dev_info(&i2c->dev, "Revision: %d.%d\n", | 1573 | dev_info(&i2c->dev, "Revision: %d.%d\n", |
1574 | (reg & DA732X_ID_MAJOR_MASK), (reg & DA732X_ID_MINOR_MASK)); | 1574 | (reg & DA732X_ID_MAJOR_MASK) >> 4, |
1575 | (reg & DA732X_ID_MINOR_MASK)); | ||
1575 | 1576 | ||
1576 | ret = snd_soc_register_codec(&i2c->dev, &soc_codec_dev_da732x, | 1577 | ret = snd_soc_register_codec(&i2c->dev, &soc_codec_dev_da732x, |
1577 | da732x_dai, ARRAY_SIZE(da732x_dai)); | 1578 | da732x_dai, ARRAY_SIZE(da732x_dai)); |
diff --git a/sound/soc/codecs/max98090.c b/sound/soc/codecs/max98090.c index 98c6e104357c..f7b0b37aa858 100644 --- a/sound/soc/codecs/max98090.c +++ b/sound/soc/codecs/max98090.c | |||
@@ -2399,11 +2399,18 @@ static const struct i2c_device_id max98090_i2c_id[] = { | |||
2399 | }; | 2399 | }; |
2400 | MODULE_DEVICE_TABLE(i2c, max98090_i2c_id); | 2400 | MODULE_DEVICE_TABLE(i2c, max98090_i2c_id); |
2401 | 2401 | ||
2402 | static const struct of_device_id max98090_of_match[] = { | ||
2403 | { .compatible = "maxim,max98090", }, | ||
2404 | { } | ||
2405 | }; | ||
2406 | MODULE_DEVICE_TABLE(of, max98090_of_match); | ||
2407 | |||
2402 | static struct i2c_driver max98090_i2c_driver = { | 2408 | static struct i2c_driver max98090_i2c_driver = { |
2403 | .driver = { | 2409 | .driver = { |
2404 | .name = "max98090", | 2410 | .name = "max98090", |
2405 | .owner = THIS_MODULE, | 2411 | .owner = THIS_MODULE, |
2406 | .pm = &max98090_pm, | 2412 | .pm = &max98090_pm, |
2413 | .of_match_table = of_match_ptr(max98090_of_match), | ||
2407 | }, | 2414 | }, |
2408 | .probe = max98090_i2c_probe, | 2415 | .probe = max98090_i2c_probe, |
2409 | .remove = max98090_i2c_remove, | 2416 | .remove = max98090_i2c_remove, |