From: Lee Jones <lee.jones@linaro.org>
To: Charles Keepax <ckeepax@opensource.cirrus.com>
Cc: linux-kernel@vger.kernel.org, patches@opensource.cirrus.com
Subject: Re: [PATCH 1/2] mfd: madera: Allow more time for hardware reset
Date: Mon, 13 Jan 2020 10:41:41 +0000 [thread overview]
Message-ID: <20200113104141.GC5414@dell> (raw)
In-Reply-To: <20200108084640.GI10451@ediswmail.ad.cirrus.com>
On Wed, 08 Jan 2020, Charles Keepax wrote:
> On Tue, Jan 07, 2020 at 02:27:42PM +0000, Lee Jones wrote:
> > On Mon, 06 Jan 2020, Charles Keepax wrote:
> >
> > > Both manual and power on resets have a brief period where the chip will
> > > not be accessible immediately afterwards. Extend the time allowed for
> > > this from a minimum of 1mS to 2mS based on newer evaluation of the
> > > hardware and ensure this reset happens in all reset conditions. Whilst
> > > making the change also remove the redundant NULL checks in the reset
> > > functions as the GPIO functions already check for this.
> > >
> > > Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
> > > ---
> > > drivers/mfd/madera-core.c | 18 ++++++++++--------
> > > 1 file changed, 10 insertions(+), 8 deletions(-)
> > >
> > > diff --git a/drivers/mfd/madera-core.c b/drivers/mfd/madera-core.c
> > > index a8cfadc1fc01e..f41ce408259fb 100644
> > > --- a/drivers/mfd/madera-core.c
> > > +++ b/drivers/mfd/madera-core.c
> > > @@ -238,6 +238,11 @@ static int madera_wait_for_boot(struct madera *madera)
> > > return ret;
> > > }
> > >
> > > +static inline void madera_reset_delay(void)
> > > +{
> > > + usleep_range(2000, 3000);
> > > +}
> >
> > Hmm ... We usually shy away from abstraction for the sake of
> > abstraction. What's preventing you from using the preferred method of
> > simply calling the abstracted function from each of the call-sites?
> >
> > I could understand (a little) if you needed to frequently change these
> > values, since changing them in once place is obviously simpler than
> > changing them in 3, but even then it's marginal.
> >
>
> I don't mind manually inline it, we don't plan on changing the
> values very often certainly. It really was just to avoid future
> bugs if someone adds a new place that needs the delay or does
> indeed change the delay. Would you mind if I used a define for
> the time instead, if I am manually inlining? That keeps the same
> single place to update, but without the extra function.
That would be my preference, yes.
--
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
prev parent reply other threads:[~2020-01-13 10:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-06 10:28 [PATCH 1/2] mfd: madera: Allow more time for hardware reset Charles Keepax
2020-01-06 10:28 ` [PATCH 2/2] mfd: madera: Wait for boot done before accessing any other registers Charles Keepax
2020-01-07 14:29 ` Lee Jones
2020-01-08 8:42 ` Charles Keepax
2020-01-13 10:44 ` Lee Jones
2020-01-13 17:02 ` Charles Keepax
2020-01-16 13:21 ` Lee Jones
2020-01-07 14:27 ` [PATCH 1/2] mfd: madera: Allow more time for hardware reset Lee Jones
2020-01-08 8:46 ` Charles Keepax
2020-01-13 10:41 ` Lee Jones [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200113104141.GC5414@dell \
--to=lee.jones@linaro.org \
--cc=ckeepax@opensource.cirrus.com \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox