Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1844330rda; Tue, 24 Oct 2023 05:17:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHtu6uYt2rModwpO3DSHdbQFs/IANqNbIMzcBUejyFbpjbTaOpb0EV02FDkU3HkOFZk7zzk X-Received: by 2002:a05:6359:3509:b0:168:e0e9:86bf with SMTP id un9-20020a056359350900b00168e0e986bfmr4647345rwb.14.1698149871928; Tue, 24 Oct 2023 05:17:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698149871; cv=none; d=google.com; s=arc-20160816; b=0WfTSin+J1hDUUyYlP1/IPS945BuUQeqJgDQCTHpQ+g8fFZIemlb1AtbvBpzSFLZfn eGLh0BIltmWX+3yG8/XZAeaGKaqK6z1Nu3vsazwjMgf73/Fwgp4fgZL7DKE5hzk35lBk etqCTXzLU6NskCWk5eqsQ1vBPup+W/WPLcuEF2qAzfMnCixSpx+Cs11hZjovvM6DJHBH cfKcISUI20+cRj9Eaxm2q+Bc8kMeA6BVtLAYdC5mYLoYhGHE/h1/oeX9rEZVaRaAzFYm /5FE5RU0eNdWNielCf/hWOLcmr4jDGUnr0aMyiVgzBIYor8rokePJ65B5AiJ0DhhiYIb iHEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=AFwhurBlcOvCP32tCxM/guMeQdkJhOwfsohMvoS5LFs=; fh=ndEd6i0oyU+c530CMzOBedi1io0u4fBnpuuhjtMMcFM=; b=OiSIM067Q/FiS0xKJUxt3AzFf0KFywz5WvtyFNskO2u5503a3Gy26k7bTj94zPLlvX /Su3HxqpnZ9E/n3F2v063AEafQj3SIHSEoC7b74UzcBd3EPHY8rkLYImo95yEIdoLbmf jkhetCI3+RxKv3etizoV7nX0d23jOPo13AiR/notznAFq1C367RvuXnDvD1SnNbluQjY XefSg4L1uz3FAOlBnsMuwSzxpGklzgygieQKXKSZdMj1sWg2gCC/uEMb2m5pBRMuEcrl jg3X/yWfITMaRNRtt8JLQ6gSxTxyM3XkJFy7p82ImizFaAW16ReSSUMIZ4MtQkTGLc54 IO+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ZgR1IZJW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id b2-20020a633402000000b005b86b35778fsi1026018pga.180.2023.10.24.05.17.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 05:17:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ZgR1IZJW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id E81FD8031AF9; Tue, 24 Oct 2023 05:17:45 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231849AbjJXMRh (ORCPT + 99 others); Tue, 24 Oct 2023 08:17:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231478AbjJXMRg (ORCPT ); Tue, 24 Oct 2023 08:17:36 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23A29A2; Tue, 24 Oct 2023 05:17:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698149854; x=1729685854; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=wuBMd3mo+5ZEGiZ3gwI9A1ReTEQWMLj66Y1biRz0ulw=; b=ZgR1IZJWSokh3u0a7yTLfBwAkCRlBUy8LxFeMaMfA4JEU4gApFx3Temh YZmEHXh8QAOZpvyPIxgoFYY2alVw30Ln8Q9v5gYC3T1Pvppkuo4WzmxcK LF/x+x93Xgmf0SuT6Xyf8syTVaYyKojxy8ou6YFgrkECx0Ky+Qztbity9 vSfd+k/ohoSdnZSRn1/5pv4seV20LhavZrixmHZsMiTJL9pzDMY/f/32c +3cAh75M7PNMIr+1DTky2Bx3pd+eNwoQofdlic8KnzQu5YdJhudQoS8SN DNeSJ4eprHsaAbxQVpQc+XjA3lsMkZLBELb57tVbWzn00cZXq2AD6auKM w==; X-IronPort-AV: E=McAfee;i="6600,9927,10872"; a="451273155" X-IronPort-AV: E=Sophos;i="6.03,247,1694761200"; d="scan'208";a="451273155" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Oct 2023 05:17:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10872"; a="902149502" X-IronPort-AV: E=Sophos;i="6.03,247,1694761200"; d="scan'208";a="902149502" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga001.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Oct 2023 05:15:09 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.97-RC3) (envelope-from ) id 1qvGLe-00000008HMX-3G6I; Tue, 24 Oct 2023 15:17:26 +0300 Date: Tue, 24 Oct 2023 15:17:26 +0300 From: Andy Shevchenko To: Tony Lindgren Cc: Greg Kroah-Hartman , Jiri Slaby , Rob Herring , Dhruva Gole , Ilpo =?iso-8859-1?Q?J=E4rvinen?= , John Ogness , Johan Hovold , Sebastian Andrzej Siewior , Vignesh Raghavendra , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, Maximilian Luz Subject: Re: [RFC PATCH 1/2] serial: core: Move tty and serdev to be children of serial core port device Message-ID: References: <20231024113624.54364-1-tony@atomide.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231024113624.54364-1-tony@atomide.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, 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 fry.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 (fry.vger.email [0.0.0.0]); Tue, 24 Oct 2023 05:17:46 -0700 (PDT) On Tue, Oct 24, 2023 at 02:36:18PM +0300, Tony Lindgren wrote: > Let's move tty and serdev controller to be children of the serial core port > device. This way the runtime PM usage count of a child device propagates > to the serial hardware device. > > The tty and serdev devices are associated with a specific serial port of > a serial hardware controller device, and we now have serial core hierarchy > of controllers and ports. > > The tty device moves happily with just a change of the parent device. > The serdev device init needs some changes to separate the serial hardware > controller device from the parent device. ... > - ctrl->dev.of_node = parent->of_node; > + ctrl->dev.of_node = host->of_node; Even above should have been using device_set_node(&ctrl->dev, dev_fwnode(host)). ... > /* Make sure controller and ResourceSource handle match */ > - if (ACPI_HANDLE(ctrl->dev.parent) != lookup.controller_handle) > + if (ACPI_HANDLE(ctrl->host) != lookup.controller_handle) This can be changed to use device_match_acpi_handle(). > return -ENODEV; ... > - if (!has_acpi_companion(ctrl->dev.parent)) > + if (!has_acpi_companion(ctrl->host)) I prefer is_acpi_device_node(dev_fwnode(...)) check, but here seems no other use for fwnode (haven't checked the full context, though). > return -ENODEV; -- With Best Regards, Andy Shevchenko