public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@deeprootsystems.com>
To: Vikram Pandita <vikram.pandita@ti.com>
Cc: linux-arm-kernel@lists.arm.linux.org.uk, linux-omap@vger.kernel.org
Subject: Re: [PATCH 1/2] Serial: Define IRQ flags for 8250 driver
Date: Fri, 12 Jun 2009 09:47:03 -0700	[thread overview]
Message-ID: <8763f1iem0.fsf@deeprootsystems.com> (raw)
In-Reply-To: <1244768030-23022-1-git-send-email-vikram.pandita@ti.com> (Vikram Pandita's message of "Thu\, 11 Jun 2009 19\:53\:50 -0500")

Vikram Pandita <vikram.pandita@ti.com> writes:

> Boards with serial irq High/Low/Rising/Falling IRQ requirement
> do not work today
>
> 8250 serial driver does not have provision to pass on IRQ flags
> from platform_device
>
> This is requred for OMAP Zoom2 board for which Serial IRQ trigger
> is IRQF_TRIGGER_HIGH
>
> Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>

Acked-by: Kevin Hilman <khilman@deeprootsystems.com>

Tested and verified on zoom2.  This should to go linux-serial, and CC
LKML, linux-omap.

Before sending, I would update the subject/description slightly:

Subject: serial: 8250: add IRQ trigger support

Description:
There is currently no provision for passing IRQ trigger flags for
serial IRQs with triggering requirements (such as GPIO IRQs.)

This patch adds UPF_IRQ_TRIG_* flags which map on to IRQF_TRIGGER_*
flags.

> ---
>  drivers/serial/8250.c       |   10 ++++++++++
>  include/linux/serial_core.h |    4 ++++
>  2 files changed, 14 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
> index bab115e..8235ef5 100644
> --- a/drivers/serial/8250.c
> +++ b/drivers/serial/8250.c
> @@ -1641,6 +1641,16 @@ static int serial_link_irq_chain(struct uart_8250_port *up)
>  	struct irq_info *i;
>  	int ret, irq_flags = up->port.flags & UPF_SHARE_IRQ ? IRQF_SHARED : 0;
>  
> +	/* Get IRQ Trigger Flag */
> +	if (up->port.flags & UPF_IRQ_TRIG_RISING)
> +		irq_flags |= IRQF_TRIGGER_RISING;
> +	else if (up->port.flags & UPF_IRQ_TRIG_FALLING)
> +		irq_flags |= IRQF_TRIGGER_FALLING;
> +	else if (up->port.flags & UPF_IRQ_TRIG_HIGH)
> +		irq_flags |= IRQF_TRIGGER_HIGH;
> +	else if (up->port.flags & UPF_IRQ_TRIG_LOW)
> +		irq_flags |= IRQF_TRIGGER_LOW;
> +
>  	mutex_lock(&hash_mutex);
>  
>  	h = &irq_lists[up->port.irq % NR_IRQ_HASH];
> diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
> index 57a97e5..07591d5 100644
> --- a/include/linux/serial_core.h
> +++ b/include/linux/serial_core.h
> @@ -296,7 +296,11 @@ struct uart_port {
>  #define UPF_SPD_WARP		((__force upf_t) (0x1010))
>  #define UPF_SKIP_TEST		((__force upf_t) (1 << 6))
>  #define UPF_AUTO_IRQ		((__force upf_t) (1 << 7))
> +#define UPF_IRQ_TRIG_RISING	((__force upf_t) (1 << 8))
> +#define UPF_IRQ_TRIG_FALLING	((__force upf_t) (1 << 9))
> +#define UPF_IRQ_TRIG_HIGH	((__force upf_t) (1 << 10))
>  #define UPF_HARDPPS_CD		((__force upf_t) (1 << 11))
> +#define UPF_IRQ_TRIG_LOW	((__force upf_t) (1 << 12))
>  #define UPF_LOW_LATENCY		((__force upf_t) (1 << 13))
>  #define UPF_BUGGY_UART		((__force upf_t) (1 << 14))
>  #define UPF_NO_TXEN_TEST	((__force upf_t) (1 << 15))
> -- 
> 1.6.0.3.613.g9f8f13
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2009-06-12 16:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-12  0:53 [PATCH 1/2] Serial: Define IRQ flags for 8250 driver Vikram Pandita
2009-06-12 16:26 ` Marc Zyngier
2009-06-12 16:47 ` Kevin Hilman [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-06-12  0:49 Vikram Pandita
2009-06-12  1:46 ` Menon, Nishanth
2009-06-12  6:37   ` Felipe Balbi
2009-06-12 14:45     ` Menon, Nishanth
2009-06-12 14:50       ` Pandita, Vikram
2009-06-12 14:54         ` Menon, Nishanth
2009-06-12 19:01         ` Felipe Balbi
2009-06-12 19:11           ` Pandita, Vikram
2009-06-12 23:13           ` Felipe Contreras

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=8763f1iem0.fsf@deeprootsystems.com \
    --to=khilman@deeprootsystems.com \
    --cc=linux-arm-kernel@lists.arm.linux.org.uk \
    --cc=linux-omap@vger.kernel.org \
    --cc=vikram.pandita@ti.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