From mboxrd@z Thu Jan 1 00:00:00 1970 From: shawn.guo@linaro.org (Shawn Guo) Date: Mon, 1 Jul 2013 22:04:55 +0800 Subject: [PATCH 1/4] ASoC: sgtl5000: give it a ramping time before writting In-Reply-To: <20130701100710.GB27646@sirena.org.uk> References: <1372666571-17276-1-git-send-email-shawn.guo@linaro.org> <1372666571-17276-2-git-send-email-shawn.guo@linaro.org> <20130701100710.GB27646@sirena.org.uk> Message-ID: <20130701140454.GP13206@S2101-09.ap.freescale.net> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Mon, Jul 01, 2013 at 11:07:10AM +0100, Mark Brown wrote: > On Mon, Jul 01, 2013 at 04:16:08PM +0800, Shawn Guo wrote: > > > + /* > > + * It seems that sgtl5000 takes a longer time to get the registers > > + * ready for write than bread. Let's give it a ramping time before > > + * the first write goes. > > + */ > > + msleep(50); > > + > > /* Ensure sgtl5000 will start with sane register values */ > > ret = sgtl5000_fill_defaults(sgtl5000); > > if (ret) > > This seems like a really odd place to add the sleep - I'd have expected > this to be a part of or just after the reset operation. Since I do not see any reset operation between clk_prepare_enable() and sgtl5000_fill_defaults(), so I will move the sleep into sgtl5000_fill_defaults() call. > It's a *really* > long sleep too, though if that's what you need that's what you need. > Yeah, from my testing it's what we need. > Also "bread" :) Yeah, I was really hungry when writing the comment. Shawn