All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Laurent Pinchart
	<laurent.pinchart+renesas-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>,
	linux-sh-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 2/2] spi: sh-msiof: Convert to clk_prepare/unprepare
Date: Thu, 28 Nov 2013 14:16:19 +0000	[thread overview]
Message-ID: <2098733.0eJJDEzLLR@avalon> (raw)
In-Reply-To: <20131128103407.GI14725-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>

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

Hi Mark,

On Thursday 28 November 2013 10:34:07 Mark Brown wrote:
> On Thu, Nov 28, 2013 at 02:39:43AM +0100, Laurent Pinchart wrote:
> > Get the driver ready for the migration to the common clock framework by
> > calling clk_prepare() and clk_unprepare(). The calls are added in the
> > probe and remove handlers as the clk_enable() and clk_disable() calls
> > are located in atomic context and there's no callback function in
> > non-atomic context that can be used to prepare/unprepare the clock.
> 
> Applied, thanks.  However it does seem like you should be able to move
> the prepare and disable to runtime PM rather than leaving it prepared
> for the entire time the driver is loaded.  In most systems this won't
> make any difference since prepare won't do anything but it's a bit
> neater.

It would be, but I believe the driver is currently broken in that regard. It 
calls the runtime PM sync API with a spinlock held, which if I'm not mistaken 
isn't right. That should be fixed, but is a bit out of scope of this work, 
hence the simple solution.

-- 
Regards,

Laurent Pinchart

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Laurent Pinchart <laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>
To: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Laurent Pinchart
	<laurent.pinchart+renesas-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>,
	linux-sh-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 2/2] spi: sh-msiof: Convert to clk_prepare/unprepare
Date: Thu, 28 Nov 2013 15:16:19 +0100	[thread overview]
Message-ID: <2098733.0eJJDEzLLR@avalon> (raw)
In-Reply-To: <20131128103407.GI14725-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>

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

Hi Mark,

On Thursday 28 November 2013 10:34:07 Mark Brown wrote:
> On Thu, Nov 28, 2013 at 02:39:43AM +0100, Laurent Pinchart wrote:
> > Get the driver ready for the migration to the common clock framework by
> > calling clk_prepare() and clk_unprepare(). The calls are added in the
> > probe and remove handlers as the clk_enable() and clk_disable() calls
> > are located in atomic context and there's no callback function in
> > non-atomic context that can be used to prepare/unprepare the clock.
> 
> Applied, thanks.  However it does seem like you should be able to move
> the prepare and disable to runtime PM rather than leaving it prepared
> for the entire time the driver is loaded.  In most systems this won't
> make any difference since prepare won't do anything but it's a bit
> neater.

It would be, but I believe the driver is currently broken in that regard. It 
calls the runtime PM sync API with a spinlock held, which if I'm not mistaken 
isn't right. That should be fixed, but is a bit out of scope of this work, 
hence the simple solution.

-- 
Regards,

Laurent Pinchart

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

  parent reply	other threads:[~2013-11-28 14:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-28  1:39 [PATCH 1/2] spi: sh-msiof: Use devm_* managed allocators Laurent Pinchart
2013-11-28  1:39 ` Laurent Pinchart
     [not found] ` <1385602783-3439-1-git-send-email-laurent.pinchart+renesas-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>
2013-11-28  1:39   ` [PATCH 2/2] spi: sh-msiof: Convert to clk_prepare/unprepare Laurent Pinchart
2013-11-28  1:39     ` Laurent Pinchart
     [not found]     ` <1385602783-3439-2-git-send-email-laurent.pinchart+renesas-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>
2013-11-28 10:34       ` Mark Brown
2013-11-28 10:34         ` Mark Brown
     [not found]         ` <20131128103407.GI14725-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2013-11-28 14:16           ` Laurent Pinchart [this message]
2013-11-28 14:16             ` Laurent Pinchart
2013-11-28 16:44             ` Mark Brown
2013-11-28 16:44               ` Mark Brown
2013-11-28 10:27 ` [PATCH 1/2] spi: sh-msiof: Use devm_* managed allocators 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=2098733.0eJJDEzLLR@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=laurent.pinchart+renesas-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org \
    --cc=linux-sh-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /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.