devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Grygorii Strashko <grygorii.strashko@ti.com>
Cc: Kevin Hilman <khilman@linaro.org>,
	linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	devicetree-discuss@lists.ozlabs.org,
	Linus Walleij <linus.walleij@linaro.org>,
	Stephen Warren <swarren@wwwdotorg.org>
Subject: Re: [PATCH 2/3] ARM: OMAP2+: omap_device: add pinctrl handling
Date: Wed, 17 Jul 2013 08:38:38 -0700	[thread overview]
Message-ID: <20130717153838.GJ7656@atomide.com> (raw)
In-Reply-To: <1374061312-25469-3-git-send-email-grygorii.strashko@ti.com>

* Grygorii Strashko <grygorii.strashko@ti.com> [130717 04:49]:
> Before switching to DT pinctrl states of OMAP IPs have been handled by hwmod
> framework. After switching to DT-boot the pinctrl handling was dropped from
> hwmod framework and, as it was recommended, OMAP IP's drivers have to be updated
> to handle pinctrl states by itself using pinctrl_pm_select_xx() helpers
> (see http://lists.infradead.org/pipermail/linux-arm-kernel/2013-June/173514.html)
> 
> But this is not right for OMAP2+ SoC where real IPs state is controlled
> by omap_device core which enables/disables modules & clocks actually.

I'm not convinced we should try to handle this in a generic way
as only some devices need dynamic remuxing of some pins.

> For example, if OMAP I2C driver will handle pinctrl state during system wide
> suspend the following issue may occure:
> - suspend_noirq - I2C device can be still active because of PM auto-suspend
>   |-_od_suspend_noirq
>      |- omap_i2c_suspend_noirq
>         |- PINs state set to SLEEP
>   |- pm_generic_runtime_suspend
>      |- omap_i2c_runtime_suspend()
>         |- PINs state set to IDLE  <--- *oops* PINs state is IDLE and not SLEEP
>   |- omap_device_idle()
>      |- omap_hwmod_idle()
>         |- _idle()
>            |- disbale module (sysc&clocks)

And in this example you are assuming that you need separate idle and
sleep states, which is not true at least for most cases I've seen.

It is possible that am33xx needs separate idle and sleep states, but
most likely only for some pins. For omap[345] we can get away with
just the default state for most cases.

Regards,

Tony

  reply	other threads:[~2013-07-17 15:38 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-17 11:41 [PATCH 0/3] ARM: OMAP2+: omap_device: add dynamic pinctrl handling Grygorii Strashko
2013-07-17 11:41 ` [PATCH 1/3] pinctrl: rollback check for !dev->pins in pinctrl_pm_select*() APIs Grygorii Strashko
2013-07-17 15:40   ` Tony Lindgren
2013-07-26 23:22     ` Linus Walleij
2013-07-17 11:41 ` [PATCH 2/3] ARM: OMAP2+: omap_device: add pinctrl handling Grygorii Strashko
2013-07-17 15:38   ` Tony Lindgren [this message]
2013-07-17 16:56     ` Grygorii Strashko
2013-07-18  8:14       ` Tony Lindgren
2013-07-18 11:22         ` Grygorii Strashko
2013-07-17 11:41 ` [PATCH 3/3] ARM: dts: omap4-sdp: add dynamic pin states for uart3/4 Grygorii Strashko
     [not found]   ` <1374061312-25469-4-git-send-email-grygorii.strashko-l0cyMroinI0@public.gmane.org>
2013-07-17 15:32     ` Tony Lindgren
2013-07-17 16:41       ` Grygorii Strashko
     [not found]         ` <51E6C939.40208-l0cyMroinI0@public.gmane.org>
2013-07-18  8:09           ` Tony Lindgren
2013-07-18  8:54             ` Grygorii Strashko
2013-07-18  9:04               ` Tony Lindgren
2013-07-18 12:01                 ` Grygorii Strashko
2013-07-17 11:57 ` [PATCH 0/3] ARM: OMAP2+: omap_device: add dynamic pinctrl handling Roger Quadros
2013-07-17 12:30   ` Grygorii Strashko
2013-07-18  6:44     ` Roger Quadros

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=20130717153838.GJ7656@atomide.com \
    --to=tony@atomide.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=grygorii.strashko@ti.com \
    --cc=khilman@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=swarren@wwwdotorg.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 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).