From: luhua xu <luhua.xu@mediatek.com>
To: Mark Brown <broonie@kernel.org>
Cc: Matthias Brugger <matthias.bgg@gmail.com>,
<linux-spi@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-mediatek@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <wsd_upstream@mediatek.com>
Subject: Re: [PATCH 1/1] spi: mediatek: add power control when set_cs
Date: Thu, 24 Oct 2019 14:25:19 +0800 [thread overview]
Message-ID: <1571898319.4311.3.camel@mbjsdccf07> (raw)
In-Reply-To: <20191023151121.GC5723@sirena.co.uk>
On Wed, 2019-10-23 at 16:11 +0100, Mark Brown wrote:
> On Wed, Oct 23, 2019 at 08:38:42AM -0400, Luhua Xu wrote:
> > From: "luhua.xu" <luhua.xu@mediatek.com>
>
> > Use runtime PM to power spi when set_cs
> > As set_cs may be called from interrupt context,
> > set runtime PM IRQ safe for spi.
>
> Why might we be trying to set the chip select state while the device is
> runtime idle? It seems like whatever is trying to set the chip select
> should be dealing with this, not the chip select operation itself since
> that's unlikely to be happening in isolation.
Hi Mark,
Spi framework provideds spi_setup() to modify spi settings for spi
device (maybe spi is runtime idle now), and this will call
spi_controller->set_cs() accessing registers.
Other spi_controller callbacks that need to access hardware registers,
are triggered by spi transfer. Spi framework will get and put runtime
power in __spi_pump_message().
next prev parent reply other threads:[~2019-10-24 6:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-23 12:38 [PATCH 0/1] Add spi power control when set cs Luhua Xu
[not found] ` <1571834322-1121-1-git-send-email-luhua.xu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2019-10-23 12:38 ` [PATCH 1/1] spi: mediatek: add power control when set_cs Luhua Xu
2019-10-23 15:11 ` Mark Brown
2019-10-24 6:25 ` luhua xu [this message]
2019-10-24 10:11 ` luhua xu
2019-10-24 11:19 ` Mark Brown
2019-10-24 10:23 ` Mark Brown
2019-10-23 15:11 ` [PATCH 0/1] Add spi power control when set cs 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=1571898319.4311.3.camel@mbjsdccf07 \
--to=luhua.xu@mediatek.com \
--cc=broonie@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-spi@vger.kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=wsd_upstream@mediatek.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;
as well as URLs for NNTP newsgroup(s).