Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp2571583rdg; Mon, 16 Oct 2023 08:18:57 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFdQjxsymsUGf93Zpyeh2oAp2SNmVtO2euYofFPjPgbH3HRg6hbHEqp+7YD0gGBCc5E7sBd X-Received: by 2002:a05:6359:6006:b0:166:a6e3:d3d3 with SMTP id rw6-20020a056359600600b00166a6e3d3d3mr8571423rwb.8.1697469537165; Mon, 16 Oct 2023 08:18:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697469537; cv=none; d=google.com; s=arc-20160816; b=fIj8ZDJUPrNaN7X6hwBJjV5JwWN6J/VyaLXjxqCzvGtWkUjLh0F2bQdwEDoXkuY9Wm Oi2xbwHSBHPuUAUz+PHtN2oW7/ZIpLWKVNyNPgRfIPbnfGYVvUsl7cGJEbXtmlm5bRB2 vYE3bnI4Vt9fmImodPFdOl2T2y62x8pscaEpbxt+8wqaPv3PJmxz68o8iYLbxCyqgGA+ 0lCg3zv8rq07a664rvM9+byI4h7FAu+KFV1EauhMhQkOZMrKxBL5sd1b79Mp36+w5doX 248GQYrVrh5TczTDNtY5KF4xs9e0Es/LNPtkTnjkxs4PDMxTsblUzY4Y+sxz5Kkrb/HI 3vTQ== 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=7NE1A57UZufnKg/y9bnyVeC9n1EE2QOe8lR8Pwh7e7c=; fh=wa2xo/IZPiZV0nf9HpgKtBOviz9sGbUVXMNT9dmfxOg=; b=hEwqyiHJzpmcbx/Q3ePiUcMtSwfycvDxv2A5Mn8XYIZ8sBQfl+iKVtWudc+YHOX+zC /xQ+8kOxe79m8n4uaPYi21sYLkOgolJTGiza6qf5HtUzrYfv5rgN6aBzsNV9X61QWzcV miVQUeFlJE9Eh+jWzzhym5zk3ZjgE0Tk3guIxPXQxvZGA5QAUdijF/u1XfGOwZIov3LB bvVrdlnBLWYZ+p0OqDeu4mcHWsvZmxpVDOW0NxzrPAWftH4XZ1UeZ85c/f2jiWWHC0kY 1tFfcm019vKTNtyc2pTNjrGU/duv+HU5yWmIZ6mba2KDIVWcydYrcoRdcCJOgCzTpP7Z 65FA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bNtVx9A8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id j19-20020a056a00235300b006be329230ebsi12734pfj.284.2023.10.16.08.18.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 08:18:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bNtVx9A8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (Postfix) with ESMTP id 4B8F3804AD02; Mon, 16 Oct 2023 08:18:53 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233705AbjJPPSi (ORCPT + 99 others); Mon, 16 Oct 2023 11:18:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233692AbjJPPSf (ORCPT ); Mon, 16 Oct 2023 11:18:35 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 314E4EE; Mon, 16 Oct 2023 08:18:32 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7F046C433C8; Mon, 16 Oct 2023 15:18:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697469511; bh=boEy4hDOwZYIC6f1Ctc6vM+vlw2nq8iYhzUDSrBTrMA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=bNtVx9A88qV/6tHstNr+1lRzQoQu+TTdFpNdGZbrVu8ss9R3BYXI8Ea/M7cVlHLjZ CzevzxrDFLxf1Hwz12qUEZphl8XiTIIh/mJN2qm3/c6Dd3o2UCAOxtlUIh8u82HnwI 6aD4BgQTSsMMOyFEzRnrrg3IML7ffU4fnqnwUZIx5ca5+CxeyN0id3D2PxAjKdrxEG 5tSBhCN1jbGF1Szwe2OGufS9Qf7ea37IjHmk4yLtBEWD6ev9IhMhlgiGGaCwPxtPF5 WJxKrzMkZXHy7E5leTEl/g7ufzGVb+aE4j7/f5JORcHXM6BDA86JgmVd/fzYxteSPj 1sla1sj1QkDJA== Received: from johan by xi.lan with local (Exim 4.96) (envelope-from ) id 1qsPMP-0005it-39; Mon, 16 Oct 2023 17:18:26 +0200 Date: Mon, 16 Oct 2023 17:18:25 +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> <20231007054541.GL34982@atomide.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231007054541.GL34982@atomide.com> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.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 (agentk.vger.email [0.0.0.0]); Mon, 16 Oct 2023 08:18:53 -0700 (PDT) On Sat, Oct 07, 2023 at 08:45:41AM +0300, Tony Lindgren wrote: > * Johan Hovold [231006 15:37]: > > On Fri, Oct 06, 2023 at 11:37:12AM +0300, Tony Lindgren wrote: > > > 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. > > We want serial core to do runtime PM in a generic way and have the usage > count propagate to the parent serial port hardware device. This way we > don't need to care much if the numerous serial port drivers implement > runtime PM or not. Well, except for now we need to check the parent state > for this fix :) That sounds like a lot of complexity to avoid checking if (the single instance of) pm_runtime_get() returns -EACCESS. > We also want serial core to know the serial port to serial port hardware > mapping as we already have multiport devices. The serial core controller > is there to group the serial ports for each serial port hardware device. > We at least now have an option to support devices with multiple controllers > and ports in case we ever happen to see such things. Hypothetical multiple serial controllers should be modelled as separate controllers, but yeah, perhaps we want to describe the ports. > > And if these are indeed needed, then why isn't the serdev controller now > > a child of the "port" device, for example? > > Yes I agree we should now move serdev controller to be a child of the > serial core port device. Then this $subject patch can be reverted. > > Moving serdev controller should also help serdev to deal with multiport > devices I think? It wouldn't help currently I think, since we already resume the controller and don't manage ports individually, but if we now have port devices then it probably should be moved. Johan