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 X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 295F5C433E5 for ; Tue, 28 Jul 2020 18:47:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 152A120786 for ; Tue, 28 Jul 2020 18:47:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732496AbgG1Srf (ORCPT ); Tue, 28 Jul 2020 14:47:35 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:60436 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729190AbgG1Sre (ORCPT ); Tue, 28 Jul 2020 14:47:34 -0400 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1k0UdQ-007K4q-6m; Tue, 28 Jul 2020 20:47:32 +0200 Date: Tue, 28 Jul 2020 20:47:32 +0200 From: Andrew Lunn To: Fabio Estevam Cc: Bruno Thomsen , netdev , Florian Fainelli , Russell King - ARM Linux , Heiner Kallweit , Lars Alex Pedersen , Bruno Thomsen Subject: Re: [PATCH 1/2] net: mdiobus: reset deassert delay Message-ID: <20200728184732.GB1745134@lunn.ch> References: <20200728090203.17313-1-bruno.thomsen@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Tue, Jul 28, 2020 at 09:32:03AM -0300, Fabio Estevam wrote: > > Signed-off-by: Bruno Thomsen > > --- > > drivers/net/phy/mdio_bus.c | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c > > index 6ceee82b2839..84d5ab07fe16 100644 > > --- a/drivers/net/phy/mdio_bus.c > > +++ b/drivers/net/phy/mdio_bus.c > > @@ -627,8 +627,9 @@ int __mdiobus_register(struct mii_bus *bus, struct module *owner) > > bus->reset_gpiod = gpiod; > > > > gpiod_set_value_cansleep(gpiod, 1); > > - udelay(bus->reset_delay_us); > > + fsleep(bus->reset_delay_us); > > gpiod_set_value_cansleep(gpiod, 0); > > + fsleep(bus->reset_delay_us); > > Shouldn't it use the value passed in the reset-deassert-us property > instead? Hi Fabio As Bruno pointed out, that property is not relevant here. But i agree with you in principle. Bruno, please add a new optional property for the delay after releasing the reset. Andrew