All of lore.kernel.org
 help / color / mirror / Atom feed
From: Doug Anderson <dianders@chromium.org>
To: ryandcase@chromium.org
Cc: Mark Brown <broonie@kernel.org>,
	Randy Dunlap <rdunlap@infradead.org>,
	Stephen Boyd <swboyd@chromium.org>,
	linux-arm-msm <linux-arm-msm@vger.kernel.org>,
	Trent Piepho <tpiepho@impinj.com>,
	boris.brezillon@bootlin.com,
	Girish Mahadevan <girishm@codeaurora.org>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-spi <linux-spi@vger.kernel.org>
Subject: Re: [PATCH v6 2/2] spi: Introduce new driver for Qualcomm QuadSPI controller
Date: Tue, 2 Oct 2018 15:40:12 -0700	[thread overview]
Message-ID: <CAD=FV=WiMbuVmimp9dQoW0MErm=Pw-w7N-mMTOStgtuLg7Vz8A@mail.gmail.com> (raw)
In-Reply-To: <20181002214709.162330-2-ryandcase@chromium.org>

Hi,

On Tue, Oct 2, 2018 at 2:48 PM Ryan Case <ryandcase@chromium.org> wrote:
> +#define RD_FIFO_STATUS 0x002c
> +#define FIFO_EMPTY     BIT(11)
> +#define WR_CNTS_MSK    0x7f0
> +#define WR_CNTS_SHFT   4
> +#define RDY_64BYTE     BIT(3)
> +#define RDY_32BYTE     BIT(2)
> +#define RDY_16BYTE     BIT(1)
> +#define FIFO_RDY       BIT(0)
> +
> +#define RD_FIFO_CFG            0x0028
> +#define CONTINUOUS_MODE                BIT(0)

You missed the above when re-sorting.  The section for 0x0028 should
be above the section for 0x002c.

IMO there's been enough spins of this patch and it's a pretty minor
change.  Mark: maybe you'd be OK with applying the current patch and
either fixing up the sort order as you apply or letting us know to
post a followup patch?  ...or if you'd like a v7 then please yell.


> +static int __maybe_unused qcom_qspi_suspend(struct device *dev)
> +{
> +       struct spi_master *master = dev_get_drvdata(dev);
> +       int ret;
> +
> +       ret = spi_master_suspend(master);
> +       if (ret)
> +               return ret;
> +
> +       ret = pm_runtime_force_suspend(dev);
> +       if (ret)
> +               spi_master_resume(master);
> +
> +       return ret;
> +}
> +
> +static int __maybe_unused qcom_qspi_resume(struct device *dev)
> +{
> +       struct spi_master *master = dev_get_drvdata(dev);
> +       int ret;
> +
> +       ret = pm_runtime_force_resume(dev);
> +       if (ret)
> +               return ret;
> +
> +       ret = spi_master_resume(master);
> +       if (ret)
> +               pm_runtime_force_suspend(dev);
> +
> +       return ret;
> +}

As per my new understanding (now that I've been educated by Rafael)
[1] possibly the error handling here could be revamped to handle the
case where suspend() may be called again after a failed resume().  I'd
rather not block this patch based on that discussion though, so this
feels like something to address by a follow-up patch.  Thus:

Reviewed-by: Douglas Anderson <dianders@chromium.org>


[1] https://lkml.kernel.org/r/CAJZ5v0hSohUZvJcVcQzy_DdSyPVppOABk0HELsa3dpvf12LMPQ@mail.gmail.com

  reply	other threads:[~2018-10-02 22:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-02 21:47 [PATCH v6 1/2] dt-bindings: spi: Qualcomm Quad SPI(QSPI) documentation Ryan Case
2018-10-02 21:47 ` [PATCH v6 2/2] spi: Introduce new driver for Qualcomm QuadSPI controller Ryan Case
2018-10-02 22:40   ` Doug Anderson [this message]
2018-10-08 23:46   ` Stephen Boyd
2018-10-08 23:46     ` Stephen Boyd
2018-10-11 14:56   ` Applied "spi: Introduce new driver for Qualcomm QuadSPI controller" to the spi tree Mark Brown
2018-10-11 14:56     ` Mark Brown
2018-10-11 14:56     ` 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=WiMbuVmimp9dQoW0MErm=Pw-w7N-mMTOStgtuLg7Vz8A@mail.gmail.com' \
    --to=dianders@chromium.org \
    --cc=boris.brezillon@bootlin.com \
    --cc=broonie@kernel.org \
    --cc=girishm@codeaurora.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=ryandcase@chromium.org \
    --cc=swboyd@chromium.org \
    --cc=tpiepho@impinj.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.