Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp1329916lqh; Mon, 6 May 2024 04:45:51 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVaLX1pR28G6QTktui0lgax9HO3bZs25r35T2+GzyZnT6h59CGRnCzfZVvHa1QSzoy+v6t6LFck2AJlR3xq0ozT+1RDyaVtexoJtRzqkg== X-Google-Smtp-Source: AGHT+IHarEt2fjnDKZJ0zHlEiGVnFfuBXN2x805m1tsII7x0rEuqsEroZSm8YdmaZwFZfCMT2Ppe X-Received: by 2002:a50:9b18:0:b0:572:47be:a81e with SMTP id o24-20020a509b18000000b0057247bea81emr7790262edi.40.1714995951250; Mon, 06 May 2024 04:45:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714995951; cv=pass; d=google.com; s=arc-20160816; b=yj1+p2K6hisCtVwUHTCliszz6bSZlfbhmLUWMDivFiqD65Z142ZiRrDL820kudVBPV xhhKd6fTvawPLLZdylN1vYE55FbVbJqSvG8SAkEsBHwTmNbYpmp2fbbNSrHnezAP/0cq DZe0BRZgvxmTgI9sAUNFW68bvBnVdVLyxRhtT6jaY/OBdjZdibfifNjWoy1K1GvKeiEl taZN81vyGk9GKY+WJ6HEuCxDLipvx7WkUG3+sUb+F8PEofRcwIf+oDVFwc0Sx/6mg+6K Pgy16xEZlU+Tzxk7grA3zXFZs33cApuECvG0ZggNSlgPuaTw+F6zylaDP6+26DWo96xF ef1g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=2mru4lIZY8M9ZaXmhBpUJWDHWUyRRfxkrVAZooaEo0w=; fh=dW8UhZruWAbn7YOvgye1l3mseYYQuUQSqne8EKJJdcs=; b=Hk8XuGaJzUHiaHfCO6Cw6v/8jEqU+v9TsZjIQxqfI0jjzUtFd5rUNcPWed676C5xki bva4nl/DpOuWN97iCARXJHTKwKdnCuh0wGU3/rAku66FPwhKRnsvWAtIhdwQaCny1eD4 XOfQxXcUMM85kHTMlbF7UpZGnk7zai69iO1oSNOu7cIozumDIfuQYJD9FJ98s+DKXYUu lU24YsFK3u5HoBCIGTtxHzRoAxuteyWJy0Yd3f6MoiFO88u0XkADqO34OjTonA5OQl1i +U2Y8Qy0/O9V3VU8BkOjth02lAB6q20tKCgHXQnuMH2+KupjZzk5g8y1CYU51zBH/pNi HHRw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=OBdxxJFJ; arc=pass (i=1 spf=pass spfdomain=ventanamicro.com dkim=pass dkdomain=ventanamicro.com); spf=pass (google.com: domain of linux-kernel+bounces-169751-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169751-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id n9-20020a056402514900b00572a7714829si3690908edd.143.2024.05.06.04.45.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 04:45:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-169751-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=OBdxxJFJ; arc=pass (i=1 spf=pass spfdomain=ventanamicro.com dkim=pass dkdomain=ventanamicro.com); spf=pass (google.com: domain of linux-kernel+bounces-169751-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169751-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id BDBB61F22826 for ; Mon, 6 May 2024 11:45:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 26F1F143870; Mon, 6 May 2024 11:45:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ventanamicro.com header.i=@ventanamicro.com header.b="OBdxxJFJ" Received: from mail-oa1-f50.google.com (mail-oa1-f50.google.com [209.85.160.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E27A0142E84 for ; Mon, 6 May 2024 11:45:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714995939; cv=none; b=FCRE5BjnKWo0w/IgyLOgYQnjOnPv276zZsyJpR0DroNk74HrcDRfAuv5bEiK2tQKPqQumYY2wibqaJmkBf628HEP5Mk0oR5NaraD89pR0gUbCQ/3PhJiz29VOB6A7viEtJuBwzP6VW0sCeIviWja+3udOsPljyfVOCvUUVwv7kY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714995939; c=relaxed/simple; bh=+ehF7BaalUWIfwGCQQBBdo1Vc67pvkdUy+vFzLc1VGg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=lQ6pDRiQjX65K0dw1g7kHWoOvX1lBI9RWiEv5S7O/6JXfYI6W5bPz25OvRJbwMb/k69Z059FfQOTHnMMKRYVlxojge2B9vtO0IG5aaWdf11DTJfURA9KdLy7VDg2SimpENIaMbZ+H5WHls3asaI79ASifSnlbWteLQX6Lhg77rc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ventanamicro.com; spf=pass smtp.mailfrom=ventanamicro.com; dkim=pass (2048-bit key) header.d=ventanamicro.com header.i=@ventanamicro.com header.b=OBdxxJFJ; arc=none smtp.client-ip=209.85.160.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ventanamicro.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ventanamicro.com Received: by mail-oa1-f50.google.com with SMTP id 586e51a60fabf-23eff8c9a1dso1041184fac.0 for ; Mon, 06 May 2024 04:45:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1714995937; x=1715600737; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=2mru4lIZY8M9ZaXmhBpUJWDHWUyRRfxkrVAZooaEo0w=; b=OBdxxJFJhY+dbRNDtdO3Uuzj1svc3C7LVqt9LFQGsgz57PaAklRnLVOPyt5b9OW8tE AA6HhV8sMHZDsWIcd2DB5KRboHuxg7upuMGsiQwBlnH/K7BP9arJB6Eu5d7q8h8JXtPn 7Mwr3DpgqNuJvW3Xp0vhVg5m2Bd5nU9KJZIebhVxgdQBbLAqZ85LowQmjVuxgrp0g9AB Eu35bHoO1vFFNaBNtCIAwpXycgw+R8JAihC5oagSgc+fDwJIlQU8aI93bqaoFdoBZ+X1 L0FEPr+3EPdKMW2uisPE68lETg0KIab9nifd2bBArmyRSTnmqZGKt53qegQnTtWxxE7S Y+EQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714995937; x=1715600737; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=2mru4lIZY8M9ZaXmhBpUJWDHWUyRRfxkrVAZooaEo0w=; b=n6xcA+ExyJ0a6ziEW9Qu4ZEQZQNicyA0mb4ikYaID8ZTeAS2EgP6sjOjWI6vLYtrFH kFIL89ixN26IZIM+Va0g9PDZNlhXp943/rZX+ByEcV5vHVl9eVSael94gMMnt3F3sj4a j4Ze+jaeXzoGBGTOuunW2SLxa4Tle3EmTmXgcRlByPIbnOiz+wtekRfdlwZBTl9aKx9d l7df57e3DyrhaI2zGabF2X7QH/dZs7iB774oFJPUAqbEO1ksd9ESqcSzKwi53U1OKy/5 e4ErXFNI+wilThtgQ2KlDcmGyNA08WxiwP0Te7DmxocmaQVt6/GRA/cwepg5iOk33RjH cZCg== X-Forwarded-Encrypted: i=1; AJvYcCVqyMiDwDw3iqTNiu6mdEGRB7YQEWGUUazdy7xU/6cZfnEVt5VKOS7A7vqkm4cy3ag8QNeydqradtTgjMb+IoQEMmvg9s2RqVButRTS X-Gm-Message-State: AOJu0YzOMACc0f0Kkvg0qcpkZdM2qm1KEPnBXuO8WBmLJn1JfxRrIwUF +iPCs5V0fVJ7A331wM4lH/R8+igRZPsWu8hOR4HlCYij7WH7ZUhYDdGupVv30Fc= X-Received: by 2002:a05:6870:1589:b0:233:5b4d:ff90 with SMTP id j9-20020a056870158900b002335b4dff90mr14085436oab.50.1714995936945; Mon, 06 May 2024 04:45:36 -0700 (PDT) Received: from sunil-laptop ([106.51.191.139]) by smtp.gmail.com with ESMTPSA id ch13-20020a056830638d00b006ebcceb7f8fsm89603otb.62.2024.05.06.04.45.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 04:45:36 -0700 (PDT) Date: Mon, 6 May 2024 17:15:22 +0530 From: Sunil V L To: Andy Shevchenko Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org, acpica-devel@lists.linux.dev, Catalin Marinas , Will Deacon , Paul Walmsley , Albert Ou , "Rafael J . Wysocki" , Len Brown , Bjorn Helgaas , Anup Patel , Thomas Gleixner , Samuel Holland , Greg Kroah-Hartman , Jiri Slaby , Robert Moore , Conor Dooley , Andrew Jones , Marc Zyngier , Atish Kumar Patra , Andrei Warkentin , Haibo1 Xu , =?utf-8?B?QmrDtnJuIFTDtnBlbA==?= Subject: Re: [PATCH v5 17/17] serial: 8250: Add 8250_acpi driver Message-ID: References: <20240501121742.1215792-1-sunilvl@ventanamicro.com> <20240501121742.1215792-18-sunilvl@ventanamicro.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Fri, May 03, 2024 at 06:32:10PM +0300, Andy Shevchenko wrote: > On Fri, May 03, 2024 at 07:29:35PM +0530, Sunil V L wrote: > > On Thu, May 02, 2024 at 06:35:52PM +0300, Andy Shevchenko wrote: > > > On Thu, May 02, 2024 at 04:50:57PM +0530, Sunil V L wrote: > > > > On Thu, May 02, 2024 at 01:09:57PM +0300, Andy Shevchenko wrote: > > > > > On Thu, May 02, 2024 at 03:20:08PM +0530, Sunil V L wrote: > > > > > > On Thu, May 02, 2024 at 12:17:59PM +0300, Andy Shevchenko wrote: > > ... > > > > > > > This driver is not a duplicate of 8250_pnp. It just relies on UART > > > > > > enumerated as platform device instead of using PNP interfaces. > > > > > > Isn't it better and simple to have an option to enumerate as platform > > > > > > device instead of PNP? > > > > > > > > > > Ah, then extract platform driver first from 8250_core.c. > > > > > > > > > Let me know if I understand your suggestion correctly. Do you mean call > > > > something like serial8250_acpi_init() from serial8250_init() and > > > > register the driver directly in serial8250_acpi_init()? > > > > > > Extract the code to be 8250_platform.c and update that file. > > > I have locally the extraction of RSA code, I will see if I can help you > > > with the rest. > > > > > Thanks!. That will be helpful. TBH, I don't understand what to do for > > extracting the platform driver code. There are already several vendor > > specific UART drivers (ex: 8250_fsl.c) which are enumerated as platform > > devices. 8250_core.c looks cleanly supporting such drivers which can > > register themselves with the core. For generic UART, DT has 8250_of.c > > and ACPI has 8250_pnp.c. But 8250_pnp.c comes with baggage of PNP > > contract. So, the driver in this patch is similar to vendor specific > > drivers to support generic uart devices which are enumerated as platform > > device. > > > I can rename 8250_acpi.c to 8250_platform.c if that is better. > > No, that's not what I meant. We _already_ have a generic platform driver, > it's just inline in the 8250_core.c and needs to be extracted. When it's done, > you may simply add an ACPI table to it. > > > Could you please help with a patch even if not compiled so that I can > > understand your suggestion better? > Okay, Thanks! Andy. IIUC, you want to extract serial8250_isa_driver from 8250_core and then add ACPI support. I was not sure about that since I thought it was only for legacy ISA devices and they seem to be created by OS itself instead of discovery. ISA driver has some ordering dependency on PNP driver as well. Anyway, let me try if that is the acceptable way forward. Thanks, Sunil