[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1519407313.10722.127.camel@linux.intel.com>
Date: Fri, 23 Feb 2018 19:35:13 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: John Garry <john.garry@...wei.com>, gregkh@...uxfoundation.org,
slaby@...e.com, p.zabel@...gutronix.de, heiko@...ech.de,
ed.blake@...drel.com, jhogan@...nel.org
Cc: linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org,
linuxarm@...wei.com
Subject: Re: [RFC PATCH 2/2] serial: 8250_dw: support polling mode
On Fri, 2018-02-23 at 02:42 +0800, John Garry wrote:
> It would be useful to make this driver support some
> 8250-compatible devices which have no interrupt line.
>
> For these, we allow for no interrupt, and will fallback on
> polling mode.
>
> Note: the 8250 dt bindings state that "interrupts"
> is a required property:
> "interrupts : should contain uart interrupt."
>
> But the 8250_of.c driver can live without it. So
> this patch is going this way also.
It should be documented in the binding.
> if (irq < 0) {
> - if (irq != -EPROBE_DEFER)
> - dev_err(dev, "cannot get irq\n");
> - return irq;
> + if (irq == -EPROBE_DEFER)
> + return irq;
> + dev_warn(dev, "cannot get irq, using polling
> mode\n");
> + irq = 0;
NO_IRQ _is_ 0. You need to do something like
if (irq < 0) }
... leave existing code ...
}
if (!irq)
dev_warn(, "Use polling mode\n");
--
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Intel Finland Oy
Powered by blists - more mailing lists