Received: by 2002:ab2:3b09:0:b0:1ed:14ea:9113 with SMTP id b9csp177713lqc; Thu, 29 Feb 2024 14:01:02 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVFOYJXql4oEmKEjTAilKJNCy5VfKFrJ82qrGYwkIUrrbH60P+ASemQXdl9XybZXJ3FdZAusjHRb5neD08ntKtNrnsHC/BYxy3dCfmSow== X-Google-Smtp-Source: AGHT+IEqNwiaQvZC1ox02M3AgBLCKZe97Zl4FDm0Qghu4jRMRn4JL1pLLBdUxT6LwriemCU/KZni X-Received: by 2002:a05:6870:f728:b0:220:968f:6f4d with SMTP id ej40-20020a056870f72800b00220968f6f4dmr2908286oab.47.1709244061702; Thu, 29 Feb 2024 14:01:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709244061; cv=pass; d=google.com; s=arc-20160816; b=HQPCpkVpARuuvkxg7B47lkYy9L7AJTHal8Ew4kRV9h+5TQzIdazN/hdpm75iph6xfg AIbkts1VgBD2NgeUmekX0XjOfQu7abLVCYzCASZKv3HskfQXNTvKQXHtodzpna4ydSKD Rg+Qq58ZELGj+0Bsya4zOyNcUybPhi2YZrMpAzEtW1COiyExP6o7vgMwbIT3noIp0toW UrJDWg8ERF/LI1IDRkaMs1sI/J2TqeXkZF5BT8bwJbhYadvZgIqyBB21ppRmgEY+V/Du ig769UiY96ShCMmyjFq8FvURnatTh6/9Ep+SQ2SpUzbGGp/D7m+Xz2Jyl4JumcekdjbG ytUg== 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=MAvOLkc9igqqH8eNHg0igL8rPDzCVtV6qduMKbsqFj0=; fh=93bfwwz3Oi/XIIQJpd3EM58drSE50HBBAGnRw5Daep4=; b=MNeI1uAv+KiWOTQNk8bNSftTwmaK0ABJ2QJJr1cPIYK2fBhqj5EDyqZ//NHsV154+k hHT1oE0kJlKkcjZofPnTTN5ztdvw7ng32V6ZXJ+zOpDV9MlMIkgqHruRqHz1SY9Dk8Mr fYbv7ffGwENVH1uLtkK4I/kvpjUW46HBkx41SOrNt8TZ0xYtUVsX4hJwTNf2U4eQHUNf 5FsdveLf1o9VbthZCNfFoKR6cKsRCjY99oQYMQP8uBYiH+oF+dz/8iSNyh3lODyP4q0f 9dx4XzQGtU+KmPIqWhbeF9Fg/TBZIEgu9QpFRO7NXbKuOlC5zed1lvwAZf8nsw5SvmfT kT1A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="L/s5U4z1"; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-87614-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-87614-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id u19-20020a05620a085300b00787fdd26d5asi1651970qku.657.2024.02.29.14.01.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 14:01:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-87614-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="L/s5U4z1"; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-87614-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-87614-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 6CAC41C22753 for ; Thu, 29 Feb 2024 22:01:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 60F6074BE1; Thu, 29 Feb 2024 22:00:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="L/s5U4z1" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 693AA6D52F; Thu, 29 Feb 2024 22:00:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709244049; cv=none; b=f+r3ETLq0RXONqy4IT0+9uUyede7LfFRwRPcT5z737aS8mTuvD95GrBPyALtLMkZMnIYpjqCwe+J88ixAMHHHVIz3dOornlKFHSwPF7qELCrdEa0BPh78tYiwEMERvqJqo7BVz1UgHCbublK2fDdElzTaKKLti21WFZQFHIEX3o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709244049; c=relaxed/simple; bh=Otvi24GU73XCeo3Jc053Uc3VjmLPm1+czoFS3dRaPro=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=iay0hDzD3LQSpnkkXsC0H94Fv6drF9slgihcbCtaNPXWQPOiBQLWgY5cUMLwmEJZxRYTlxcRXVL9i/wp2O9oxVz/+Xt6I7G96kRYZovBr0n31XVJK5VuxzZuj13q2NfbeD/moLR/d+gul5QZZQ6RnvuR4SUN4XPT44lciKIynRE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=L/s5U4z1; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6C6F9C433C7; Thu, 29 Feb 2024 22:00:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1709244048; bh=Otvi24GU73XCeo3Jc053Uc3VjmLPm1+czoFS3dRaPro=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=L/s5U4z1gKMD/aFql4qJbtRtuDDHC2VPe+By7Vkog4myAQWbXIECVGWleGyAsI8LT tKYuniW/iTIqprbU5M8iiK43bHBW+IQaD00Z6edRsSLLIqCxKSCdlnjDD8kQ5nwQbS P5yqkIpvFFuOmYSAI7iBOB7UfAhyaFbaxKO/A5JI= Date: Thu, 29 Feb 2024 23:00:45 +0100 From: Greg KH To: GuanBing Huang Cc: jirislaby@kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, albanhuang@tencent.com Subject: Re: [PATCH] serial: 8250_pnp: Support configurable reg shift property Message-ID: <2024022916-captivate-state-0255@gregkh> References: 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, Feb 29, 2024 at 07:51:54PM +0800, GuanBing Huang wrote: > From: albanhuang > > The 16550a serial port based on the ACPI table requires obtaining the > reg-shift attribute. In the ACPI scenario, If the reg-shift property > is not configured like in DTS, the 16550a serial driver cannot read or > write controller registers properly during initialization. > > Signed-off-by: albanhuang > Signed-off-by: tombinfan > Signed-off-by: dylanlhdu "interesting" names, can you not just use your native encoding to make this easier? > --- > drivers/tty/serial/8250/8250_pnp.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/tty/serial/8250/8250_pnp.c b/drivers/tty/serial/8250/8250_pnp.c > index 1974bbadc975..25b4e41e9745 100644 > --- a/drivers/tty/serial/8250/8250_pnp.c > +++ b/drivers/tty/serial/8250/8250_pnp.c > @@ -473,6 +473,7 @@ serial_pnp_probe(struct pnp_dev *dev, const struct pnp_device_id *dev_id) > uart.port.flags |= UPF_SHARE_IRQ; > uart.port.uartclk = 1843200; > device_property_read_u32(&dev->dev, "clock-frequency", &uart.port.uartclk); > + device_property_read_u8(&dev->dev, "reg-shift", &uart.port.regshift); Is this property documented somewhere? What happens if the property isn't there? thanks, greg k-h