Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp445936rwd; Wed, 24 May 2023 21:51:29 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7tmjOlKDclhICMD54aD6/yKkUjHDULA6VKlqO9zWi0h5fQfpuqGfL4/mAA3PDVTdIaemv0 X-Received: by 2002:a17:90a:b115:b0:255:3f6f:2c6 with SMTP id z21-20020a17090ab11500b002553f6f02c6mr355540pjq.22.1684990289202; Wed, 24 May 2023 21:51:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684990289; cv=none; d=google.com; s=arc-20160816; b=pb0svH+U0jb4EZrcZCX+CDHLPuMB2QAYTGSetvZao7eDzUU2ZRnuAzcdnPirvr7tjZ 7xoEOolc8xsgSeUkDg3RPSK/JspwEM2+pFqLCRuECD6bPAckjN579yrolyNvqyUAr+VZ HjZfhuxT+U5VNhzltKQEUsBksqNi8ywwIxWxu/asgzTXKeY6ng3ThgAFXzeyhBpwscIC BPKwFX/U1RPut9on+J4D547yizYrO2tYk7Hf2ABcis/yUb9IagV9mwtk3ns5QDgj5Aw4 yZwx+m17sePkS9D0Fs+Op3HY5YNe/Awm4/So0PBQ9gjUopM7hILZN11fGcUkrE/UlX1A dJww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:cc:to:from:dkim-signature; bh=JzQwwWHfLn5GqJ+sUpssIPjhRdBj01gT2s8uoqlHWI4=; b=VLDiV3Srt+nhJJzU8a8VIKdAyzqhnQR3Skav0WjEnzcM531ZKTT7URYQmm/oyLqSH7 Z8Zkp1VCAhxbi7RvQyJu0a7AuTWsYnqLB+Blk6nPouCWAGEY/4CV0HG1dh5E2jrS/czo NIXLzYN25XdLoNORByXA/9b/FGjzSNAdYFqQ0evjOlytY8tlR407dIX+BrXw4gU1uq4+ 3m/ze3Oa5nXq+zKXy3hH3c4LSpBdwCZplsUQtLlL6IScFKj2npLhk9t4rCaHzDPW8Eh2 mqZHk2FmkSyJ/VCYqqEbl3nDrAv4OUDMVHKBQ6eEihU4KN1k6mZegLzYBmyOukfKBQHb iD6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@hugovil.com header.s=x header.b="YJgReEa/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z4-20020a63b904000000b0053094305b59si206674pge.875.2023.05.24.21.51.14; Wed, 24 May 2023 21:51:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@hugovil.com header.s=x header.b="YJgReEa/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237738AbjEYEGI (ORCPT + 99 others); Thu, 25 May 2023 00:06:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237734AbjEYEE3 (ORCPT ); Thu, 25 May 2023 00:04:29 -0400 Received: from mail.hugovil.com (mail.hugovil.com [162.243.120.170]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8FAA91A6; Wed, 24 May 2023 21:04:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=hugovil.com ; s=x; h=Subject:Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=JzQwwWHfLn5GqJ+sUpssIPjhRdBj01gT2s8uoqlHWI4=; b=YJgReEa/vE2riAdBxkk5ViBMZs F8EVEKjd/h5NYSZ8FL+TWOdz/aaDrUNBHbuZ4qbjQ9HOx52QgkIeruEDteW69XE7Ji+nHcNL6TAJN RN2DHwkXn3+zgfWCLpQCBsLfxl+VX1cQLNtCDtL9DFAHcva5Vpdc6vAu9vRNQgtoXhWE=; Received: from modemcable168.174-80-70.mc.videotron.ca ([70.80.174.168]:52970 helo=pettiford.lan) by mail.hugovil.com with esmtpa (Exim 4.92) (envelope-from ) id 1q22D2-0001dB-Ii; Thu, 25 May 2023 00:04:17 -0400 From: Hugo Villeneuve To: gregkh@linuxfoundation.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, jirislaby@kernel.org, jringle@gridpoint.com, tomasz.mon@camlingroup.com, l.perczak@camlintechnologies.com Cc: linux-serial@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, hugo@hugovil.com, linux-gpio@vger.kernel.org, Hugo Villeneuve Date: Thu, 25 May 2023 00:03:17 -0400 Message-Id: <20230525040324.3773741-5-hugo@hugovil.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230525040324.3773741-1-hugo@hugovil.com> References: <20230525040324.3773741-1-hugo@hugovil.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 70.80.174.168 X-SA-Exim-Mail-From: hugo@hugovil.com X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Subject: [PATCH v3 04/11] serial: sc16is7xx: add post reset delay X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on mail.hugovil.com) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hugo Villeneuve Make sure we wait at least 3us before initiating communication with the device after reset. Signed-off-by: Hugo Villeneuve --- drivers/tty/serial/sc16is7xx.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c index a7c4da3cfd2b..af7e66db54b4 100644 --- a/drivers/tty/serial/sc16is7xx.c +++ b/drivers/tty/serial/sc16is7xx.c @@ -1428,6 +1428,12 @@ static int sc16is7xx_probe(struct device *dev, regmap_write(s->regmap, SC16IS7XX_IOCONTROL_REG << SC16IS7XX_REG_SHIFT, SC16IS7XX_IOCONTROL_SRESET_BIT); + /* + * After reset, the host must wait at least 3us before initializing a + * communication with the device. + */ + usleep_range(3, 5); + for (i = 0; i < devtype->nr_uart; ++i) { s->p[i].line = i; /* Initialize port data */ -- 2.30.2