Commit Graph

1 Commits

Author SHA1 Message Date
Andrew Halaney 331f16e847 serial: core: Start managing serial controllers to enable runtime PM
JIRA: https://issues.redhat.com/browse/RHEL-24205

commit 84a9582fd203063cd4d301204971ff2cd8327f1a
Author: Tony Lindgren <tony@atomide.com>
Date:   Thu May 25 14:30:30 2023 +0300

    serial: core: Start managing serial controllers to enable runtime PM

    We want to enable runtime PM for serial port device drivers in a generic
    way. To do this, we want to have the serial core layer manage the
    registered physical serial controller devices.

    To manage serial controllers, let's set up a struct bus and struct device
    for the serial core controller as suggested by Greg and Jiri. The serial
    core controller devices are children of the physical serial port device.
    The serial core controller device is needed to support multiple different
    kind of ports connected to single physical serial port device.

    Let's also set up a struct device for the serial core port. The serial
    core port instances are children of the serial core controller device.

    With the serial core port device we can now flush pending TX on the
    runtime PM resume as suggested by Johan.

    Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Suggested-by: Jiri Slaby <jirislaby@kernel.org>
    Suggested-by: Johan Hovold <johan@kernel.org>
    Signed-off-by: Tony Lindgren <tony@atomide.com>
    Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Link: https://lore.kernel.org/r/20230525113034.46880-1-tony@atomide.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Signed-off-by: Andrew Halaney <ahalaney@redhat.com>
2024-05-09 11:25:44 -04:00