From patchwork Wed Apr 29 17:23:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 185848 Delivered-To: patches@linaro.org Received: by 2002:a50:3a95:0:0:0:0:0 with SMTP id v21csp231743ecc; Wed, 29 Apr 2020 10:23:53 -0700 (PDT) X-Received: by 2002:a63:115a:: with SMTP id 26mr14753050pgr.354.1588181033176; Wed, 29 Apr 2020 10:23:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588181033; cv=none; d=google.com; s=arc-20160816; b=ZQ9xDBoHSQwfk56xkW+KgSA2Ui9lgA5Sq6Gbg4JCvKus3vW1cT+74YS7OwcGevfTcQ 7OL3VXUsMXeJeYBPEwQmT+K85Pn/HRQNtoL0DPlfpatPiNZoG+xXWZIgMMTlDXRkH326 0X7XT6x0QIx+/AOe7MsXPCwr2iTybbBZMPJlrVtkt1vFkW30twRkniTjkXFfbxN7hzHQ QoYM8fnpP2gbY2pX5QnvgWPcMp6TpSzbHJyoKK6VMTd4cZKsurvQ5Yv7tFzRl/6jTD3I O5mbL6YFyE/FuqyMIalPKVBd6GRa9RoWNU42j1m8xQSKORE8ZVtGIfox+XI/T7w+omzU moNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:dkim-signature; bh=8FQ5I0LPhVl6eGhASWpUBR6rw0WhPP4gGji6IhYEdAI=; b=H6io833aDePLlX4hB0LCIeTI06ORcN2sQGml05H415JlvjaQSQ8RsGq9YK4UJft0FK QONtG72z5AW5rZ3vrVVVe1iNA7RVcGZ31rYV1u4rkEdsctOXXIQCRppzRkWE1PgVKnwh FFZbksiXujKYv+KLEquAWv7oRSf7HjWYnUbB9sDy/0J7O87hXHFI2gE4BgAszraSOfER lpPKBWeQ2iuwB4XDKq4Tx2ftYSoq4ghQSKGM6Zql26j5slY3FXHP0+yQv+WrWrikeca3 PxRDamGAo4VR6QwJuh4o7ysyvLRkfcpFQRSeqNCnOY1DfHtkfaOxNqx3fMBnc1P1qdJl OXMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QOU1du+H; spf=pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id y36sor2178954pgl.86.2020.04.29.10.23.52 for (Google Transport Security); Wed, 29 Apr 2020 10:23:53 -0700 (PDT) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QOU1du+H; spf=pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=8FQ5I0LPhVl6eGhASWpUBR6rw0WhPP4gGji6IhYEdAI=; b=QOU1du+HE3JgAOh4rUSq9U57cptJkja6ysGuZe3A2vHYbkftoM+sSoCIowLosbnnb/ xu/BvdUqRZev4Jwmb6Fm77ugbEMoCIGs7YDMZ1NkA51v4vQEUEkTKb+nNz+ttjmd+9oQ /C6ChCYBZFMZEbBDRcZVDF+Z8eCcAiOBdcjjSYgKML54CfOYIxwU74P5g95/9rYRJbJd 8BZ6V7q+tbxSdVctyZloz1iX/uTNh4lpIheO2VUsizG0glJkXN0Z0E1kTffGvIC4bgtl KMAelFQtpwayijR2u6M3SzMMZdxkqXGCyz6HOBEYPi0d8HZ1c6nII09f+xyYFk39JWBk SCNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=8FQ5I0LPhVl6eGhASWpUBR6rw0WhPP4gGji6IhYEdAI=; b=nUfvnPQHoWA2CAWNDzjEpfPYe/ymN/gD7G6/vO5rpwNNmHumB748ebAPDatZIpuped ArNa6bzYmZtsPGXycCq310zimJGhzvCSA2aNyqD8He7VBmrWp3pCp2l3WA5+UyOpnESt g1XDTBrZhphBa7R3/cyn1itjBQ/G/Jpkd9GLnbB7KPlAmjCZjEQ+aXwu6Lk4ueOoSWNl fV2yIamfxBqZ+nEpAH+kxKNCBPdeSK19vc5TOD7vC/AxsJfrucZptqFyBwU7lqWaS/fB vCqAAy2t6RPDeCgm8CzXqhpgTwQnoHoBVo3PCslILTjt/FKuiBp8vVBo91Gx4vWUY7n8 2Qjg== X-Gm-Message-State: AGi0PuZS/oUwitUnFUtlWEyKAV7pXOn3GMZ/AQoB7IjqBEb0Q62bSL7E xplX9ccUvSi9Hp9ZjT3z7kbZ9NpA X-Google-Smtp-Source: APiQypIw4v36udMuIWZcDFrQCZjgfjNurzviIuoAGQ7/1O3k+fz5uu5zvLh7g78WqTBtufAZneh1Bw== X-Received: by 2002:a63:4d11:: with SMTP id a17mr32571000pgb.392.1588181032618; Wed, 29 Apr 2020 10:23:52 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([2601:1c2:680:1319:692:26ff:feda:3a81]) by smtp.gmail.com with ESMTPSA id y21sm1451523pfn.148.2020.04.29.10.23.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Apr 2020 10:23:51 -0700 (PDT) From: John Stultz To: lkml Cc: John Stultz , linux-pm@vger.kernel.org, Greg Kroah-Hartman , Linus Walleij , Thierry Reding , Mark Brown , Liam Girdwood , Bjorn Andersson , Saravana Kannan , Todd Kjos , Len Brown , Pavel Machek , Ulf Hansson , Kevin Hilman , "Rafael J. Wysocki" , Rob Herring Subject: [PATCH] regulator: Revert "Use driver_deferred_probe_timeout for regulator_init_complete_work" Date: Wed, 29 Apr 2020 17:23:49 +0000 Message-Id: <20200429172349.55979-1-john.stultz@linaro.org> X-Mailer: git-send-email 2.17.1 This reverts commit dca0b44957e5 ("regulator: Use driver_deferred_probe_timeout for regulator_init_complete_work"), as we ended up reverting the default deferred_probe_timeout value back to zero, to preserve behavior with 5.6 we need to decouple the regulator timeout which was previously 30 seconds. This avoids breaking some systems that depend on the regulator timeout but don't require the deferred probe timeout. Cc: linux-pm@vger.kernel.org Cc: Greg Kroah-Hartman Cc: Linus Walleij Cc: Thierry Reding Cc: Mark Brown Cc: Liam Girdwood Cc: Bjorn Andersson Cc: Saravana Kannan Cc: Todd Kjos Cc: Len Brown Cc: Pavel Machek Cc: Ulf Hansson Cc: Kevin Hilman Cc: "Rafael J. Wysocki" Cc: Rob Herring Reported-by: Marek Szyprowski Suggested-by: Mark Brown Signed-off-by: John Stultz --- drivers/regulator/core.c | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) -- 2.17.1 diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index c340505150b6..7486f6e4e613 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -5754,10 +5754,6 @@ static DECLARE_DELAYED_WORK(regulator_init_complete_work, static int __init regulator_init_complete(void) { - int delay = driver_deferred_probe_timeout; - - if (delay < 0) - delay = 0; /* * Since DT doesn't provide an idiomatic mechanism for * enabling full constraints and since it's much more natural @@ -5768,17 +5764,18 @@ static int __init regulator_init_complete(void) has_full_constraints = true; /* - * If driver_deferred_probe_timeout is set, we punt - * completion for that many seconds since systems like - * distros will load many drivers from userspace so consumers - * might not always be ready yet, this is particularly an - * issue with laptops where this might bounce the display off - * then on. Ideally we'd get a notification from userspace - * when this happens but we don't so just wait a bit and hope - * we waited long enough. It'd be better if we'd only do - * this on systems that need it. + * We punt completion for an arbitrary amount of time since + * systems like distros will load many drivers from userspace + * so consumers might not always be ready yet, this is + * particularly an issue with laptops where this might bounce + * the display off then on. Ideally we'd get a notification + * from userspace when this happens but we don't so just wait + * a bit and hope we waited long enough. It'd be better if + * we'd only do this on systems that need it, and a kernel + * command line option might be useful. */ - schedule_delayed_work(®ulator_init_complete_work, delay * HZ); + schedule_delayed_work(®ulator_init_complete_work, + msecs_to_jiffies(30000)); return 0; }