Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1310068 > unrolled thread
| Started by | Xiubo Li <lixiubo@cmss.chinamobile.com> |
|---|---|
| First post | 2016-01-15 12:40 +0100 |
| Last post | 2016-01-22 17:50 +0100 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH 0/2] ASoC: fsl: Use usleep_range() instead of msleep() Xiubo Li <lixiubo@cmss.chinamobile.com> - 2016-01-15 12:40 +0100
[PATCH 1/2] ASoC: fsl_sai: Use usleep_range() instead of msleep() Xiubo Li <lixiubo@cmss.chinamobile.com> - 2016-01-15 12:40 +0100
Re: [PATCH 1/2] ASoC: fsl_sai: Use usleep_range() instead of msleep() Mark Brown <broonie@kernel.org> - 2016-01-22 17:50 +0100
| From | Xiubo Li <lixiubo@cmss.chinamobile.com> |
|---|---|
| Date | 2016-01-15 12:40 +0100 |
| Subject | [PATCH 0/2] ASoC: fsl: Use usleep_range() instead of msleep() |
| Message-ID | <qRaTx-5pO-29@gated-at.bofh.it> |
Xiubo Li (2): ASoC: fsl_sai: Use usleep_range() instead of msleep() ASoC: fsl-mpc5200: Use usleep_range() instead of msleep() sound/soc/fsl/fsl_sai.c | 3 ++- sound/soc/fsl/mpc5200_psc_ac97.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) -- 1.8.3.1
[toc] | [next] | [standalone]
| From | Xiubo Li <lixiubo@cmss.chinamobile.com> |
|---|---|
| Date | 2016-01-15 12:40 +0100 |
| Subject | [PATCH 1/2] ASoC: fsl_sai: Use usleep_range() instead of msleep() |
| Message-ID | <qRaTx-5pO-37@gated-at.bofh.it> |
| In reply to | #1310068 |
Since msleep() will sleep longer than intended time for values less than 20ms, this patch allows the use of usleep_range for just 1ms. usleep_range is a finer precision implementation of msleep and is designed to be a drop-in replacement for udelay where a precise sleep/busy-wait is unnecessary. More details see Documentation/timers/timers-howto.txt. Signed-off-by: Xiubo Li <lixiubo@cmss.chinamobile.com> --- sound/soc/fsl/fsl_sai.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c index fef264d..0754df7 100644 --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c @@ -17,6 +17,7 @@ #include <linux/of_address.h> #include <linux/regmap.h> #include <linux/slab.h> +#include <linux/time.h> #include <sound/core.h> #include <sound/dmaengine_pcm.h> #include <sound/pcm_params.h> @@ -919,7 +920,7 @@ static int fsl_sai_resume(struct device *dev) regcache_cache_only(sai->regmap, false); regmap_write(sai->regmap, FSL_SAI_TCSR, FSL_SAI_CSR_SR); regmap_write(sai->regmap, FSL_SAI_RCSR, FSL_SAI_CSR_SR); - msleep(1); + usleep_range(1000, 2000); regmap_write(sai->regmap, FSL_SAI_TCSR, 0); regmap_write(sai->regmap, FSL_SAI_RCSR, 0); return regcache_sync(sai->regmap); -- 1.8.3.1
[toc] | [prev] | [next] | [standalone]
| From | Mark Brown <broonie@kernel.org> |
|---|---|
| Date | 2016-01-22 17:50 +0100 |
| Subject | Re: [PATCH 1/2] ASoC: fsl_sai: Use usleep_range() instead of msleep() |
| Message-ID | <qTN4o-6Dx-41@gated-at.bofh.it> |
| In reply to | #1310069 |
[Multipart message — attachments visible in raw view] — view raw
On Fri, Jan 15, 2016 at 07:35:24PM +0800, Xiubo Li wrote: > Since msleep() will sleep longer than intended time for values less > than 20ms, this patch allows the use of usleep_range for just 1ms. > usleep_range is a finer precision implementation of msleep and is > designed to be a drop-in replacement for udelay where a precise > sleep/busy-wait is unnecessary. A similar change seems to have already been applied.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web