All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
To: linux-serial@vger.kernel.org
Cc: linux-renesas-soc@vger.kernel.org, magnus.damm@gmail.com,
	laurent.pinchart@ideasonboard.com, wsa@the-dreams.de,
	robh@kernel.org, peda@axentia.se, geert@linux-m68k.org,
	linux-i2c@vger.kernel.org,
	Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Subject: [RFC v2 4/6] serial: core: support deferring serdev controller registration
Date: Mon, 17 Jul 2017 17:24:34 +0200	[thread overview]
Message-ID: <1500305076-15570-5-git-send-email-ulrich.hecht+renesas@gmail.com> (raw)
In-Reply-To: <1500305076-15570-1-git-send-email-ulrich.hecht+renesas@gmail.com>

serdev controllers may depend on other devices (such as multiplexers)
and thus require deferred probing support.

Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
---
 drivers/tty/serial/serial_core.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
index f534a40..30a8997 100644
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@ -2785,6 +2785,10 @@ int uart_add_one_port(struct uart_driver *drv, struct uart_port *uport)
 			uport->line, uport->dev, port, uport->tty_groups);
 	if (likely(!IS_ERR(tty_dev))) {
 		device_set_wakeup_capable(tty_dev, 1);
+	} else if (PTR_ERR(tty_dev) == -EPROBE_DEFER) {
+		ret = -EPROBE_DEFER;
+		state->uart_port = NULL;
+		goto out;
 	} else {
 		dev_err(uport->dev, "Cannot register tty device on line %d\n",
 		       uport->line);
-- 
2.7.4

  parent reply	other threads:[~2017-07-17 15:24 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-17 15:24 [RFC v2 0/6] serdev multiplexing support Ulrich Hecht
2017-07-17 15:24 ` [RFC v2 1/6] mux: include compiler.h from mux/consumer.h Ulrich Hecht
2017-07-31  9:02   ` Peter Rosin
2017-07-31  9:56     ` Ulrich Hecht
2017-07-31 11:22   ` Laurent Pinchart
2017-07-17 15:24 ` [RFC v2 2/6] serdev: add method to set parity Ulrich Hecht
2017-07-18 23:08   ` Rob Herring
2017-07-31 10:55   ` Laurent Pinchart
2017-07-17 15:24 ` [RFC v2 3/6] serdev: add multiplexer support Ulrich Hecht
2017-07-18 23:06   ` Rob Herring
2017-08-16 13:23     ` Ulrich Hecht
2017-07-19  7:22   ` Peter Rosin
2017-07-17 15:24 ` Ulrich Hecht [this message]
2017-07-19  3:24   ` [RFC v2 4/6] serial: core: support deferring serdev controller registration Rob Herring
2017-07-17 15:24 ` [RFC v2 5/6] max9260: add driver for i2c over GMSL passthrough Ulrich Hecht
2017-07-18  6:51   ` Geert Uytterhoeven
2017-07-19 15:00   ` Wolfram Sang
2017-08-16 13:23     ` Ulrich Hecht
2017-08-16 13:32       ` Laurent Pinchart
2017-07-31 11:13   ` Laurent Pinchart
2017-08-16 13:23     ` Ulrich Hecht
2017-08-16 13:30       ` Laurent Pinchart
2017-07-17 15:24 ` [RFC v2 6/6] ARM: dts: blanche: add SCIF1 and MAX9260 deserializer Ulrich Hecht
2017-07-18  6:52   ` Geert Uytterhoeven
2017-07-18  6:52     ` Geert Uytterhoeven
2017-07-31 11:20   ` Laurent Pinchart
2017-07-18 23:14 ` [RFC v2 0/6] serdev multiplexing support Rob Herring

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=1500305076-15570-5-git-send-email-ulrich.hecht+renesas@gmail.com \
    --to=ulrich.hecht+renesas@gmail.com \
    --cc=geert@linux-m68k.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=peda@axentia.se \
    --cc=robh@kernel.org \
    --cc=wsa@the-dreams.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.