From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A737AE81E0F for ; Fri, 6 Oct 2023 15:37:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232883AbjJFPhk (ORCPT ); Fri, 6 Oct 2023 11:37:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51560 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232859AbjJFPhi (ORCPT ); Fri, 6 Oct 2023 11:37:38 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11E81AD; Fri, 6 Oct 2023 08:37:36 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A52ABC433C7; Fri, 6 Oct 2023 15:37:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696606655; bh=NmvkWFD8bZHwX17GRmdTtmtgoVM/o6Qpx7umeFUh+O0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=A5llU35VLJGd50hYxUpaWZU9/v5UvRAzBWhsxz+ESpi21DbdU67fPQh+mIokBW06b bQwj9Kr2EtNJh2Qd3oTOnwx3oDkrI6iO/UsIIe1N46QPM8LW5CgUEabASjf/yR2m7V NbZvoe4JWQCqeJdiv4DjN3Px1Tx9/uoVl2+Wvp99voVIxIBXZC58p5n+3QU3W7TQIU wJT1lKhqO4iFIJz7QF04sa/DPW8N/sVhjenipYP3AQOF1BVitEETtUZUSQJCZWdTdp 6vCeu96fhuChuvsSUTwGBshAQVcWZpx0FtLLg4LZqutyZY16PB/D4CPyh/0iaf8B6T sAZE+gUqD557A== Received: from johan by xi.lan with local (Exim 4.96) (envelope-from ) id 1qomtm-00068G-0D; Fri, 06 Oct 2023 17:37:54 +0200 Date: Fri, 6 Oct 2023 17:37:54 +0200 From: Johan Hovold To: Tony Lindgren Cc: Andy Shevchenko , Greg Kroah-Hartman , Jiri Slaby , Dhruva Gole , Ilpo =?utf-8?B?SsOkcnZpbmVu?= , John Ogness , Sebastian Andrzej Siewior , Vignesh Raghavendra , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, Maximilian Luz Subject: Re: [PATCH] serial: core: Fix checks for tx runtime PM state Message-ID: References: <20231005075644.25936-1-tony@atomide.com> <20231006072738.GI34982@atomide.com> <20231006083712.GJ34982@atomide.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231006083712.GJ34982@atomide.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 06, 2023 at 11:37:12AM +0300, Tony Lindgren wrote: > * Johan Hovold [231006 08:03]: > > On Fri, Oct 06, 2023 at 10:27:38AM +0300, Tony Lindgren wrote: > > > You're right, so how about: > > > > > > The serdev device and the serial core controller devices are children of > > > the serial port hardware device. The runtime PM usage count from serdev > > > device does not propagate to the serial core device siblings, it only > > > propagates to the parent. > > > > That's still not accurate: > > > > - the serdev device is not a child (but a grandchild) of the serial > > controller > > - the new serial port devices are not "siblings" (but descendants) of > > the serial controller > > - the serdev controller ignores the power state of its children so that > > bit is also incorrect > > > > You just want to describe the fact that the serdev controller runtime PM > > state is currently not propagated to your new "devices" that are > > descendants to the serial controller. > > OK so let's just use: > > The serdev controller runtime PM state is not currently propagated > to the serial core controller port device. The runtime PM usage count > only propagates to the parent device. That sounds better. > > I'm still not sure why it was implemented this way, or if it is even > > correct, but this seems to be the state of things. > > Care to clarify a bit which parts are unclear? The hierarchy of port > devices, making serial core manage runtime PM in a generic way, or > flushing tx? I still don't know why you added these two new abstractions (controller and port), and that isn't really explained by the commit message either. And if these are indeed needed, then why isn't the serdev controller now a child of the "port" device, for example? There are just a lot of questions and I worry that there are more problems lurking, but unfortunately I still don't have time to review this. Johan