From patchwork Thu Feb 20 05:04:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 183650 Delivered-To: patches@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp140725ile; Wed, 19 Feb 2020 21:04:45 -0800 (PST) X-Received: by 2002:a17:902:8546:: with SMTP id d6mr29744357plo.193.1582175085630; Wed, 19 Feb 2020 21:04:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582175085; cv=none; d=google.com; s=arc-20160816; b=xZosjmklsO5+eaW5itWmd/1lfeEI6mCPKoWRuSquyy9cxlZmanTXyGi8ftzLniXBCh 6HgPdMyF2LqhDjhfTn5Fw/zTevF0gCdYdY4UrkXvbJHNwPcxFDmSMFD/18qhejnTkTfF Dy35Uk6EJP/blt4RjnQkWdTUuZeS0rR6gpXdglUxDH7ChA+Ha+Y5CFjq7eJbF8zi27xg suW3OsbqJ0+dzjRmRtc7p8USK4wzTahP+XA0XQDz0tEmfLtNOUWtifaAXUPku/S/UhK4 TR5450hgaYmt7sWEXwiyaldjXEmyZwxvLgjzqUIP1AO4D0rWK58DfT3OfgDKQAnqUgT5 5sfg== 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=SnxfHJcH3dJfaGTadw6bDQp2VaipWSYONj5VWzxr75M=; b=XI6CuFVGUHYAaOTgYfCBCLNoFd0p3rnKx5KIwlqG5BSqmHFj8/lMyfhMY+s7JqXZaS l5BMJdnFOdL+wP0N+vNbG29+TMnsVkKLNp0NLRuPyv2K+0OLmEKOEIVVdCOS0Py4a6Xk waueYMeUJgvq3mcrSEl3g7dfmUZgHvDU6N5d9y25kjxQ4d/UVbYXjNJ3DKQIeUiSu5yO RQdOfG4ceGRZWrtOUjCPYRW7WQ9uwl47olMbLvDOeUbLDNqy59hPrIifAyP8dUtKQvci L3kRXu0774WFn8sh5/xvpcSQCAR9wBKO4dFlrHo32as/EEMyeX/H5965wE4VJj9ejyn2 mZFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=D82B6Jl8; 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 z3sor722566pjq.25.2020.02.19.21.04.45 for (Google Transport Security); Wed, 19 Feb 2020 21:04:45 -0800 (PST) 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=D82B6Jl8; 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=SnxfHJcH3dJfaGTadw6bDQp2VaipWSYONj5VWzxr75M=; b=D82B6Jl8GzSqPhqK3gndl940M+e/p4RQ4dcJD+Il3Wl28R8uKElrD4Dcf4Ln1l1Jj5 tgh4qBdLTgNeP6q4cgXK6W6AhqUQi5QFV8P2OqsSgenyi8Tk4QT4WgYo7mtQw7N8aNLg 5IqJv+0BdKWBZYJVeHo0JB0frJE6SebarcgYR9A6H5TVZA49g825fAsaFUvcZFJT/c3/ f3Yq1QKFehUNcF3+V/5l2+HY7OnSBCA4BbsnEPxSTNDHNZToNb0eyW0f+hXSTpD0FHuJ 82BJBfgIfCF+UjlMuJyXcn2S3KLONmzUqYAbmPrihKNm2IDZnZ1qJcwx73ZNGClIuKCx QKfA== 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=SnxfHJcH3dJfaGTadw6bDQp2VaipWSYONj5VWzxr75M=; b=hLSfGrpWuzNlWzKAvLpSY64Low58hKy/oo/mORXVBwZEO0J9xIB4WY0ol+7BAqlQlR 1ZdgW5cQy0e9NewUZqJiqu79qmwsumUoDefZHjKvSrgcyBkC+JtF/0aM52wqQmqPFulz Bzys+ODts8xuDId2tjhWpysR5jOONT2GVK9r6EN4Wy5A+udWV8gcyJbdfLBXpIlUzIj/ DqwvcKbwEeCjtVz3OVeWAIhn4W81yBRIiFncgd2Q5sgbIg8R5z5VLw/R0ll/zlPP/TAX QdE5xm5QWbCWbMGz7Q4YWCRfVYt2RJB8Bj+sZVRENNvsZsVkA71OIUN74A84zg7wkXpx rotA== X-Gm-Message-State: APjAAAXaspWWy+hUOFyQl2nk+V+/vuc9kCqZCtdW1Yh230yjtnQuu+Bd LRH0nG9igY7Kp4DrxfpFhXNJ/Foo X-Google-Smtp-Source: APXvYqzLkWrpUiPoCfJrHFXtM/ZLRzMES/WG77gcztnA8Jv+vkT8aXnXJVoRLKX27cVA5hi5qJHsWA== X-Received: by 2002:a17:90a:9311:: with SMTP id p17mr1466208pjo.140.1582175085036; Wed, 19 Feb 2020 21:04:45 -0800 (PST) Return-Path: Received: from localhost.localdomain ([2601:1c2:680:1319:692:26ff:feda:3a81]) by smtp.gmail.com with ESMTPSA id z4sm1400847pfn.42.2020.02.19.21.04.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Feb 2020 21:04:44 -0800 (PST) From: John Stultz To: lkml Cc: John Stultz , Rob Herring , "Rafael J. Wysocki" , Kevin Hilman , Ulf Hansson , Pavel Machek , Len Brown , Todd Kjos , Bjorn Andersson , Liam Girdwood , Mark Brown , Thierry Reding , Linus Walleij , Greg Kroah-Hartman , linux-pm@vger.kernel.org Subject: [PATCH v4 0/6] driver core: Try to improve and cleanup driver_deferred_probe_check_state() Date: Thu, 20 Feb 2020 05:04:34 +0000 Message-Id: <20200220050440.45878-1-john.stultz@linaro.org> X-Mailer: git-send-email 2.17.1 This series tries to improve and cleanup the driver_deferred_probe_check_state() code in the driver core. This is most important for being able to support modules dependencies which may be loaded by userland, far after late_initcall is done. For instance, this series allows us to use successfully various clk drivers as modules on the db845c board. And without it, those drivers have to be statically built in to work. The first patch (or two) is really the most critical for me, but as I was working to understand the code (and with some prodding), it seemed a further cleanup was in order. If folks have concerns about the tail end of the patch set, I'm fine to defer that. The main issue for me is the inability to load module dependencies after init starts. New in v4: * Split earlier version of the patches apart * Defaulting deferred_probe_timeout to 30 seconds if modules are enabled. * Deeper cleanup on driver_deferred_probe_check_state_continue() Feedback would be greatly appreciated! thanks -john Cc: Rob Herring Cc: "Rafael J. Wysocki" Cc: Kevin Hilman Cc: Ulf Hansson Cc: Pavel Machek Cc: Len Brown Cc: Todd Kjos Cc: Bjorn Andersson Cc: Liam Girdwood Cc: Mark Brown Cc: Thierry Reding Cc: Linus Walleij Cc: Greg Kroah-Hartman Cc: linux-pm@vger.kernel.org John Stultz (6): driver core: Fix driver_deferred_probe_check_state() logic driver core: Set deferred_probe_timeout to a longer default if CONFIG_MODULES is set pinctrl: Remove use of driver_deferred_probe_check_state_continue() driver core: Remove driver_deferred_probe_check_state_continue() driver core: Rename deferred_probe_timeout and make it global regulator: Use driver_deferred_probe_timeout for regulator_init_complete_work drivers/base/dd.c | 78 ++++++++++++----------------------- drivers/pinctrl/devicetree.c | 9 ++-- drivers/regulator/core.c | 25 ++++++----- include/linux/device/driver.h | 2 +- 4 files changed, 47 insertions(+), 67 deletions(-) -- 2.17.1