Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2355601pxp; Mon, 7 Mar 2022 13:40:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJyxnu+OMn8ETXWwutiGypUmk2mtT+KGt9l2iZOPFDvY06yonYSUDb5I+PV+lwVZjBrCYBo0 X-Received: by 2002:a17:906:8558:b0:6da:e4a4:f526 with SMTP id h24-20020a170906855800b006dae4a4f526mr10546431ejy.19.1646689208363; Mon, 07 Mar 2022 13:40:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646689208; cv=none; d=google.com; s=arc-20160816; b=jJok/GqB/a6jrODJzt+knrvLbcvCtF+fPsM21dDZ0nWc2vNN+hoJY8MX9W3VdqFgAU JEKi8mYJtebSxi8ZEmqeAtrVwmirtt89hPLQ9KJrViS2Mt6tkbYGPYjKUhHNZw2b0aBz cJCXtVHjMV14senf9WEjWHmyw5C9SJ73ENCmTYT8IXcy6RxbD394DFXBsffk4bfFsEWx NsAfInvg+NweH8h/Q8C2vqjCJJEM5sjAM8rN8LRP3YWjqczarrqeskxaTwcznWn5z0Z3 91lhc5E1L00r+6PyXxfGG14LEU8HcihemH97cLSZro476QNn6ZvpfplpiT/ADoHAZOCj EGbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=eIbFJy8nN90SEvoIdthmxporFHpDEg4t9GggoCs849Q=; b=V52NeMS+QnmGP2cQ1pN1QOMzFFT0ICi8hKfH20NzqBHwKdyM3sMCBoVcyNYDuOShwX G1dsIvRBujO9RO8NpplJa4MFRaT+bh690nHiDIwS55BpEiY9hr8gBtrIEo7YmsUTB0oZ 5e+JL2ZGAzfjctnpzwosCS0SErY0DV/JScHRvmKUgjB/xaxrj/zIrY5ddiwmwC/i2GGf ob7pB14iHv+2y5k01jTQMN2Q+wUQyd6OayYlb1fFX1UfvpwCaH+FMgnJCHPYoFayv7XX aEVVbwWPWgzkle6SedQl1D2F6wNrD8Tgv1w19LUDgnZGZGuA8lsULvAgxtU4ENMj7iwA eFQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=d0ZK+Pr7; 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=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bi14-20020a170906a24e00b006b87abe4b4esi8803454ejb.31.2022.03.07.13.39.45; Mon, 07 Mar 2022 13:40:08 -0800 (PST) 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=@intel.com header.s=Intel header.b=d0ZK+Pr7; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244035AbiCGQPX (ORCPT + 99 others); Mon, 7 Mar 2022 11:15:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244028AbiCGQPU (ORCPT ); Mon, 7 Mar 2022 11:15:20 -0500 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 364193BF9C; Mon, 7 Mar 2022 08:14:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646669666; x=1678205666; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=9lxkY6esalBBvJEOAscFPgv2UXaiF/EqM4Jnw+GpDxE=; b=d0ZK+Pr78qIyWV/NwaqPufVWLgofrGExRWNszCkAiDMIAWJUyfdxEIP8 nos+onjXTN0/lz6k2tgI0DXOktpyD9Nd2lGMLKI/BnxqanysLpkGsMn6+ wXPqVW9JhWUn6XQDM6Zj+pTrJUoKgRFjJEEWqHvVV/BmrNTmV+3yJ2XgT e10p1FZPyzKcUcFKmVYwJXRkJZnvpT6AJWu44xf0ua5PJUVK1pf4maFMc IdMLl1dvzY1ETzPuZztcJ/8oRXhkgT5j02RNV8cl+guA+D7mzKGkIkqLj U6SkQuim9XSbMt3VxE5QDEYW5WCzB5kvw/uaZ8Q21rOI6dcfS7p1DHu+m A==; X-IronPort-AV: E=McAfee;i="6200,9189,10279"; a="340861379" X-IronPort-AV: E=Sophos;i="5.90,162,1643702400"; d="scan'208";a="340861379" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Mar 2022 08:14:25 -0800 X-IronPort-AV: E=Sophos;i="5.90,162,1643702400"; d="scan'208";a="643298544" Received: from smile.fi.intel.com ([10.237.72.59]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Mar 2022 08:14:22 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.95) (envelope-from ) id 1nRFzN-00CrBy-PE; Mon, 07 Mar 2022 18:13:37 +0200 Date: Mon, 7 Mar 2022 18:13:37 +0200 From: Andy Shevchenko To: Bjorn Andersson Cc: Rob Herring , Daniel Scally , Heikki Krogerus , Sakari Ailus , "Rafael J. Wysocki" , Hans de Goede , linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, Dmitry Baryshkov Subject: Re: [PATCH v4 7/7] usb: typec: mux: Add On Semi fsa4480 driver Message-ID: References: <20220307034040.1111107-1-bjorn.andersson@linaro.org> <20220307034040.1111107-7-bjorn.andersson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,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 On Mon, Mar 07, 2022 at 06:48:25AM -0800, Bjorn Andersson wrote: > On Mon 07 Mar 02:16 PST 2022, Andy Shevchenko wrote: > > On Sun, Mar 06, 2022 at 07:40:40PM -0800, Bjorn Andersson wrote: ... > > > + /* 15us to allow the SBU switch to turn off */ > > > + usleep_range(15, 1000); > > > > This is quite unusual range. > > > > If you are fine with the long delay, why to stress the system on it? > > Otherwise the use of 1000 is unclear. > > > > That said, I would expect one of the below: > > > > usleep_range(15, 30); > > usleep_range(500, 1000); > > Glad you asked about that, as you say the typical form is to keep the > range within 2x of the lower value, or perhaps lower + 5. > > But if the purpose is to specify a minimum time and then give a max to > give the system some flexibility in it's decision of when to wake up. > And in situations such as this, we're talking about someone connecting a > cable, so we're in "no rush" and I picked the completely arbitrary 1ms > as the max. > > Do you see any drawback of this much higher number? (Other than it > looking "wrong") I see the drawback of low number. The 1000 makes not much sense to me with the minimum 66x times less. If there is no rush, use some reasonable values, what about usleep_range(100, 1000); ? 10x is way better than 66x. -- With Best Regards, Andy Shevchenko