diff options
author | Akshu Agrawal <akshu.agrawal@amd.com> | 2017-11-09 20:35:51 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-11-09 20:40:59 +0300 |
commit | 0c279a590fde66f4307c93ab2d4f680c7f41bbfa (patch) | |
tree | 16ecfcd5ee7114b0cc674bf7fdde06be7600d99f /sound/soc | |
parent | 50f510a33c7c906f8f75b02e3d1104984ebf6f78 (diff) | |
download | linux-0c279a590fde66f4307c93ab2d4f680c7f41bbfa.tar.xz |
ASoC: rt5645: Wait for 400msec before concluding on value of RT5645_VENDOR_ID2
Minimum time required between power On of codec and read
of RT5645_VENDOR_ID2 is 400msec. We should wait that long
before reading the value.
TEST=Cold boot the device and check for sound device.
Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com>
Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/codecs/rt5645.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c index 23cc2cb8393f..5f24df4fae8e 100644 --- a/sound/soc/codecs/rt5645.c +++ b/sound/soc/codecs/rt5645.c @@ -55,6 +55,8 @@ MODULE_PARM_DESC(quirk, "RT5645 pdata quirk override"); #define RT5645_HWEQ_NUM 57 +#define TIME_TO_POWER_MS 400 + static const struct regmap_range_cfg rt5645_ranges[] = { { .name = "PR", @@ -3784,6 +3786,12 @@ static int rt5645_i2c_probe(struct i2c_client *i2c, ret); return ret; } + + /* + * Read after 400msec, as it is the interval required between + * read and power On. + */ + msleep(TIME_TO_POWER_MS); regmap_read(regmap, RT5645_VENDOR_ID2, &val); switch (val) { |