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 C670CC6FD19 for ; Fri, 10 Mar 2023 06:52:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230037AbjCJGwK (ORCPT ); Fri, 10 Mar 2023 01:52:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229996AbjCJGwE (ORCPT ); Fri, 10 Mar 2023 01:52:04 -0500 Received: from muru.com (muru.com [72.249.23.125]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 858E9F34D6; Thu, 9 Mar 2023 22:51:42 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id A623780F5; Fri, 10 Mar 2023 06:51:41 +0000 (UTC) Date: Fri, 10 Mar 2023 08:51:40 +0200 From: Tony Lindgren To: Andy Shevchenko Cc: "Rafael J. Wysocki" , Len Brown , Greg Kroah-Hartman , Jiri Slaby , Ilpo =?utf-8?B?SsOkcnZpbmVu?= , Johan Hovold , Sebastian Andrzej Siewior , Vignesh Raghavendra , linux-omap@vger.kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Subject: Re: [PATCH v6 1/1] serial: core: Start managing serial controllers to enable runtime PM Message-ID: <20230310065140.GI7501@atomide.com> References: <20230309085713.57700-1-tony@atomide.com> <20230309130700.GH7501@atomide.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230309130700.GH7501@atomide.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Tony Lindgren [230309 13:07]: > * Andy Shevchenko [230309 12:23]: > > On Thu, Mar 09, 2023 at 10:57:08AM +0200, Tony Lindgren wrote: > > > + err = pm_runtime_get(port_dev); > > > > Is not sync API a deliberate choice? Do we need to comment on why is so? > > I don't think it can be sync version.. See where all __uart_start() may > get called from. The pm_runtime_get() here is needed so the check for > pm_runtime_active() won't be racy. Maybe we can now leave out the > "start TX anyways" part though. To clarify, the reason we no longer need the check for "start TX anyways" is we now do pm_runtime_get() on the new port_dev. Earlier we tried to do it on the physical serial port driver dev where runtime PM possibly was not enabled. Regards, Tony