Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp651426lqt; Fri, 19 Apr 2024 06:45:20 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUcSJ+ZeQxoPN95NbdHZjAsA8SJ9aJg3GTe022wvTBmmsNhZZYBJRJH2XzP7IwixsJnPJ14H6XwLZSNAtFz+fETx405SEtIMCwP1CIXng== X-Google-Smtp-Source: AGHT+IGOAbNqa+KYDrfMiA9ODinQ1Avkbuu91ZP+rAHv/zM8W8cTiX7fcHQRr/vnpnUJFULJ7KTT X-Received: by 2002:a05:6808:2804:b0:3c7:41ba:102f with SMTP id et4-20020a056808280400b003c741ba102fmr2285625oib.34.1713534320500; Fri, 19 Apr 2024 06:45:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713534320; cv=pass; d=google.com; s=arc-20160816; b=ve+taKpISq7XPNgjE3JbWXHNwyhZwyPBIOK4Sa/kk+AOrDDJ1jhVB2vqMJVHEEoJ5V DB9ndBi51B/w/WGOBovCli7JFovLCOMnbmN7yxh2/2AeQeTxJi+JCjruiy4QwcaBJFKe cn8ti4BS1CftMDxCoFmwuj2n1ZqoGRRvxFGwb9S4Bt05MTEZ1q2D7bK+yzcklvfCZAAz UD++U0nRplD/SgLB11BT6lIdBfc4mN2oqiqeqSxzhJAj5+Edrkn5QtibFI+PlAUgw+c+ B2KSJXELpENgDOw9VsGvORerOKrwjT8YcXJOQotN2PQVoVsXBcyTtvMfW1lRL1BQmU0i 8fNw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=TRh/24YFoJxk/siZzuLpmoGSYfvWvbqBGJ8Jh2Xiye0=; fh=gRM9xoTZyyTljvAsI1MrhGCQak64SgKMql+mXOqJz1U=; b=kz9yRGaIUZ2nlCd4JnIWsviLkMliWUmQPWvps4pEfQhwOTdnr9ESUW4xzT1qFyVuoo uIYkrgVeiEXf1t9TbVpFP/lijgA0UxW3z4zNir3X6P9atRxja+pdlIfujVsk8bhc68s8 ZjCQ0njWqVda1ekO2vLmeGsOBs8M32koj3vKhTXMdf7QC1CuDBq8wkLoBnylv7mffLGM W+DGA3rzxIQa4bHPRyplKVmZyopY+8a2h+Q65Gq9TReF65/MV4JD2Yv/Di8DxG1NLCbw +ZA7AoA/DhXD1W19q7h3iSoTRDfGKzPwYODspbCPistWmQWTuB1H2wTYXBNCdoTZiRAC bDSw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="hyh/ouGW"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-151498-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151498-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id l186-20020a6388c3000000b005f7fe229c68si1341740pgd.223.2024.04.19.06.45.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Apr 2024 06:45:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-151498-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=@gmail.com header.s=20230601 header.b="hyh/ouGW"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-151498-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151498-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 18452281285 for ; Fri, 19 Apr 2024 13:45:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D643F12B14A; Fri, 19 Apr 2024 13:45:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hyh/ouGW" Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44]) (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 64F30129E9A; Fri, 19 Apr 2024 13:45:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713534314; cv=none; b=fSamcZDTiHlOKHbdyCdvsQY08b4AI55cbRWfQGzDN8o9fWoVbrYurare7tOARwkTpIE+2Cb4PHxI7+myhtGSKe7VE2K2dOYSPTzjbFmjNPL85XF56MZJc6CDG+5pWActYl9gxeWmOlvh31NcqgkK8VarDPcWVlgwmYGrLtUMCV0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713534314; c=relaxed/simple; bh=GA+lW5HtgYsj2a+WAq8/T30QMYc5JJ/OKGBfLyhRkqU=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=cwEvzn6C30WlY9KYf5BC1NF7XVzQ5nRLodeSOc91S5c3t/8WZXaHmzzVj/ZHR1toSkHO7GuLloUzN5XjEKmtv+N+IYN9ZzGuMALjiEsEHiME36I1+qpEHqZgqBBDAbfh3L52oXbM+tUq5tuJyyqflyoQJDJxXZjr0rLyh2GvIz4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=hyh/ouGW; arc=none smtp.client-ip=209.85.218.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-a526d381d2fso549132166b.0; Fri, 19 Apr 2024 06:45:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713534311; x=1714139111; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=TRh/24YFoJxk/siZzuLpmoGSYfvWvbqBGJ8Jh2Xiye0=; b=hyh/ouGWaiFjWKAbZmeKhThQQ9itbBsyusQMHGfgRr7LiIBPSCVEMnurKHztj44JRq OMdJN/byVmazimXECc/zfps66Fsekk0Lg0NcfcP+bLAy0i3zFdYlPMRN6OBwkn2bRFkP +sqkAolaZ0EpE0Rv8cClFUMKoSlDzyk+nMlhI32NfTUzCdJdZv02MBZws9nLHloKLyJF iclJfpWxEgeUUpramtNnIDI7nqa98WCKlxgAso0xf4g6gExEVnAxluCqJv8zXSMje7E7 CpOru+UBe9jZuqjyEMXI2/130lZXXoaNxL5LLZ+LxiTkODURW3hLPXO7oNdQzyTIK+DL Zk4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713534311; x=1714139111; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TRh/24YFoJxk/siZzuLpmoGSYfvWvbqBGJ8Jh2Xiye0=; b=AmKjFAVSdaxcHcebT7+PvnGKyhd2MtJci86wj/Xklptiwka94SMpt7hztvH11Cosho BFqacLaNHIcsEO3Fgm/t/o6KAt5viyr47NkxQH+/ey+ARiWj8/slB2tRnFsxu7ExRa1H 7Bgx1iDKM1ScOER4v4P2f+wvDNU16OkaUgj0pM+9s+pyZdRmUZ2PAduWfT9xNt5gGMFa 84hG7Ft4CJ3R8SB4IMyq2kGi/f0Wys16+B1XWEoNTWpiXITJRAT4ucQUqDpoI4L6rpbY dzWf861Zb3RUWbH3aM4w3nl4TizgPEpJGM7Hgy9e/taBCJ0IGD+d7FAjBbYmWGrFworp emLg== X-Forwarded-Encrypted: i=1; AJvYcCXCsaBZdOaYaFSU5ObbOgwn/ky8fsX7D2cRE7BrpjLYHW1lOdvO0tqTKkBAH/lSJ6VMOf155c5AA/GKxBa3C1kB1j14ZxyBYWXLeUuD2HWuCpNc2CCtzjzg6jyhM+NY7Im05ubRi6/s2wxV X-Gm-Message-State: AOJu0YzUxeyCUk8mao9PRumGaZUqgz76UPZY2QjYTu80Lwd+Ywcho/E/ MQ3aTsUxE2UVO2iy8vUwx1GoxKH7SbkZXLcG9SWkgLRvDemM3/RMFqFLa8uIeZAdX6qhKuXXS1y dMRysiNz9V/7w65W5QQ1ZZDbsFPCwvwf4 X-Received: by 2002:a17:906:7622:b0:a55:77fa:80d7 with SMTP id c2-20020a170906762200b00a5577fa80d7mr3813958ejn.8.1713534310522; Fri, 19 Apr 2024 06:45:10 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240419124506.1531035-1-rilian.la.te@ya.ru> <20240419094259.4257fefba753f6bd5962720c@hugovil.com> In-Reply-To: <20240419094259.4257fefba753f6bd5962720c@hugovil.com> From: "Konstantin P." Date: Fri, 19 Apr 2024 16:47:14 +0300 Message-ID: Subject: Re: [PATCH v4 0/3] add support for EXAR XR20M1172 UART To: Hugo Villeneuve Cc: Konstantin Pugin , Greg Kroah-Hartman , Jiri Slaby , Hugo Villeneuve , Andy Shevchenko , Lech Perczak , =?UTF-8?Q?Ilpo_J=C3=A4rvinen?= , Thomas Gleixner , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Apr 19, 2024 at 4:43=E2=80=AFPM Hugo Villeneuve = wrote: > > On Fri, 19 Apr 2024 15:45:00 +0300 > Konstantin Pugin wrote: > > > From: Konstantin Pugin > > > > EXAR XR20M1172 UART is mostly SC16IS762-compatible, but > > it has additional register which can change UART multiplier > > to 4x and 8x, similar to UPF_MAGIC_MULTIPLIER does. So, I used this > > flag to guard access to its specific DLD register. It seems than > > other EXAR SPI UART modules also have this register, but I tested > > only XR20M1172. > > Yes, in datasheet this register is called "DLD - Divisor Fractional" > > or "DLD - Divisor Fractional Register", calling depends on datasheet > > version. > > Hi Konstantin, > it would probably be a good idea to also add the device to the list of su= pported devices for this driver in the Kconfig file. > > Hugo. It is already done in V4. > > > > > I am sorry about too many submissions and top post reply. About second = - > > I do not know how to reply properly to this ML from GMail phone app. Ab= out first - I just > > get very good feedback from Andy Shevchenko, and want to fix his review= picks ASAP. > > > > Changes in v2: > > - use full name in git authorship > > > > Changes in v3: > > - change formatting of commit messages to unify width > > - rework commit messages according to code review > > - add XR20M117X namespace for EXAR-specific register > > - do not use UPF_MAGIC_MULTIPLIER for checking EXAR chip, > > use s->devtype directly > > - replace while loop to fls function and expanded check > > - sort compatibles > > - reformat multiline comment. > > > > Changes in v4: > > - rebase onto tty-next branch > > - added Kconfig mention of the chip > > - used rounddown_power_of_two instead of fls and manual shift > > - used FIELD_PREP instead of custom macro > > - removed has_dld bit from common struct, replaced by check function, > > which checks directly by s->devtype > > - fixed tab count > > - properly apply Vladimir Zapolskiy's tag to patch 2 only > > > > Konstantin Pugin (3): > > serial: sc16is7xx: announce support of SER_RS485_RTS_ON_SEND > > dt-bindings: sc16is7xx: Add compatible line for XR20M1172 UART > > serial: sc16is7xx: add support for EXAR XR20M1172 UART > > > > .../bindings/serial/nxp,sc16is7xx.yaml | 1 + > > drivers/tty/serial/Kconfig | 18 +++--- > > drivers/tty/serial/sc16is7xx.c | 62 +++++++++++++++++-- > > drivers/tty/serial/sc16is7xx_i2c.c | 1 + > > drivers/tty/serial/sc16is7xx_spi.c | 1 + > > 5 files changed, 70 insertions(+), 13 deletions(-) > > > > > > base-commit: c6795fbffc4547b40933ec368200bd4926a41b44 > > -- > > 2.34.1 > > > > > > > > > -- > Hugo Villeneuve