Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp901529pxb; Fri, 22 Apr 2022 13:51:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxiQKQPHCrA0KcBswmGe+liaj2/+zSFUliWi8RLRzKRHrLwYBHQEyembAT2ImwkUSayoveC X-Received: by 2002:a63:1510:0:b0:39d:7212:8500 with SMTP id v16-20020a631510000000b0039d72128500mr5296371pgl.377.1650660693256; Fri, 22 Apr 2022 13:51:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650660693; cv=none; d=google.com; s=arc-20160816; b=UiaOogYPobwmTeDh/pggn+QY3CLrqvDQUp2AvA8nA0xPKBEV8yKtBzhRnXUA7NcnMH WZYh3Z3OV5w92/Gt9hcgU2bXYRGW2w2k5Mw6UMwcGPSFeBZ0UWz6Nzx7uyqNDWhzGx2X avPVu7Z5eDsKyHKLU+jfKukl5YDZJqDVSqJy6hqlVl+bQarXu67l/PLANHNtGK2EGwrT gJjVKKsM39IOwxkdiZWB2E1hdKPyRVmHgzXQk8ct0yxRM4wOp3tEf0I8wSAYMIEB7fei f0PwvRE2lKikeozGnVj/24GHuXhcNx+xAP9xEMjuyZ5UxJCri0qI89B6E1b9pYaDwov1 TYsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=bvrkNCKhOsmu5SLCmAe9xw4zsL/d+xk644AXnsxEnyg=; b=vZOg1u/NvwyzktcoIlfDW2dXM3g/VQ4ySucq76SUsJsfN20NGMrV2paYo5kq66tYR8 Qh3lxzYsUpOsurthZpCFqrkUZGxtZoXEuN6r6BCtLYLk1DxKM43HmI2BToq3qTEtJ1/U 52yLAtVpX9AzWyzCruGa34H941ySqKP3kwg/iT9n8GJtxo2UI4k8kxOOKMGVNr/hFi5Y 6amAQTvQNqX6DXYC6avKrBJqT0ZQuin6XPd8DbzUhFxiC0o+lGQgmXV0IpVOJH3lE2X3 d8OtrzsHsrdNwLe2G4h0FWqiQtEqzocYk1ASGrRj2f8h6K6ynQNAK876psky6m/09txo /sIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UJvRICXC; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id p24-20020a63e658000000b003aa69040c5csi9010282pgj.437.2022.04.22.13.51.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 13:51:33 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UJvRICXC; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 33822211BEF; Fri, 22 Apr 2022 12:43:54 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1382487AbiDTVPA (ORCPT + 99 others); Wed, 20 Apr 2022 17:15:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1382518AbiDTVOw (ORCPT ); Wed, 20 Apr 2022 17:14:52 -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 B30A3483BB for ; Wed, 20 Apr 2022 14:12:03 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3FA1161509 for ; Wed, 20 Apr 2022 21:12:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 864D5C385A1; Wed, 20 Apr 2022 21:12:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1650489122; bh=xKYphzgcXDUuNB1g1olIfF2kYeWa4F6zxmc89At4WEo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=UJvRICXCnqsZTOicqSq8XKHqpzaEqYrYXZYXyKglmBjBqIFVo0jx6kG5ktlFUeeFH ortGVo4GqvbbVJKVhSid1vygH3kfRBodCwzQhJ/I6u34n4PiLxjXMA0WrX+tx7I/oJ ViqVpUontQilWMG6MSazSsjGy0SLTA8NJXf/kBKYcJIYYjG2DOD9jZYanEDdYdM73Z bRK9i1vgkTlBq02HwayxBa8AVDc5+Kdj7IvExSopovIQjj1fjc19zC1ZBB/RgCrUYn mKJHLlGjFQDc0ucBBbIyKwr/3srD9IBT8sAHkSYFZOiLkC6H5e/Vx87BKTPFThULku XmyLZhqmjVkXQ== Date: Wed, 20 Apr 2022 22:11:57 +0100 From: Mark Brown To: Brian Norris Cc: Liam Girdwood , Matthias Kaehlcke , linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] regulator: core: Replace _regulator_enable_delay() with fsleep() Message-ID: References: <20220418141158.1.If0fc61a894f537b052ca41572aff098cf8e7e673@changeid> <20220418141158.2.I31ef0014c9597d53722ab513890f839f357fdfb3@changeid> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="MBlKhS3PxJRqZiM8" Content-Disposition: inline In-Reply-To: X-Cookie: Will it improve my CASH FLOW? X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE autolearn=unavailable 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 --MBlKhS3PxJRqZiM8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Apr 20, 2022 at 11:24:08AM -0700, Brian Norris wrote: > On Wed, Apr 20, 2022 at 05:28:46PM +0100, Mark Brown wrote: > > Did the issue with the delay functions preferring delays on the higher > > end of the allowed range get fixed? That might be an issue for larger > > usleep() values. > Hmm, good question. I had a faint memory of this problem, and searching > around, I couldn't find that anybody *thought* they fixed it, and I > found evidence to the contrary (some reports complaining about, e.g., > boot-time performance issues in drivers/usb due to the same, with no > indication that anybody truly fixed the problem). That's what I feared :/ > So maybe it's better to retain the regulator core helper > (_regulator_enable_delay()) and rename/repurpose it for my patch 1? Sounds like a plan. > I feel like there's some room for improvement in either fsleep() or > usleep_range() or both, but I'm not sure exactly how to go about that > right now. It's really difficult to design an API that's both tasteful and clear about intent - it's relatively easy for something like a driver that just has a single hard coded value so you can just use usleep_range() directly but it gets awkward once you start being generic and the code really has no idea what the actual delay it's dealing with is. --MBlKhS3PxJRqZiM8 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmJgdx0ACgkQJNaLcl1U h9BNngf+LUIMyIBXhnQk7dsM8g3YL+uGLxUSOp7J+4ytI/gqL5rDnAYjhiZHyMIF bGXVQLoxRfI97mNc1bkMTdfn4E+GdisohnZTeWBC2EWJsgp+hqNp4OJjvNmnG7fA G3HWRFVuNJRFZXuNR/xV40gMbF90YzMxd5O5jEAy4ClG15+lOKYX7ufazU+TOXjt 7UA05qUreEvo/If3W8ku3s/s4Z0IBArkjNv1Ympm6BzXZvUxzL/OIxpDlK7Wu9CJ 1Uld08J7g1jVMX3lFhq2RqCJuCwwQqdhikh+npjZ+Nljtc2h8zXveuRcmbeN0TQl iBXESTgNXEIu0yuktqT1k9pTkhnGqQ== =5nW2 -----END PGP SIGNATURE----- --MBlKhS3PxJRqZiM8--