From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: John Garry <john.garry@huawei.com>,
gregkh@linuxfoundation.org, slaby@suse.com,
p.zabel@pengutronix.de, heiko@sntech.de, ed.blake@sondrel.com,
jhogan@kernel.org
Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
linuxarm@huawei.com
Subject: Re: [RFC PATCH 2/2] serial: 8250_dw: support polling mode
Date: Fri, 23 Feb 2018 19:35:13 +0200 [thread overview]
Message-ID: <1519407313.10722.127.camel@linux.intel.com> (raw)
In-Reply-To: <1519324923-196857-3-git-send-email-john.garry@huawei.com>
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@linux.intel.com>
Intel Finland Oy
next prev parent reply other threads:[~2018-02-23 17:35 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-22 18:42 [RFC PATCH 0/2] serial: 8250_dw: IO space + polling mode support John Garry
2018-02-22 18:42 ` [RFC PATCH 1/2] serial: 8250_dw: add IO space support John Garry
2018-02-22 18:42 ` [RFC PATCH 2/2] serial: 8250_dw: support polling mode John Garry
2018-02-23 17:35 ` Andy Shevchenko [this message]
2018-02-26 10:54 ` John Garry
2018-02-23 10:30 ` [RFC PATCH 0/2] serial: 8250_dw: IO space + polling mode support Andy Shevchenko
2018-02-23 11:02 ` John Garry
2018-02-23 17:31 ` Andy Shevchenko
2018-02-26 9:33 ` John Garry
2018-02-26 9:53 ` Andy Shevchenko
2018-02-26 10:45 ` John Garry
2018-02-26 11:28 ` Andy Shevchenko
2018-02-26 11:56 ` John Garry
2018-02-26 12:21 ` Andy Shevchenko
2018-02-26 12:27 ` Andy Shevchenko
2018-02-26 13:15 ` John Garry
2018-02-26 15:02 ` Andy Shevchenko
2018-02-26 15:07 ` John Garry
2018-04-12 16:31 ` John Garry
2018-02-26 12:37 ` John Garry
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=1519407313.10722.127.camel@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=ed.blake@sondrel.com \
--cc=gregkh@linuxfoundation.org \
--cc=heiko@sntech.de \
--cc=jhogan@kernel.org \
--cc=john.garry@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=p.zabel@pengutronix.de \
--cc=slaby@suse.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