Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp467882rdb; Fri, 6 Oct 2023 08:37:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEu2LoVWZDPf9EwEPOuwUBITL0x/g2jlkp6Rp+PgPlEz1ncwsOrrUjHqiKWahduTbWCJbqj X-Received: by 2002:a05:6a21:788d:b0:16b:79c2:877f with SMTP id bf13-20020a056a21788d00b0016b79c2877fmr2471004pzc.53.1696606668932; Fri, 06 Oct 2023 08:37:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696606668; cv=none; d=google.com; s=arc-20160816; b=jQOF8zIVjhFw1dXMRlQ1C1nWoFHdsHSDTk9R6JEwDRIp3gADeswP/FcUeoih5vL1Rg nOxfH19pv/PsUyyBSvjH2X69pBw+VUFGLEfQc0+PBqOy0uCC2Xoc0ZIK9B/QOkZnookt Jg0z+E+HCVp/ubFrvIk2KO2rlnBza9d91Lforc/xPDotHLHIRMlP3fMVGN7p649/aKxx D+gQRS9Vb9IxWgUsK4eWSM4MYQmTnrhIBNiha4zsu7JRa3SLAX3GD5dZkRpsyrvQspPw sKHile6MoDwcWqvff3mtn1sXgByH1h5SXmpmcR7wuV0Jk83wFBGnsZAlCrHMR3ggXFUS pzuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=K5IlHKQ7mkM6vH7NZX95T1W0fi8QS9rVBsr6KYy7umA=; fh=wa2xo/IZPiZV0nf9HpgKtBOviz9sGbUVXMNT9dmfxOg=; b=RDhNO1vYGHZqvsfKIl6CO+iRfx9OuMGiUK+agRQQzEdJMk3myaCiiOdKfCQjtVISXv Kp9cBZIO+ifBKrsXtxCAqpSdER3abUM4aDkiEejlVOVs0FCJ7+G7A2FW5tH2PFUwz9Z8 7fN1PVsiNEy/BBRtdAoaerw8Do+1eaLt8M3DgAZzuh4vkXy8CG3IbUm0qsNTTnAE7DbZ 6SXyjtfpP2sG0pTFEG1Q0OdX2OLUf/vHTxGM8OdYfNisk2ozuwmiWRcLp+kiaUV/3JpQ 1sECJZ7R51wSPF6SjT6kJ/xAzRqco8DSLPYSYNwpkI7/fCQjrX6NEe3+Dk8nUEcR6yh3 JKtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=A5llU35V; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id bk13-20020a056a02028d00b0055fd1bfb109si3729391pgb.679.2023.10.06.08.37.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 08:37:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=A5llU35V; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 8E3DA82F1077; Fri, 6 Oct 2023 08:37:46 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232874AbjJFPhk (ORCPT + 99 others); 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> X-Spam-Status: No, score=2.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Fri, 06 Oct 2023 08:37:46 -0700 (PDT) X-Spam-Level: ** 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