linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Doug Anderson <dianders@chromium.org>
To: Akash Asthana <akashast@codeaurora.org>
Cc: Mark Brown <broonie@kernel.org>, Andy Gross <agross@kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	linux-arm-msm <linux-arm-msm@vger.kernel.org>,
	Rajendra Nayak <rnayak@codeaurora.org>,
	Georgi Djakov <georgi.djakov@linaro.org>,
	Stephen Boyd <swboyd@chromium.org>,
	Maulik Shah <mkshah@codeaurora.org>,
	ctheegal@codeaurora.org, Matthias Kaehlcke <mka@chromium.org>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-spi <linux-spi@vger.kernel.org>
Subject: Re: [PATCH] spi: spi-geni-qcom: Set the clock properly at runtime resume
Date: Thu, 9 Jul 2020 07:35:35 -0700	[thread overview]
Message-ID: <CAD=FV=Vpw0VeSucRBDdkT5g6N5DrJeecBuDT3fMhhzF8adVpGQ@mail.gmail.com> (raw)
In-Reply-To: <c7956e65-d21b-8844-45d7-de06b8d3d4f0@codeaurora.org>

Hi,

On Thu, Jul 9, 2020 at 12:30 AM Akash Asthana <akashast@codeaurora.org> wrote:
>
> Hi Doug,
>
> >
> > @@ -670,7 +674,13 @@ static int __maybe_unused spi_geni_runtime_resume(struct device *dev)
> >       if (ret)
> >               return ret;
> >
> > -     return geni_se_resources_on(&mas->se);
> > +     ret = geni_se_resources_on(&mas->se);
> > +     if (ret)
> > +             return ret;
> > +
> > +     dev_pm_opp_set_rate(mas->dev, mas->cur_sclk_hz);
> > +
> > +     return 0;
> >   }
>
> Should we fail to resume if error is returned from 'opp_set_rate'?
>
> 'spi_geni_prepare_message' use to fail for any error from
> 'opp_set_rate'  before patch series "Avoid clock setting if not needed".
>
> But now it's possible that 'prepare_message' can return success even
> when opp are not at desired state(from previous resume call).

I can.  I was following the spi_geni_runtime_suspend() example and
just calling it, but I suppose it makes sense that setting the clock
to 0 failing isn't as important as setting it to something non-zero.

I'll post a v2 real quick and keep Acks / Reviews.

-Doug

  reply	other threads:[~2020-07-09 14:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-08 23:39 [PATCH] spi: spi-geni-qcom: Set the clock properly at runtime resume Douglas Anderson
2020-07-09  7:30 ` Akash Asthana
2020-07-09 14:35   ` Doug Anderson [this message]
2020-07-09  8:55 ` Rajendra Nayak
2020-07-09 14:44   ` Doug Anderson
2020-07-09 11:22 ` Mark Brown

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='CAD=FV=Vpw0VeSucRBDdkT5g6N5DrJeecBuDT3fMhhzF8adVpGQ@mail.gmail.com' \
    --to=dianders@chromium.org \
    --cc=agross@kernel.org \
    --cc=akashast@codeaurora.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=broonie@kernel.org \
    --cc=ctheegal@codeaurora.org \
    --cc=georgi.djakov@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=mka@chromium.org \
    --cc=mkshah@codeaurora.org \
    --cc=rnayak@codeaurora.org \
    --cc=swboyd@chromium.org \
    /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;
as well as URLs for NNTP newsgroup(s).