Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp1062542lqm; Thu, 2 May 2024 04:21:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV92yndQYeJjz1YmsFrgqSx9aNKhIfvE0QMYOwJFJ6g2rSZ3dAxLRax3b4uUjnxREzDwE8kfjHhN0ETgL98l2Dgyj6pDbUkmk1dJtH/RQ== X-Google-Smtp-Source: AGHT+IHWyjhqcDTe0/MwAZMFYxjZFieBhkG5G9RHO78c+1ve3Y7rDSKSEEnBJCUPrlkNuMd6p5Yp X-Received: by 2002:a05:6a00:1901:b0:6ea:c2a2:5648 with SMTP id y1-20020a056a00190100b006eac2a25648mr1965822pfi.3.1714648886325; Thu, 02 May 2024 04:21:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714648886; cv=pass; d=google.com; s=arc-20160816; b=A+iPEgNcITGy1tSgTbz/7MKk3lS9eDLqqRpZGWvZ/v+PoNpllgahNMAwFdDww3bbYi 1zVycCoQoZEzY3oFy7yC3oX9B/kdVvmFh628qXtyzs/icRkDg+7yH+qRs/cK0bmNWIqp NZu2WZvjF/2GE0d6b9oXYKQCF6KcC5d3Puhm3HRE6oV/IMdbwBKRF6D3zUwqKt/G8S6X Fq7TB3QWI+qUGccgxdybtSf8dMOVOylkbpSnwD0b4IaLG/x788iiyo8pBFsKUlPIaB3a qtx5mBD1YVyxQFOK/HWNJ7ITRE4KR/2mG05Am0g/TMmnF7L2W11cYVRVqHA7gMmkreSM TaMg== 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=9rhZwyyx5fhbpC3BrgW8PW9voWjesLYpxFqigfVNmtY=; fh=rTSqQnHuXwEUs2+vykhkvjxDJhtY1RmnBrS6ucorvP0=; b=se8jrEL7yMsDyMyy1uLky63gY+U3k5yvDdPy7awEdOpmOK+xOvC/NPczoV7inLkVvo tFR4nA0tG82NeM0QziWbnsVYbEOadCmnKpzqZSrmENgD6yfYOZNfACLprqjg8tSpVGWy bKjkL4EfWSud1gYk9koWnspB9ZE7+6mIJcU1pB8tamcUSW+Cm9OzSbJFc7te8qKBA6FI 1yOTeecwIxL7OOkx9ZVUnMZUywsyYOHh3lvrUVA0OLgPRrx6XJ/QxqfQa+8Js9VRmhE7 TA91n9me3tL/XIANI/87TYKI1nwbKoNIXvx6SA8AkG3GGMnb8ir+WiIN3x18+6hZ2rG0 2AWQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=Rwm3SAUl; arc=pass (i=1 spf=pass spfdomain=ventanamicro.com dkim=pass dkdomain=ventanamicro.com); spf=pass (google.com: domain of linux-kernel+bounces-166385-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-166385-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id bm6-20020a056a00320600b006edca539524si844592pfb.269.2024.05.02.04.21.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 04:21:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-166385-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=Rwm3SAUl; arc=pass (i=1 spf=pass spfdomain=ventanamicro.com dkim=pass dkdomain=ventanamicro.com); spf=pass (google.com: domain of linux-kernel+bounces-166385-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-166385-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 0DF93284E78 for ; Thu, 2 May 2024 11:21:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 41C1E63417; Thu, 2 May 2024 11:21:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ventanamicro.com header.i=@ventanamicro.com header.b="Rwm3SAUl" Received: from mail-yw1-f177.google.com (mail-yw1-f177.google.com [209.85.128.177]) (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 ED928605CD for ; Thu, 2 May 2024 11:21:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714648876; cv=none; b=NiyEzKmn1EXS2u2gXGTJFhe9fDYgpuhDmJcD/6/UP6KPnfJ73ppO06OZ36rO2/duokTa4Ubx/6cykXBk24J6EOK2HyWEEHff9wXelIWUp6Q+9hy6Oh+xqsoz59H7ntdep4YYLbuWEKI2nxZ9MRIYWWCh6PpPrkhEv97GrM+nGF4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714648876; c=relaxed/simple; bh=oyv2s2+UJW+8uzUyt2wKXdhw0Bt0e8jLiqgVDuivZtc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=WUebFcGXFG09u/8BiwKaetKvTHZlMOx6v3PwJRagADCSUQRl/Dwyx+KoXMNHhTH3c9WW3JNUPYjikKSqjaFIBXKDlPUIgl35qqENGoA2Tf4K4/JoJN2h4tE8freFGql0nF4jkWYsNSntQhOajKYn+CvA3w6iZEg7MPotHe27xww= 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=Rwm3SAUl; arc=none smtp.client-ip=209.85.128.177 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-yw1-f177.google.com with SMTP id 00721157ae682-6181d032bf9so75930017b3.3 for ; Thu, 02 May 2024 04:21:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1714648874; x=1715253674; 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=9rhZwyyx5fhbpC3BrgW8PW9voWjesLYpxFqigfVNmtY=; b=Rwm3SAUlka6pR0PqNs2jsyTsxIHLXOv1LjuNvZ3LpnRTjSq9y37h911NDbDogNOUB8 CwAauG+ZZecLq+lz5jHXAbMv9vvNTu4cF8sBXDrs7KQhYFahj3Lylnhy2cGz3loD2e50 mVp85JqcS9u2gpG5gfAMVRgciNffAA6JD2ILxnQ/11KUKRnoPtjF1Bjisy6mmlpML3pa dd5oXYGa2Vu924hUS4W8yQvLfolk8qURGT24OtbMvSDsCqjJakWDU1XHjcK5w18mNllN o0GItQdvcnDaEoky3qaduemvzPpPBFfwFNJ24vD76Y3YrWHV3jJok4b9wMVrGxLKq8Sh SIiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714648874; x=1715253674; 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=9rhZwyyx5fhbpC3BrgW8PW9voWjesLYpxFqigfVNmtY=; b=Ajwj8i1TZ2pwX7xY6qP6Ov4ab/Ov15fp+/i4XDA8E33TMOCkASLARTGXtggSGPRAhd hfLTzdaP3NNJyslfEyn8XyuAmkZbsM4K3sdfrLBX4q6x7zyMn9gZLe7EdfhbvfeYVi3O Tkpm+ZxaRsAEGV1dRKfvD1wIurnu0HwPjE7YHKRc3QhA0NoazTl3+i/rVDQ0OYxP8+eg eb6JTEldv2Hq0iqKvv+rxZuesR/cUNPTzMlGoZYgR84s0C/iR1jiVlcpMlEkWR7TeO23 pGmp3Kmix/vNGCl9Tz0jQmL+UfovoUGEbJuZfJ9xsjTJ3xt0IIdQ/SpgfWP67s2N/dSu EBdg== X-Forwarded-Encrypted: i=1; AJvYcCUMQ04cP+qToE6KjtJ8VEpJNHyYZrEQT4xpfEDTW2mdQdyzRNo46OPWLId+HT+maFLJ1S5//2WLjxlkqFKZaq4820fyd3Ji9xxiLf8o X-Gm-Message-State: AOJu0Yx2WyeJZZqUE8dKWEY7QEemKIYHCEzNTRVBGOeG06FyAg/Hw/LE O4Ib70s2pNHyTHxd5Op5W36Zo5lnnNNaXRNv1RBonymBUmvHUIX1QHZ5KE0Egrk= X-Received: by 2002:a05:690c:6d11:b0:61b:330e:3fec with SMTP id iv17-20020a05690c6d1100b0061b330e3fecmr1843234ywb.45.1714648872054; Thu, 02 May 2024 04:21:12 -0700 (PDT) Received: from sunil-laptop ([106.51.190.19]) by smtp.gmail.com with ESMTPSA id m24-20020a81ae18000000b0061bec8ccb67sm155149ywh.76.2024.05.02.04.21.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 04:21:11 -0700 (PDT) Date: Thu, 2 May 2024 16:50:57 +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 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: > > > On Wed, May 01, 2024 at 05:47:42PM +0530, Sunil V L wrote: > > ... > > > > > + * This driver is for generic 16550 compatible UART enumerated via ACPI > > > > + * platform bus instead of PNP bus like PNP0501. This is not a full > > > > > > This has to be told in the commit message. Anyway, we don't need a duplication > > > code, please use 8250_pnp. > > > > Thank you for the review!. Major issue with PNP0501 is, it gets enumerated > > in a different way which causes issue to get _DEP to work. > > pnpacpi_init() creates PNP data structures which gets skipped if the > > UART puts _DEP on the GSI provider (interrupt controller). In that case, > > we need to somehow reinitialize such PNP devices after interrupt > > controller gets probed. > > Then fix that code, we don't want a hack driver on top of the existing one for > the same. > > What I might think out of head is that used IRQ core for your case should > return a deferred probe error code when it's not ready, then 8250_pnp will > get reprobed. > Deferred probe was ruled out in prior discussion. Also, deferred probe will not work with _DEP approach. The reason is, PNP devices itself are not getting created from the ACPI name space when they have _DEP. Hence, serial_pnp_probe() will not be called at all. > > I tried a solution [1] but it required several > > functions to be moved out of __init. > > > 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()? Thanks, Sunil