From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3E613C001DC for ; Mon, 31 Jul 2023 15:58:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231598AbjGaP6R (ORCPT ); Mon, 31 Jul 2023 11:58:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233395AbjGaP6D (ORCPT ); Mon, 31 Jul 2023 11:58:03 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 236021708; Mon, 31 Jul 2023 08:57:54 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id AD317611F4; Mon, 31 Jul 2023 15:57:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 857A7C433C8; Mon, 31 Jul 2023 15:57:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1690819073; bh=j6seqjGhNL1HBaCJWdf8bKpzEPJEZK3w7efxOcgvlMA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=S1TiYPYxZR14hLZpsrGZVdTEkSIdq2XOcboY376EjxMFAvCLiarFXWbG2iH4MAuqb TjhcCisVYRWhI5ysMDNazgGO6Kc3qZx3cleaaPvJ84v8bcLHwbz1iL8kms7Zv7rwha g+j41DatwohMPPUzv/WqtBi4YLuQTkDmwWyLvc7s= Date: Mon, 31 Jul 2023 17:57:50 +0200 From: Greg KH To: Hugo Villeneuve Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, jirislaby@kernel.org, jringle@gridpoint.com, isaac.true@canonical.com, jesse.sung@canonical.com, l.perczak@camlintechnologies.com, tomasz.mon@camlingroup.com, linux-serial@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Hugo Villeneuve , Lech Perczak Subject: Re: [PATCH v9 09/10] serial: sc16is7xx: add post reset delay Message-ID: <2023073159-follow-resume-cc9b@gregkh> References: <20230725142343.1724130-1-hugo@hugovil.com> <20230725142343.1724130-10-hugo@hugovil.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230725142343.1724130-10-hugo@hugovil.com> Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org On Tue, Jul 25, 2023 at 10:23:41AM -0400, Hugo Villeneuve wrote: > From: Hugo Villeneuve > > Make sure we wait at least 3us before initiating communication with > the device after reset. That says what you do, but not _why_ you do it? Please read the kernel documentation again for how to write a good changelog text. It's usually the hardest part of submitting a patch. > > Signed-off-by: Hugo Villeneuve > Reviewed-by: Lech Perczak > Tested-by: Lech Perczak > --- > 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 49213be60baf..718e982e1efe 100644 > --- a/drivers/tty/serial/sc16is7xx.c > +++ b/drivers/tty/serial/sc16is7xx.c > @@ -1526,6 +1526,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(5, 10); 5, 10 is NOT 3us. :(