Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp2080040rwb; Fri, 5 Aug 2022 12:53:30 -0700 (PDT) X-Google-Smtp-Source: AA6agR7bzeECQbsjuJ5813NRsAsiNLvJ1EnnAxv2Y1Qna5YtChHKWCLr8ZUL357Zwf7WwTfyYWCG X-Received: by 2002:a05:6a00:2446:b0:528:5da9:cc7 with SMTP id d6-20020a056a00244600b005285da90cc7mr8319613pfj.51.1659729210311; Fri, 05 Aug 2022 12:53:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659729210; cv=none; d=google.com; s=arc-20160816; b=tLN7yadjCV0nHScAdKRMlfzuxVPYXMkCaUVTZtjZNviUcILKG1U5kjqOrHGXTmSs9D poo0CCNj56fJSWXeVz2YBJ6h/wNdJt4aJODkCXRH8F7bElZFySqKlqE0q70jHnP+vwrP oXP7mdDflqksGMVzWzV+1BbAt04GH8Mvn8nxjQrozkD5Qa7OR4RwCIAshnm6SP77ae9g ToRqyL3xcNx/LWLQTDb1xmT1mL+JbPVH5znci1ZVXDZPifDWuCVOwSSDWjbn6P+725ya Jv8CUVHsYPrRYSftP0YsIilmOzHFIzQI6sjOJeug/1wph0xC35IBQQ280rQJkX8SZOy7 8KQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Q2Atz4bVyAaEAuIsyG/t1IjdMr6gjS4rHeEEvGYCK80=; b=m8psxjzLF/S8JlwQzYy6Ffh9UMaZ5lFRb5bOIaTPQXEGhU6vNE9jhQiO4IQZsN3Hg9 pGlgxUMFAwPZHehpxk/s8hb8xQ+sCIN6o/xOxb2jfJI2zwy4gUyoOFYekWh1EyZO95D+ uN1Y2n4v7uk8dRV87gd3D+N6GjjDMaGaBP0KXf9nxnd/qRiRm/T9OW94MsW9+VwVmnzg lvzfbZKh0jNXGQrh+P10Ay6wP9l0wMRTPxVH3ZK2Ud2KA4X3vNe70GABi6B78vAj3TQV fYdPQLntElqubZeVOg1LsnUF0jlxvNHzeo/cwtR2c0LyFbqPASlxPTxlaW8KxS/j4kGv x00w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=SzqiKjJQ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i130-20020a639d88000000b0041cd5c0295esi93373pgd.852.2022.08.05.12.53.14; Fri, 05 Aug 2022 12:53:30 -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=pass header.i=@chromium.org header.s=google header.b=SzqiKjJQ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241414AbiHET0w (ORCPT + 99 others); Fri, 5 Aug 2022 15:26:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231262AbiHET0v (ORCPT ); Fri, 5 Aug 2022 15:26:51 -0400 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9CCDA1FE for ; Fri, 5 Aug 2022 12:26:49 -0700 (PDT) Received: by mail-ej1-x62a.google.com with SMTP id m4so6680170ejr.3 for ; Fri, 05 Aug 2022 12:26:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=Q2Atz4bVyAaEAuIsyG/t1IjdMr6gjS4rHeEEvGYCK80=; b=SzqiKjJQVFvyrvD+UjbFI0Ijsovl6BCQd/CLmNRlJa3i2aK70f2+hXL2IHvjChohS4 KGPfEGmAAe5+0KNQCp+rOTDHpFSvH/xGA8WDw7bdgEKzfpW+bFVHztcSYyHLEhcneKnA QD4dRFMtvRmUZ5s68j6JUBEhofP2VOPPTpJIk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=Q2Atz4bVyAaEAuIsyG/t1IjdMr6gjS4rHeEEvGYCK80=; b=yPrAYYICVhohiEpket3RPDf2Nv275eaQFOgrTjQNf0Zck0BhclGf3G6n0KB9WyAucN 1Q3lH6Q4Amh8qpnxOlHxbvu07PD7dT5omvX3CDPFsJod9f9+kvUvAz76MgVYc90TDBYP nQ/BFa0AMHfRe2D/yg2oi2HXh2sHO0pEVszHAwbwMZciF14kYFp+N6oW0sDo9QsaKiRs dKrMA8vjQKb30XluaNBA21Id6ofkL/LfEkXZVsbdCvDbAF9rS0QnFtB+bPhsWPkZmusd k2LfPeCr7CWCFUUDAthaWoBRCIiXdUdFDpgJJuYpxo8xYFy8rooKjEgpiLF42EkLMug2 ivkQ== X-Gm-Message-State: ACgBeo3LQBV1JD7O9LFAq+3Qc5Z/flbqc2c3JpGheWe7rKA3PRH3XX9V aU0/VE6BDgf+xBeLTxS640y1GbKSei/jFPG5 X-Received: by 2002:a17:907:6d8f:b0:730:b108:5062 with SMTP id sb15-20020a1709076d8f00b00730b1085062mr6129022ejc.461.1659727607975; Fri, 05 Aug 2022 12:26:47 -0700 (PDT) Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com. [209.85.221.52]) by smtp.gmail.com with ESMTPSA id p20-20020a17090628d400b0073065747de1sm1893679ejd.51.2022.08.05.12.26.47 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 05 Aug 2022 12:26:47 -0700 (PDT) Received: by mail-wr1-f52.google.com with SMTP id l22so4264085wrz.7 for ; Fri, 05 Aug 2022 12:26:47 -0700 (PDT) X-Received: by 2002:adf:fb12:0:b0:20c:79b2:a200 with SMTP id c18-20020adffb12000000b0020c79b2a200mr5240692wrr.617.1659727606852; Fri, 05 Aug 2022 12:26:46 -0700 (PDT) MIME-Version: 1.0 References: <20220805111836.1.Id5a4dc0a2c046236116693aa55672295513a0f2a@changeid> In-Reply-To: <20220805111836.1.Id5a4dc0a2c046236116693aa55672295513a0f2a@changeid> From: Doug Anderson Date: Fri, 5 Aug 2022 12:26:35 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] usb: misc: onboard_usb_hub: Drop reset delay in onboard_hub_power_off() To: Matthias Kaehlcke Cc: Greg Kroah-Hartman , Alexander Stein , Linux USB List , LKML Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Fri, Aug 5, 2022 at 11:19 AM Matthias Kaehlcke wrote: > > onboard_hub_power_off() currently has a delay after asserting the > reset of the hub. There is already a delay in onboard_hub_power_on() > before de-asserting the reset, which ensures that the reset is > asserted for the required time, so the delay in _power_off() is not > needed. > > Skip the reset GPIO check before calling gpiod_set_value_cansleep(), > the function returns early when the GPIO descriptor is NULL. > > Signed-off-by: Matthias Kaehlcke > --- > > drivers/usb/misc/onboard_usb_hub.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) I was trying to figure out what this "reset" was defined to do and I looked for the device tree bindings. They don't seem to exist. Was that an oversight? In any case, I'm not convinced that your patch is correct. Timing diagrams often show a needed delay between adjusting a reset GPIO and turning on/off the power. The timing diagrams can sometimes show a required delay on both sides. I guess at the moment the only user of this reset GPIO has a symmetric delay, but I can totally expect that someone could come along and say that they needed 10 ms on one side and 1 ms on the other side...