From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 869F2C25B5C for ; Fri, 3 May 2024 14:00:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xF37zjXoDne9Lx3zuR/nF21WCIpR6ctiToQfRbq/rZA=; b=vJzs6kWLCfVyeT AOAgXFUtn4M6LuIXYPkNXPl/99GQt5XwdVM8hMFfTSe4axLLsr22RzGnQYwErFUl4Np0gYN+MjDOO FeY40RKTPhTtpqWqI79qb/Q/gE2lqWgr1M3lpOmcJDn4Wy3UafgmW5Uu4EmGm/8FCRWsPcYuzGoR4 HU+WoKIad4OT9Q4wx8LKrUUd+PbG4bFOfeRdTDlG06QwNCoyqfzgU808I6omsXffUyFbKjDxemG5y OV3UMuEc3PUrelRe76urHsOC88E0h0y6qJIHcAl5MTMjG4d9/TT3TrVf4+i+geKzLonnGdmQLrW84 27mJcLb3EzD8+dJgWwQA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s2tS8-0000000GlWp-1glj; Fri, 03 May 2024 13:59:56 +0000 Received: from mail-yb1-xb2f.google.com ([2607:f8b0:4864:20::b2f]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s2tS4-0000000GlVB-3D8k for linux-arm-kernel@lists.infradead.org; Fri, 03 May 2024 13:59:54 +0000 Received: by mail-yb1-xb2f.google.com with SMTP id 3f1490d57ef6-de596c078c2so9193310276.0 for ; Fri, 03 May 2024 06:59:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1714744789; x=1715349589; darn=lists.infradead.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=ChPcRq4NfZHnrwL48HNhQ7iFI35ROHq79DvxMeghd44=; b=BB/2eFrjJM8tD+NLyBF1QwjYM4mbaTYWxB9VF07R1Uq3YTpN+YcybJWn4TSnvTQWGu ubVPMR/ASy6TV9HhixGGE1QPsoXRSasHxnR2A5E4sYzqm0fH6B+sXaud6vdBYnzNlg8j Y0dFX1KRVBb56jON/LdpIZ8FIl/r0PW79c353pfXWcgBdoNIiVx+WGvNavtNcNCbxzfA IbSPztoU/G02QSCAKEYUzaXMMoURNv5f7nh3zRo8xZi/83wy8dmAW2V0G/H17+S5/kB8 BjAoSoVFJuATgasDyZHDnIaV9S9T7M+xEJSDDAIDbJfHhhQ6TRE079gpnFkQNY7iTYdP iN2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714744789; x=1715349589; 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=ChPcRq4NfZHnrwL48HNhQ7iFI35ROHq79DvxMeghd44=; b=o2q9KHaaaBypxzhFZqxdZnw0pkd+QuQPh0pH+dk1NTRW57I/rUUpWhRnr7au5wksN9 nhzoqyRVWMweYWVM85MX1tg3g/hYVBAmhFcxB1J1nC88HwFMLz+NcNgNL8kBCmdcibac 4nferO5uRoxlaOKQ8itcnzgotN9iIUpreeStMtkz5tOui+EEu5IR3z491gK6U//v4pjL RekGbkAqG3XlUOJcnZq4hwhgvjCImMoKIwDDY8OHJji0Y/Wk58/X3OaMxkKzS/3gT9SB 1F7htqeUtTgmKcRhlUk4So6EWJhm+EbXABw09cEnAqXGTReRlBgtpQWr1FVbTQP28BsT y5yg== X-Gm-Message-State: AOJu0Yz0F9P30OAGQTqD9goeIhq2bD85KHNLiSbS6lla3doD87HIkmI3 SlERdHnUjqJ37z1IQfm9zOWMKDagK8hymxfp8pgE61baJzYt+XtPRm1XpmOFCxc= X-Google-Smtp-Source: AGHT+IFctvodowwbTmaaEDSmGBZj/O9adwDNYje40Gk9jTBEJueLXsMCVV/UKXpClCHAizcOHif2cQ== X-Received: by 2002:a05:6902:246:b0:de5:e046:6ac with SMTP id k6-20020a056902024600b00de5e04606acmr2994231ybs.5.1714744789552; Fri, 03 May 2024 06:59:49 -0700 (PDT) Received: from sunil-laptop ([106.51.191.139]) by smtp.gmail.com with ESMTPSA id l14-20020a25bf8e000000b00de51b87bfefsm627782ybk.18.2024.05.03.06.59.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 06:59:48 -0700 (PDT) Date: Fri, 3 May 2024 19:29:35 +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> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240503_065952_836605_0699CDC0 X-CRM114-Status: GOOD ( 26.10 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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. Could you please help with a patch even if not compiled so that I can understand your suggestion better? Thanks for your help! Sunil _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel