Linux SPI subsystem development
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Chunyan Zhang <zhang.lyra@gmail.com>
Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org,
	Orson Zhai <orsonzhai@gmail.com>,
	Baolin Wang <baolin.wang7@gmail.com>,
	Chunyan Zhang <chunyan.zhang@unisoc.com>,
	Bangzheng Liu <bangzheng.liu@unisoc.com>
Subject: Re: [PATCH] spi: add runtime PM for transfer_one_message
Date: Mon, 2 Nov 2020 18:16:55 +0000	[thread overview]
Message-ID: <20201102181655.GC5014@sirena.org.uk> (raw)
In-Reply-To: <20201102112239.19218-1-zhang.lyra@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1205 bytes --]

On Mon, Nov 02, 2020 at 07:22:39PM +0800, Chunyan Zhang wrote:
> From: Chunyan Zhang <chunyan.zhang@unisoc.com>

> Before transfer message, spi devices probably have been in runtime suspended,
> that would cause the kernel crash on some platforms once access spi
> registers, such as on Unisoc's SoCs. The spi devices can be suspended
> until message transfer completed.

This commit message is a bit hard to follow so I don't really understand
what the issue is.  We only ever call transfer_one_message() from within
__spi_pump_messages() which already handles auto_runtime_pm so I'm not
seeing the situation where we might get to transfer_one_message()
without having already runtime resumed the controller.  What exactly is
the error situation here?  This code has been around for a while and I'm
not aware of reports of issues here and I can't see anything unusual
that the Spreadtrum driver is doing.

Also why are we doing this in transfer_one_message() where it will only
work for controllers using that?  If we're missing runtime PM in some
paths then presumably controllers with a custom implementation are also
going to be affected as well, auto_runtime_pm is supposed to work for
them as well.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2020-11-02 18:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-02 11:22 [PATCH] spi: add runtime PM for transfer_one_message Chunyan Zhang
2020-11-02 18:16 ` Mark Brown [this message]
2020-11-03  7:30   ` Chunyan Zhang
2020-11-03 13:18     ` 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=20201102181655.GC5014@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=bangzheng.liu@unisoc.com \
    --cc=baolin.wang7@gmail.com \
    --cc=chunyan.zhang@unisoc.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=orsonzhai@gmail.com \
    --cc=zhang.lyra@gmail.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