Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3CB84EB64DC for ; Tue, 18 Jul 2023 07:06:02 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 695AF866F9; Tue, 18 Jul 2023 09:05:25 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="UwiyJdDn"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D071386723; Tue, 18 Jul 2023 09:05:21 +0200 (CEST) Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 487168673D for ; Tue, 18 Jul 2023 09:05:19 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=clamor95@gmail.com Received: by mail-lj1-x22a.google.com with SMTP id 38308e7fff4ca-2b6ff1ada5dso80816461fa.2 for ; Tue, 18 Jul 2023 00:05:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689663918; x=1692255918; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=0c24Dwtc4QJHe1d2fGFPU9+SeU9E66xsg6NnN1rLuXc=; b=UwiyJdDnNRLdUsQQeVdFBglP1lM8qQQD7d+hUUWVvwX1r2VJm+Ae46TNTcLHxgE5ro +0prXdsnDEDQljX4ZXeLOdFO370L4m9rQ1Klo/hkI43vveAhOAl/2aIjiWkGOScSaSv7 sgcyMYoXLtbMc8IEpnTfaymfWLqbP5W3khG2eazQnZQ7W8ODQ8yEG6yDMQEb1BluPN2M weZpbnjn/ZAWfHc7jprqyRxirB6Pnqcwk7Ai94RVu+6JkhG7hwdBxz3qE5zucsD4iRJc eY+tS9CaKBwV5zbr/TJaluWlvm30cSMtaAimDNxyNdM4uhJ32F3MO2HTXtA8sL16h/5P IK6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689663918; x=1692255918; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0c24Dwtc4QJHe1d2fGFPU9+SeU9E66xsg6NnN1rLuXc=; b=Q3+KvQsEvSirANt2wGJHy80EaWo+yUdqZPd9ht/XBj17Z3PKuzlkKlPrCmQkaWcRX+ KFCfpLiZn7eHS1GJ/6cOqff0wKnV1PA+UtcpaZ+TxmhwVA9l7zZu00pwp+DYht9MO3nL 73ybNUy3xa1BubH2P9d2OaBuWa7woM0DnVHraRMhoIA7VKv000aZkYf0ts1dROuLLpij UxIGfJ3XzYGPCAdJoq9qQcWQsUrbytggo82fTOo7m71CjsyRjKZ+6RBpdrL0CZwWCcB5 t/8iSRgJtcArHCgiAQZKwAStf725beQA3BJlNQ87yhdewirYWNH3O5cdeWauUmkRbqRu hyFA== X-Gm-Message-State: ABy/qLZ1sc/hWSLZ5Np/vTYm/PgtEltTHh+KY6PCLf309wtK7BT3fKvR ouoe3YApbVK1p3kl4ewl5bE= X-Google-Smtp-Source: APBJJlHXB8DgdPeboYIJOqGmDpkQ+hgeUqeCnw4N+3mnB1Cf7/Wuv1nKKLBGs2Dw6isUcopgWVhRfQ== X-Received: by 2002:a2e:7e06:0:b0:2b6:fa3f:9230 with SMTP id z6-20020a2e7e06000000b002b6fa3f9230mr9182452ljc.46.1689663917737; Tue, 18 Jul 2023 00:05:17 -0700 (PDT) Received: from xeon.. ([188.163.112.64]) by smtp.gmail.com with ESMTPSA id z10-20020a05600c220a00b003fbfea1afffsm1343644wml.27.2023.07.18.00.05.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Jul 2023 00:05:17 -0700 (PDT) From: Svyatoslav Ryhel To: Simon Glass , Philipp Tomsich , Kever Yang , Kostya Porotchkin , Neil Armstrong , Marek Vasut , Patrick Delaunay , Patrice Chotard , Jagan Teki , Matteo Lisi , Jaehoon Chung , Anatolij Gustschin , Jonas Karlman , Quentin Schulz , Svyatoslav Ryhel , Eugen Hristev Cc: u-boot@lists.denx.de, u-boot-amlogic@groups.io, u-boot@dh-electronics.com, uboot-stm32@st-md-mailman.stormreply.com Subject: [PATCH v1 3/4] power: pmic-uclass: probe every child on pmic_post_probe Date: Tue, 18 Jul 2023 10:05:03 +0300 Message-Id: <20230718070504.19810-4-clamor95@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230718070504.19810-1-clamor95@gmail.com> References: <20230718070504.19810-1-clamor95@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Main goal is to probe all regulator childrens for their proper setup but if pmic has non regulator children they should not suffer from this either. Signed-off-by: Svyatoslav Ryhel --- drivers/power/pmic/pmic-uclass.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/power/pmic/pmic-uclass.c b/drivers/power/pmic/pmic-uclass.c index 0e2f5e1f41..8ca717bd5e 100644 --- a/drivers/power/pmic/pmic-uclass.c +++ b/drivers/power/pmic/pmic-uclass.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #if CONFIG_IS_ENABLED(PMIC_CHILDREN) @@ -198,9 +199,18 @@ static int pmic_pre_probe(struct udevice *dev) return 0; } +static int pmic_post_probe(struct udevice *dev) +{ + struct udevice *child; + + device_foreach_child_probe(child, dev); + return 0; +} + UCLASS_DRIVER(pmic) = { .id = UCLASS_PMIC, .name = "pmic", .pre_probe = pmic_pre_probe, + .post_probe = pmic_post_probe, .per_device_auto = sizeof(struct uc_pmic_priv), }; -- 2.39.2