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 9C1D8EB64DC for ; Thu, 20 Jul 2023 12:39:11 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 79C2C867E1; Thu, 20 Jul 2023 14:38:33 +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="nVFojwox"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6E757867B0; Thu, 20 Jul 2023 14:38:22 +0200 (CEST) Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) (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 201E2867C3 for ; Thu, 20 Jul 2023 14:38:18 +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-lf1-x133.google.com with SMTP id 2adb3069b0e04-4fb761efa7aso1212904e87.0 for ; Thu, 20 Jul 2023 05:38:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689856697; x=1690461497; 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=nVFojwoxMWtfhAdoYVx9PFb5jTedkE/TMRQrBiDfmHY5k4V5GztKUEFWhmitnCvMGT dH3T9sJXOKrslKUcoAzf14f9AhPiD1ysC+yLGr9a0AHT6Zg2ii5da5VvHfRxyFFcrm0L aoLGvX6tElZp22k/2+n/JEguyTdt99ZMzSnnOQLa+SfQOjCl2Ksrk76Osk9+I2i7wi2o r06nZ+LV6/LoXfBKB6SCtN+68GDfUsAXTyd3KopMrvgjFcLYcVbnM31sg4MjTCo+lwOp KF6QpL/hwC4AzJbWm9a5xekwEJANeKNjEY3m4CAdH+Mt9bPT/M4y3qT1tQp1amor0WAX Kl4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689856697; x=1690461497; 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=NdnwUbHBc/bV6PDpAoRJNCmmQ9lJdb1Wp3mASHy5Me+ar+PfCIwT/lPwwQntQjaTuj DVOsAGPIbRcpHdbtXlGQe0Cs6WlOjOzH6Sh7lZe9Ne77MKnchgU4M8hAHOV6wejD7Vro b4uJnK37f5zZmBipPdDH4CLhfIvGJ6natdEbn9qKdr3mvM3aHCdhHqQl10vFtYfhQpKq TE9CD/QHGOceSHZbzlmdUDcH6L7cI05t3fs/NZ/VLXRJjjn6plnqEKutaYxgN4+21aqQ rQFLIc7I8HtEQe21oiEkrO7cWzFzk0xcATHUTZMg7+02eIivAsBtB4PpKwmJ7OwIKMKy 4Hng== X-Gm-Message-State: ABy/qLZuAXLspMkTSlk5gkKdYHB7oIODW7F/I2EyqELn5wg8TfFjP71w Ww1Wdxi5v9AFvDUfLHhSzj0= X-Google-Smtp-Source: APBJJlHoyqetL6da4H7kXJUkOlZtiTEHwe4iucVi8AnHEIjqhTwQiiXK/yy7dVI8m9cRrUskBaBJkQ== X-Received: by 2002:a05:6512:234e:b0:4fb:9d61:db4d with SMTP id p14-20020a056512234e00b004fb9d61db4dmr2507356lfu.18.1689856697384; Thu, 20 Jul 2023 05:38:17 -0700 (PDT) Received: from xeon.. ([188.163.112.64]) by smtp.gmail.com with ESMTPSA id m25-20020ac24ad9000000b004fb9c625b4asm184401lfp.210.2023.07.20.05.38.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Jul 2023 05:38:17 -0700 (PDT) From: Svyatoslav Ryhel To: Simon Glass , Philipp Tomsich , Kever Yang , 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 v2 5/7] power: pmic-uclass: probe every child on pmic_post_probe Date: Thu, 20 Jul 2023 15:37:42 +0300 Message-Id: <20230720123744.26854-6-clamor95@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230720123744.26854-1-clamor95@gmail.com> References: <20230720123744.26854-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