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 A178BEB64DA for ; Wed, 12 Jul 2023 08:24:59 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 558E0869CD; Wed, 12 Jul 2023 10:24:43 +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="WRCKSrtP"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2E96E869C5; Wed, 12 Jul 2023 10:24:40 +0200 (CEST) Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) (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 CFC85869C1 for ; Wed, 12 Jul 2023 10:24:36 +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-x132.google.com with SMTP id 2adb3069b0e04-4fbaef9871cso10418895e87.0 for ; Wed, 12 Jul 2023 01:24:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689150276; x=1691742276; 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=Z9tRC2r3N2FY+1FyCVjUMJXELCB/7awPT7kbZ+JyUbQ=; b=WRCKSrtPC3zEOlld+8esagXztDh6MRgAaeHBmC54luZOq/h9EUglCgiOlVklSQtcsV HFQTofD+du2QbuNVaQPrN+BIYrqoF8cselmmqN/W53D05I9kTH4ZzofU6VtcHdTtOGbg b9cL0xjGtyO0UQFOFGfgdNcfpJXofJqTOn/7RA6MfTPbXCU+OICYWSD/mIAeEMDDXeLr LbnzwdPQA4qK3B2OyAs7pv9U0GCG2afSgN1WIWUJFJd5FLcBUWNUT5YTpc+548hLzZHT gRj5At+EKfl9LTdYBcs0aSXI9MuADvxAkZry6wf9iT3dUaBgrVdDslUNSo+UVQq53g7v GNgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689150276; x=1691742276; 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=Z9tRC2r3N2FY+1FyCVjUMJXELCB/7awPT7kbZ+JyUbQ=; b=jb46TvLdGRMIYNAnAm1Lc7jI1bAktYMlHjzCvLPbYm6DMMmfRxGuO8pUz5dD57A+6V FvPAlVImHFuoA7hsvw3h+a43cMi7/mJiHVzoM7ylPI6cdHeZk5DZN78D1gfINUfW8C9k D4tXUBZVzSq2n4JYLUKbsqyDZ+7HeI+kCrha1wNAhlc24ckLlTxWDxoXAaWVtXHUlyw+ qf5pmRTUV32zLdxtGeAHDco3MlCko+qBfNkFlrl1T8fHsCfMFMjGkXKD06F7AERVLqBo BAianv0jhzZEUF9M9fApaIp8Y6Kb5Yyap3Z7UmtpuYpEEjdbFVB5GUpv400wn1hsBeha OSjA== X-Gm-Message-State: ABy/qLZLJ+L8R1Dn6GEge9m7i3ZMKMDwrMI+uV9TrOcfKoUZ8+vCmV8+ zVvPRgORPX9RFBZKO3rC/ig= X-Google-Smtp-Source: APBJJlG3y3zP7lowRUp8WZAGqd9PfeIdTxHksRZhULT3cLZMGN5Wz1Z7JhGnJFOwbc5/STRXP/hvHg== X-Received: by 2002:ac2:5b9c:0:b0:4f8:6800:86f6 with SMTP id o28-20020ac25b9c000000b004f8680086f6mr14550214lfn.49.1689150276015; Wed, 12 Jul 2023 01:24:36 -0700 (PDT) Received: from xeon.. ([188.163.112.64]) by smtp.gmail.com with ESMTPSA id q29-20020ac2515d000000b004fb64600e5dsm596523lfd.219.2023.07.12.01.24.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jul 2023 01:24:35 -0700 (PDT) From: Svyatoslav Ryhel To: Jaehoon Chung , Michal Simek , Svyatoslav Ryhel Cc: u-boot@lists.denx.de Subject: [PATCH v1 2/2] power: regulator: palmas: set up voltage on probe Date: Wed, 12 Jul 2023 11:24:18 +0300 Message-Id: <20230712082418.37877-3-clamor95@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230712082418.37877-1-clamor95@gmail.com> References: <20230712082418.37877-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 Without this patch PALMAS regulators are just "requested" without actual initial setup (device tree values are completely ignored). This causes major issue since voltage is usually set on probing and rarely is changed. Drivers which change voltage assume that initial voltage was already set and this was not the case. Tested-by: Svyatoslav Ryhel Signed-off-by: Svyatoslav Ryhel --- drivers/power/regulator/palmas_regulator.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/power/regulator/palmas_regulator.c b/drivers/power/regulator/palmas_regulator.c index 3c4eb83be7..cc292f6946 100644 --- a/drivers/power/regulator/palmas_regulator.c +++ b/drivers/power/regulator/palmas_regulator.c @@ -316,6 +316,8 @@ static int palmas_ldo_probe(struct udevice *dev) } } + regulator_autoset(dev); + return 0; } @@ -423,6 +425,8 @@ static int palmas_smps_probe(struct udevice *dev) printf("Invalid PMIC ID\n"); } + regulator_autoset(dev); + return 0; } -- 2.39.2