Re: [PATCH v3 5/5] tty/serial: Add Spreadtrum sc9836-uart driver support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2014-11-27 2:29 GMT+08:00 Murali Karicheri <m-karicheri2@xxxxxx>:
> On 11/25/2014 07:16 AM, Chunyan Zhang wrote:
>>
>> Add a full sc9836-uart driver for SC9836 SoC which is based on the

>> +#include<linux/clk.h>
>
> How about sorting this includes? asm/irq.h go first followed linux/ in
> alphabatical order?

>> +static irqreturn_t sprd_handle_irq(int irq, void *dev_id)
>> +{
>> +       struct uart_port *port = (struct uart_port *)dev_id;
>> +       u32 ims;
>> +
>> +       ims = serial_in(port, SPRD_IMSR);
>> +
>> +       serial_out(port, SPRD_ICLR, ~0);
>> +
>> +       if (ims&  (SPRD_IMSR_RX_FIFO_FULL |
>> +               SPRD_IMSR_BREAK_DETECT | SPRD_IMSR_TIMEOUT)) {
>> +               sprd_rx(irq, port);
>> +       }
>> +       if (ims&  SPRD_IMSR_TX_FIFO_EMPTY)
>> +               sprd_tx(irq, port);
>> +
>> +       return IRQ_HANDLED;
>
> You are always returning IRQ_HANDLED and this is registered as a SHARED irq.
> Is there a chance this handler is called and the irq event doesn't
> belong to this device?
>
> Murali

You are right, this is not a SHARED irq. I'll pass 0 for irqflags when
called 'devm_request_irq' in the next version patch.

Thank you,
Chunyan
--
To unsubscribe from this list: send the line "unsubscribe linux-api" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux