[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1571898319.4311.3.camel@mbjsdccf07>
Date: Thu, 24 Oct 2019 14:25:19 +0800
From: luhua xu <luhua.xu@...iatek.com>
To: Mark Brown <broonie@...nel.org>
CC: Matthias Brugger <matthias.bgg@...il.com>,
<linux-spi@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-mediatek@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>, <wsd_upstream@...iatek.com>
Subject: Re: [PATCH 1/1] spi: mediatek: add power control when set_cs
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@...iatek.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().
Powered by blists - more mailing lists