On Wed, Feb 01, 2023 at 08:38:42AM +0200, Tony Lindgren wrote: > * Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> [230131 10:10]: > > On Mon, Jan 16, 2023 at 09:59:58AM +0200, Tony Lindgren wrote: > > > 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 do this, let's set up a 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. > > > > Looking better, but why is this new device a platform device? That > > feels odd, you should never have a platform device hanging off of a > > non-platform device, right? > > No special need for it to be a platform device. It just is easy to set > up, and for my test case the serial port physical device is also a > platform device. > > What's your preference here? Never make up a "fake" platform device please. Only use them for real platform devices. Use a virtual device if you want a virtual one. thanks, greg k-h