All of lore.kernel.org
 help / color / mirror / Atom feed
From: luhua xu <luhua.xu@mediatek.com>
To: Mark Brown <broonie@kernel.org>
Cc: wsd_upstream@mediatek.com, linux-kernel@vger.kernel.org,
	linux-spi@vger.kernel.org, linux-mediatek@lists.infradead.org,
	Matthias Brugger <matthias.bgg@gmail.com>,
	linux-arm-kernel@lists.infradead.org
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().


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

WARNING: multiple messages have this Message-ID (diff)
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().

WARNING: multiple messages have this Message-ID (diff)
From: luhua xu <luhua.xu@mediatek.com>
To: Mark Brown <broonie@kernel.org>
Cc: wsd_upstream@mediatek.com, linux-kernel@vger.kernel.org,
	linux-spi@vger.kernel.org, linux-mediatek@lists.infradead.org,
	Matthias Brugger <matthias.bgg@gmail.com>,
	linux-arm-kernel@lists.infradead.org
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().


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-10-24  6:25 UTC|newest]

Thread overview: 25+ 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
2019-10-23 12:38 ` Luhua Xu
2019-10-23 12:38 ` Luhua Xu
2019-10-23 12:38 ` [PATCH 1/1] spi: mediatek: add power control when set_cs Luhua Xu
2019-10-23 12:38   ` Luhua Xu
2019-10-23 12:38   ` Luhua Xu
2019-10-23 12:38   ` Luhua Xu
2019-10-23 15:11   ` Mark Brown
2019-10-23 15:11     ` Mark Brown
2019-10-23 15:11     ` Mark Brown
2019-10-24  6:25     ` luhua xu [this message]
2019-10-24  6:25       ` luhua xu
2019-10-24  6:25       ` luhua xu
2019-10-24 10:11       ` luhua xu
2019-10-24 10:11         ` luhua xu
2019-10-24 10:11         ` luhua xu
2019-10-24 11:19         ` Mark Brown
2019-10-24 11:19           ` Mark Brown
2019-10-24 11:19           ` Mark Brown
2019-10-24 10:23       ` Mark Brown
2019-10-24 10:23         ` 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
2019-10-23 15:11   ` Mark Brown
2019-10-23 15:11   ` 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 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.