[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZTe11rbKgcusPRD/@smile.fi.intel.com>
Date: Tue, 24 Oct 2023 15:17:26 +0300
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: Tony Lindgren <tony@...mide.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jirislaby@...nel.org>,
Rob Herring <robh@...nel.org>, Dhruva Gole <d-gole@...com>,
Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
John Ogness <john.ogness@...utronix.de>,
Johan Hovold <johan@...nel.org>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Vignesh Raghavendra <vigneshr@...com>,
linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org,
Maximilian Luz <luzmaximilian@...il.com>
Subject: Re: [RFC PATCH 1/2] serial: core: Move tty and serdev to be children
of serial core port device
On Tue, Oct 24, 2023 at 02:36:18PM +0300, Tony Lindgren wrote:
> Let's move tty and serdev controller to be children of the serial core port
> device. This way the runtime PM usage count of a child device propagates
> to the serial hardware device.
>
> The tty and serdev devices are associated with a specific serial port of
> a serial hardware controller device, and we now have serial core hierarchy
> of controllers and ports.
>
> The tty device moves happily with just a change of the parent device.
> The serdev device init needs some changes to separate the serial hardware
> controller device from the parent device.
...
> - ctrl->dev.of_node = parent->of_node;
> + ctrl->dev.of_node = host->of_node;
Even above should have been using device_set_node(&ctrl->dev, dev_fwnode(host)).
...
> /* Make sure controller and ResourceSource handle match */
> - if (ACPI_HANDLE(ctrl->dev.parent) != lookup.controller_handle)
> + if (ACPI_HANDLE(ctrl->host) != lookup.controller_handle)
This can be changed to use device_match_acpi_handle().
> return -ENODEV;
...
> - if (!has_acpi_companion(ctrl->dev.parent))
> + if (!has_acpi_companion(ctrl->host))
I prefer is_acpi_device_node(dev_fwnode(...)) check, but here seems no other
use for fwnode (haven't checked the full context, though).
> return -ENODEV;
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists