Return-Path: Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: [RFC 1/3] serdev: Add ACPI support From: Marcel Holtmann In-Reply-To: Date: Thu, 7 Sep 2017 19:57:02 +0200 Cc: =?utf-8?Q?Fr=C3=A9d=C3=A9ric_Danis?= , Sebastian Reichel , Loic Poulain , "open list:BLUETOOTH DRIVERS" , "linux-serial@vger.kernel.org" , "linux-acpi@vger.kernel.org" Message-Id: <9316EE4A-6FDF-4024-9709-E44824D26B4C@holtmann.org> References: <1504786214-1866-1-git-send-email-frederic.danis.oss@gmail.com> <1504786214-1866-2-git-send-email-frederic.danis.oss@gmail.com> <1BC8D5B0-EC18-4F20-9CBC-D73CB1765683@holtmann.org> To: Rob Herring Sender: linux-bluetooth-owner@vger.kernel.org List-ID: Hi Rob, >>> Signed-off-by: Frédéric Danis >>> --- >>> drivers/tty/serdev/core.c | 99 ++++++++++++++++++++++++++++++++++++++++++++--- >>> 1 file changed, 94 insertions(+), 5 deletions(-) > > [...] > >>> @@ -404,9 +488,14 @@ int serdev_controller_add(struct serdev_controller *ctrl) >>> if (ret) >>> return ret; >>> >>> - ret = of_serdev_register_devices(ctrl); >>> - if (ret) >>> + ret_of = of_serdev_register_devices(ctrl); >>> + ret_acpi = acpi_serdev_register_devices(ctrl); >>> + if (ret_of && ret_acpi) { >>> + dev_dbg(&ctrl->dev, "serdev%d no devices registered: of:%d acpi:%d\n", >>> + ctrl->nr, ret_of, ret_acpi); >>> + ret = -ENODEV; >>> goto out_dev_del; >>> + } >>> >>> dev_dbg(&ctrl->dev, "serdev%d registered: dev:%p\n", >>> ctrl->nr, &ctrl->dev); >> >> Shouldn’t we just consider to always register the controller? Even if there are no devices attached to it. > > You argued for the opposite at least in regards to a serdev ldisc. :) > The problem is we use the success or failure here to decide if we > create a tty char dev or not. I guess we could move that decision out > of the core and let the tty code check for devices and decide. we never got the serdev ldisc working. Is there still an attempt to get this working. I frankly don’t know what is best here. Regards Marcel