Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2522857lqt; Mon, 22 Apr 2024 13:12:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWwRDqa5Uyb42dllUqMfTBvovU5Jht/vpUx7hEBtUiHgFkBW6nejQMjCpvpESfmerxS3m+AigNfhMA0H/4lCEK3YlUillrWQ0n01WOsJQ== X-Google-Smtp-Source: AGHT+IF2zGVvVH51b19ek7mcNsrUFhNT358flMLcwQNF0b/3/4dR4CAUc685ZcOJH2e9Pd6Re1w6 X-Received: by 2002:a17:906:1f48:b0:a4e:cd5c:da72 with SMTP id d8-20020a1709061f4800b00a4ecd5cda72mr7136920ejk.63.1713816728972; Mon, 22 Apr 2024 13:12:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713816728; cv=pass; d=google.com; s=arc-20160816; b=0bMmBdYbU9qEn0OCmiUGkx1AJJlgIU5fJk3pS7hBDGtf9OiU1dlJ4Ms3TVoK9vjRko 1roBEhsUfIrChbjQNoXcHezxousB3V/6uz+NqrqvRGjlaW96SeIUnG37QitiS/DOVDEd kvb6N+GIB+4N3IqKTe3qo1dlUTW359HjPPOeM1vGOOvEUq7AhS52+s6sxNDTCyv3rvHs CpfdWclXULwkJJgCucQXhopjzbsmVp9I2AKTA6355rDf7bH6SIINJwu2Ga4OxpqrLQVX DgjiLJjNOuwHdOoOralivYgeGHJX4/1uGD3Dwee3i1uwador9fKMa5T9kwNK1LlbDd1b dFbw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id; bh=JiZH2HuWtN2RM55UIzIoV8b21h1ck/6OdH9T0Un1VM8=; fh=VgkBwCIi/NCGibfx7Mmz6wHbPlGFjEtjJ0F8tiKzg+M=; b=dQAP4jFOJcN1RdqBtrYMGWLJVw5JsPm41Jb0RzjzIHvPw/I6l+6uRTpB2D56qmNdok iYbScv+oeZQfeCQgo2NclfDxFjj2IB5NGMpRX1ljLkn5RGmicQnNLmEaeEOjEOLw4sbb 7cNVeggcGt2842PjryDQ1piq7FrXO4p8CqOezJcnB1NOKO+fKZuhKaHp1lWJN8S1EL+o 4V7YhJ7cUVR/o86dyt4ZXhSFRzFVuozRKQkUfo552UEYwSLrDpi+sVM9kUlY4RXy5H4V crLdnNdlq2wE8f2+h3dhKsIDYJVlbYD2zMp2vfOcAv0T2hhcRi57daY5o41P/VPZvVBq o7YA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-153987-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153987-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 lt7-20020a170906fa8700b00a52363224c7si5891164ejb.811.2024.04.22.13.12.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 13:12:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-153987-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; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-153987-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153987-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 035641F21DA4 for ; Mon, 22 Apr 2024 20:11:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 49C1B156249; Mon, 22 Apr 2024 20:11:13 +0000 (UTC) Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (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 00ADF1553A3; Mon, 22 Apr 2024 20:11:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713816672; cv=none; b=DQdZD0y5Vma47ej85kAClt7tzea2QH11fXRKYko53BU8qSi+ZdYDjy/dzvH5EoXxh/mhHhAl4tUlI6ncWexL+j8s87Kh1cz6NThdL80mqEbcYBNteYCBJq5yok6XuRZPJ8N+rnydzaii34GgmZrBOB5sLdtbsTeoWE73hnFGW+c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713816672; c=relaxed/simple; bh=eudLHhevbRgKy1GmiMEyW4Ix3pXn7T8fj586KMAXp6g=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=bVtKUMT7UhMgvxW/7bV+AW6wWkU0oPBHtIcK7g2hRUBU0tfiPESh9G1q6X/KQTfo1LSYXtVH7+vbTNqgAZTjFrKBxdFVFS0Czoe83VeTUbWgOnTBjV+lUq3Dstoudogtr6t05HhHOFZbagYZx1BiSck1ar5869O64goz3fNnuy8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.128.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-419fc79e4dcso13699365e9.1; Mon, 22 Apr 2024 13:11:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713816669; x=1714421469; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=JiZH2HuWtN2RM55UIzIoV8b21h1ck/6OdH9T0Un1VM8=; b=F6diHPYUQ/Qs8FiTF+WU+szwjzQ+GNnrcj2YRgsEzb2SGBv6KTmCy51j892vmOeYxq v1z5hhOFDLae2UQyMsIp2yNopEODpCfBzUgrjr8iNEUZS87sOh+oMol3eXej+9vyyZG9 Xs4OAVVjxlhm98zD+Ib4wTURjzupMUs33D3Nz39a3Z5M5+7ztx8NJdjhd5nTI7DJXqZg toztK+1cPBnXzCohmHFE6dEEr2Uk2pzwnz9eQQCcSlf80oznRJrwSz9EKY73rLADs5Fv 060AA6On8CGZBx4S/pD/JRv5x7JP4UImmMzD+ws1xZVKuBJPUVjwPwPh/BnATcEeCW6c rvHA== X-Forwarded-Encrypted: i=1; AJvYcCVWvqOUj1XDiScfZEQ+GkAfshNvtc6D3QGl1LeyIPK4fFiAfWEFP4nxe0OE8OYKjHNCL0cF0o+Yyii/yW8LGSrD0/JmzLto+phbSwjClh+hu/NkIXt8ySqezrrhIIFwnK7JXu+4AvcwWObo X-Gm-Message-State: AOJu0YzrP7ywhFUE04ZsYTX6B8L+S6s4c7KdVT1AO060H+shJ8R9biOz T5erhjVibP5L5VSlbmiYsvr51U+Uwbu1oJWGFEg3lvtR+B43CLh2wcJEvVRlvK0= X-Received: by 2002:a05:600c:4ec6:b0:419:e25e:ef62 with SMTP id g6-20020a05600c4ec600b00419e25eef62mr4046133wmq.40.1713816669111; Mon, 22 Apr 2024 13:11:09 -0700 (PDT) Received: from [172.16.1.217] ([80.95.105.245]) by smtp.gmail.com with ESMTPSA id fc14-20020a05600c524e00b004161af729f4sm17712488wmb.31.2024.04.22.13.11.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Apr 2024 13:11:08 -0700 (PDT) Message-ID: Date: Mon, 22 Apr 2024 19:28:54 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 3/3] serial: sc16is7xx: add support for EXAR XR20M1172 UART To: "Konstantin P." Cc: Konstantin Pugin , krzk@kernel.org, conor@kernel.org, lkp@intel.com, vz@mleia.com, robh@kernel.org, jcmvbkbc@gmail.com, nicolas.ferre@microchip.com, manikanta.guntupalli@amd.com, corbet@lwn.net, ychuang3@nuvoton.com, u.kleine-koenig@pengutronix.de, Maarten.Brock@sttls.nl, Greg Kroah-Hartman , Jernej Skrabec , Herve Codina , Andy Shevchenko , Hugo Villeneuve , Lech Perczak , =?UTF-8?Q?Ilpo_J=C3=A4rvinen?= , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org References: <20240420182223.1153195-1-rilian.la.te@ya.ru> <20240420182223.1153195-4-rilian.la.te@ya.ru> <7cf31245-b2a1-419c-add6-a6a50a3f3cf1@kernel.org> Content-Language: en-US From: Jiri Slaby Autocrypt: addr=jirislaby@kernel.org; keydata= xsFNBE6S54YBEACzzjLwDUbU5elY4GTg/NdotjA0jyyJtYI86wdKraekbNE0bC4zV+ryvH4j rrcDwGs6tFVrAHvdHeIdI07s1iIx5R/ndcHwt4fvI8CL5PzPmn5J+h0WERR5rFprRh6axhOk rSD5CwQl19fm4AJCS6A9GJtOoiLpWn2/IbogPc71jQVrupZYYx51rAaHZ0D2KYK/uh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q0taaWKkAjkkGAT7mD1Q5PiLr06Y/+Kzdr 90eUVneqM2TUQQbK+Kh7JwmGVrRGNqQrDk+gRNvKnGwFNeTkTKtJ0P8jYd7P1gZb9Fwj9YLx jhn/sVIhNmEBLBoI7PL+9fbILqJPHgAwW35rpnq4f/EYTykbk1sa13Tav6btJ+4QOgbcezWI wZ5w/JVfEJW9JXp3BFAVzRQ5nVrrLDAJZ8Y5ioWcm99JtSIIxXxt9FJaGc1Bgsi5K/+dyTKL wLMJgiBzbVx8G+fCJJ9YtlNOPWhbKPlrQ8+AY52Aagi9WNhe6XfJdh5g6ptiOILm330mkR4g W6nEgZVyIyTq3ekOuruftWL99qpP5zi+eNrMmLRQx9iecDNgFr342R9bTDlb1TLuRb+/tJ98 f/bIWIr0cqQmqQ33FgRhrG1+Xml6UXyJ2jExmlO8JljuOGeXYh6ZkIEyzqzffzBLXZCujlYQ DFXpyMNVJ2ZwPmX2mWEoYuaBU0JN7wM+/zWgOf2zRwhEuD3A2cO2PxoiIfyUEfB9SSmffaK/ S4xXoB6wvGENZ85Hg37C7WDNdaAt6Xh2uQIly5grkgvWppkNy4ZHxE+jeNsU7tg= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 22. 04. 24, 14:00, Konstantin P. wrote: > On Mon, Apr 22, 2024 at 9:30 AM Jiri Slaby wrote: >> >> On 20. 04. 24, 20:22, Konstantin Pugin wrote: >>> From: Konstantin Pugin >>> >>> XR20M1172 register set is mostly compatible with SC16IS762, but it has >>> a support for additional division rates of UART with special DLD register. >>> So, add handling this register by appropriate devicetree bindings. >> ... >>> --- a/drivers/tty/serial/sc16is7xx.c >>> +++ b/drivers/tty/serial/sc16is7xx.c >> ... >>> @@ -555,18 +578,43 @@ static bool sc16is7xx_regmap_noinc(struct device *dev, unsigned int reg) >>> return reg == SC16IS7XX_RHR_REG; >>> } >>> >>> +static bool sc16is7xx_has_dld(struct device *dev) >>> +{ >>> + struct sc16is7xx_port *s = dev_get_drvdata(dev); >>> + >>> + if (s->devtype == &xr20m1172_devtype) >>> + return true; >>> + return false; >> >> :) so this should simply be: >> >> return s->devtype == &xr20m1172_devtype; >> > I especially want to avoid this construction, because it will lead to > idea than we does not have other > DLD-capable UARTS, which is simply not true, there is, for example, > XR20M1280 UART, which has roughly the same register set > (https://www.alldatasheet.com/datasheet-pdf/pdf/445109/EXAR/XR20M1280.html). > I simply do not have other devices, so I do not > want to risk sending untested patches upstream. Sorry, what? -- js suse labs