linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@ti.com>
To: Tony Lindgren <tony@atomide.com>
Cc: Felipe Balbi <balbi@ti.com>,
	linux-serial@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	Kevin Hilman <khilman@linaro.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Roger Quadros <rogerq@ti.com>
Subject: Re: [PATCH] serial: omap: Add support for optional wake-up interrupt
Date: Mon, 21 Oct 2013 07:21:16 -0500	[thread overview]
Message-ID: <20131021122116.GL18921@gimli> (raw)
In-Reply-To: <20131018225606.GT15154@atomide.com>

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

On Fri, Oct 18, 2013 at 03:56:07PM -0700, Tony Lindgren wrote:
> * Tony Lindgren <tony@atomide.com> [131018 09:45]:
> > * Tony Lindgren <tony@atomide.com> [131018 09:38]:
> > > * Felipe Balbi <balbi@ti.com> [131018 09:19]:
> > > > > @@ -786,7 +813,10 @@ static void serial_omap_shutdown(struct uart_port *port)
> > > > >  
> > > > >  	pm_runtime_mark_last_busy(up->dev);
> > > > >  	pm_runtime_put_autosuspend(up->dev);
> > > > > -	free_irq(up->port.irq, up);
> > > > > +
> > > > > +	for (i = 0; i < ARRAY_SIZE(up->irqs); i++)
> > > > > +		if (up->irqs[i])
> > > > > +			devm_free_irq(up->port.dev, up->irqs[i], up);
> > > > 
> > > > do you need this at all if you're using devm_* ?
> > > 
> > > So it seems, startup and shutdown are managed by serial_core and
> > > that's what at least clps711x.c serial driver is doing.
> > 
> > And that means devm_* in this case does not really help us
> > here..
> > 
> > I guess we could keep the IRQ requested from probe, but
> > there's probably a reason why it's done in startup/shutdown.
> > 
> > So I'll just drop the devm_* changes for now.
> 
> Here's an updated simplified version. I also got rid of the
> for loops as the wake-up interrupt is optional and it made the
> code a bit of a pain to read.
> 
> Regards,
> 
> Tony
> 
> 
> 8< ----------------------------------------
> From: Tony Lindgren <tony@atomide.com>
> Date: Wed, 16 Oct 2013 10:27:28 -0700
> Subject: [PATCH] serial: omap: Add support for optional wake-up interrupt
> 
> With the recent pinctrl-single changes, omaps can treat
> wake-up events from deeper idle states as interrupts.
> 
> There's a separate "io chain" controller on most omaps
> that stays enabled when the device hits off-idle and the
> regular interrupt controller is powered off.
> 
> Let's add support for the optional second interrupt for
> wake-up events. And then serial-omap can manage the
> wake-up interrupt from it's runtime PM calls to avoid
> spurious interrupts during runtime.
> 
> Note that the wake interrupt is board specific as it
> uses the UART RX pin, and for omap3, there are six pin
> options for UART3 RX pin.
> 
> Also Note that the legacy platform based booting handles
> the wake-ups in the legacy mux driver and does not need to
> pass the wake-up interrupt to the driver.
> 
> And finally, to pass the wake-up interrupt in the dts file,
> either interrupt-map or the pending interrupts-extended
> property needs to be passed. It's probably best to use
> interrupts-extended when it's available.
> 
> Cc: Felipe Balbi <balbi@ti.com>
> Cc: Kevin Hilman <khilman@linaro.org>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Roger Quadros <rogerq@ti.com>
> Signed-off-by: Tony Lindgren <tony@atomide.com>

looks much nicer

Reviewed-by: Felipe Balbi <balbi@ti.com>

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  parent reply	other threads:[~2013-10-21 12:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-17 23:28 [PATCH] serial: omap: Add support for optional wake-up interrupt Tony Lindgren
2013-10-18 16:19 ` Felipe Balbi
2013-10-18 16:37   ` Tony Lindgren
2013-10-18 16:45     ` Tony Lindgren
2013-10-18 22:56       ` Tony Lindgren
2013-10-21  9:07         ` Roger Quadros
2013-10-21 12:21         ` Felipe Balbi [this message]
2013-10-22 13:49           ` Tony Lindgren

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=20131021122116.GL18921@gimli \
    --to=balbi@ti.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=khilman@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=rogerq@ti.com \
    --cc=tony@atomide.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).