From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8F2CF314D1D for ; Sat, 27 Dec 2025 12:17:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766837874; cv=none; b=bgSK8QlkbvspnDQGf+d/o4mdGWYxkMGCLZHmziNbC+i0M7pSyhcO7vHfvrF3BCssI/1JoR54aJg8moYsFROD9O5XjO/atS6TtXrYsDzumpbaXTVd+W3siUgCLItAtUvL/18q4iIah7Xh/6XoGoVIDvEdmHsBfarQ/Jxmx+P0F9U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766837874; c=relaxed/simple; bh=DB9bq9+xJQuhQCuFSiE0GIeuimSzXBFo5zT2EWh/5eU=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=N2U1hvKXdtDGheg0ThW3ni+Am3yySCYpq0BqRp3N7ICQU82ILfETe5U5bqBO+5q6x3XsrKKy+EM/ZhGkPdgYD0r4nAnnA3dmpXCjxWgi3OnXxWu5nmY1IYxA5o6hFLfsExq8gDhv4f1s8V5tfdlqRdi/igfZPQ4hZEzl1sobcNA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=KqtMYeHT; arc=none smtp.client-ip=209.85.218.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="KqtMYeHT" Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-b8052725de4so693114966b.0 for ; Sat, 27 Dec 2025 04:17:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1766837868; x=1767442668; darn=vger.kernel.org; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=ySqZH7pp0zNCoQqO3i+Jt3k8RxA/XH7I1BLejIH92ZM=; b=KqtMYeHTYkcrzSkEE8NKPUxR3QmkytqBlhhQxGeDmuCxrrIr8nBAHDXpc2fhNaDbgu S6AV18R/czt4OPxu/jm8uxJPKmfn6soUkRCUMXPalWlL402C+1P/DyHiEcWMS1qH+Mwq sIUCPFUMSKmpcBmnHRbI9VGGtD/JHfEBa6LyjVQH4Uo7YL2et6USl5H2Adl0b+3Dz7yW vG5qBHwQb9/gHRJXrJhuLaL1cUCOljJMdCcRXDf9m9dyIdYg9TJCia82KOeVw/lrwHTI pD662sPXlE7k8Ggl4XBkywghUveDwDjekr0j6tuYBnJujjzljOsIU6omp34/9TgUWjQH D41A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766837868; x=1767442668; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ySqZH7pp0zNCoQqO3i+Jt3k8RxA/XH7I1BLejIH92ZM=; b=gPdT4D3V5koQ8d4rvfCaPjwWfW4NZH63lW5eKSEGIkf0lFbfKyi84ppCDemA3adpkJ UoNXgC28OnAid87GrLfgU/zAoLww7sx7fH5lUOFVV9C8NZaXUdBOoXhoFbj3OsqqwVIa Dupqc8Z96ySHlA4uvDq+myh5GFroUoTRCdRF/3Oi8bTtINXOzL+A4FpNdEViu4FPdk5n rdKGuSXo9q56oH+XfPmSYqwQ29FiwT2vhqdilOBDO45M+MBmqqP8ozV7ybuW7lfwJiMD SN6bX5P6ma6VHx2j+eOkIT/zIrqtPucMtqOgogCkNFxZSF6HzwiMqxmDnzOw2tdvl1x6 jc6A== X-Forwarded-Encrypted: i=1; AJvYcCWC/oepbFT2VQTg7CvIAoJUUpwC3waTnUMIWWO/TP9zyPjlDQQ1nhoHAQUXZDjYJ3oADBgDIwvVE9JIO98=@vger.kernel.org X-Gm-Message-State: AOJu0YxeRoevfT6K1RBEuQJwTxgKjzbKMdSjr+3fJuwOi4xgh37p4+KI dgyVzRlpoM1u7AV/1JFNk06fFrQaO6ZCWMqvdycLFU3budWTYAf79cu5ClPK9IUJqI0= X-Gm-Gg: AY/fxX7eYwlA4yfJWFsIEuKLE1bqVMf7SE2SNJFATte6sxFId+C90V2S5CmLkph+vSD xkbDcZvnwFBPo50xQTfPr4AGiNgUF05oFsCWx6BylyhZWm6d4W1sYm46qLETRrSl9OhpjF/WHzn DBz5F/j/vOeN8R/jWxkA6Slcdy15aiTztmfz8BzVikP2RqxD3TvXSOZm1lq1M7uv5cjfDmDaAP5 VCajNAmBHx7S6Tc5CTQMqXRt0M17aEo2ovlwE3beCmIvH/hFABqwiE68bDYSnUYo5BYyS4ulOzi dKxOp2KB4xmf+hiRs41Zdbybv8idzdmnpEi5pKR6JAKmcP1hjVcURYvEStWG0GdmXd9tVsP19+P NyDumkkBGrFhVEzaCxr0PygARz3cNirk0eWOQkzjGmH9R2Yd2cBolcqWa3rxolMPy5s/uRGQOhD 8VG9FcYbSYQG6B0u/mHGLzYPWLpBR02XZWPmPlEevBA3+6FlVAf8FVs7R24v2NyB4FFIAu21zEd sZf/w== X-Google-Smtp-Source: AGHT+IGF63gzCKM7F4Lx7BIiMuthbp/J2/b/u0mgkYjV8ss5hWKAxYqgXHW2rlORGeg/5N5Hp7UUqg== X-Received: by 2002:a17:907:72cd:b0:b7a:72bd:ac5d with SMTP id a640c23a62f3a-b8036ebbba7mr2702310566b.13.1766837867762; Sat, 27 Dec 2025 04:17:47 -0800 (PST) Received: from puffmais2.c.googlers.com (244.175.141.34.bc.googleusercontent.com. [34.141.175.244]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b8037f18575sm2616274666b.54.2025.12.27.04.17.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Dec 2025 04:17:47 -0800 (PST) From: =?utf-8?q?Andr=C3=A9_Draszik?= Subject: [PATCH 0/8] regulator: core: allow regulator_register() with missing required supply Date: Sat, 27 Dec 2025 12:17:44 +0000 Message-Id: <20251227-regulators-defer-v1-0-3104b22d84cb@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-B4-Tracking: v=1; b=H4sIAGjOT2kC/x3MQQqAIBBA0avIrBPSSqKrRAupGRuIjLEiCO+et HyL/19IKIwJBvWC4M2J415gKgXz6veAmpdisLXtjLWtFgzX5s8oSS9IKJo6Iu9c7xtyULJDkPj 5l+OU8weE8nNHYgAAAA== X-Change-ID: 20251224-regulators-defer-f5ffa668a3f6 To: Liam Girdwood , Mark Brown , Javier Martinez Canillas , Jon Hunter , Dmitry Baryshkov , Oleksij Rempel Cc: Peter Griffin , Tudor Ambarus , Will McVicker , Juan Yescas , kernel-team@android.com, linux-kernel@vger.kernel.org, =?utf-8?q?Andr=C3=A9_Draszik?= X-Mailer: b4 0.14.2 Hi, With these attached patches it becomes possible again to support hardware designs with multiple PMICs where individual rails of each act as required supplies for rails of the other (due to the latter being e.g. always-on), and vice-versa. Google Pixel 6 and 6 Pro (oriole and raven) are examples of such designs. Rather than returning -EPORBE_DEFER in regulator_register() when set_machine_constraints() fails with -EPROBE_DEFER (due to missing required supplies), we still allow rail registration and try to reresolve supplies each time a new rail gets registered. This is implemented using a bus (regulator bus), which allows the core to reresolve supplies for regulators that still need them whenever new regulators (i.e. devices) are added. Using a bus also solves existing problems around late resolution of supplies as mentioned in the commit message introducing that bus. The series starts with a few bug fixes and the last two commits implement the changes mentioned above, but do depend on the bug fixes. Cheers, Andre' Signed-off-by: André Draszik --- André Draszik (8): regulator: core: update two debug messages regulator: core: fix locking in regulator_resolve_supply() error path regulator: core: move supply check earlier in set_machine_constraints() regulator: core: streamline supply resolution for always-on/boot-on regulators regulator: core: remove dead code in regulator_resolve_supply() regulator: core: don't ignore errors from event forwarding setup regulator: core: reresolve unresolved supplies when available regulator: core: don't fail regulator_register() with missing required supply drivers/regulator/core.c | 351 ++++++++++++++++++++++++++++----------- include/linux/regulator/driver.h | 2 + 2 files changed, 254 insertions(+), 99 deletions(-) --- base-commit: cc3aa43b44bdb43dfbac0fcb51c56594a11338a8 change-id: 20251224-regulators-defer-f5ffa668a3f6 Best regards, -- André Draszik