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 87EB8C433FE for ; Mon, 28 Nov 2022 06:48:30 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 16C688517E; Mon, 28 Nov 2022 07:48:12 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=sholland.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=sholland.org header.i=@sholland.org header.b="Mh/0Fqe4"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="Ud02My7j"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2F1E98517E; Mon, 28 Nov 2022 07:48:05 +0100 (CET) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 90CD88516C for ; Mon, 28 Nov 2022 07:48:02 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=sholland.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=samuel@sholland.org Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id C3ED05C00B9; Mon, 28 Nov 2022 01:48:01 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 28 Nov 2022 01:48:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1669618081; x=1669704481; bh=Pa +tCGLjXYq4GiPntw7v9KpUNtj1Xg2mrCCq2CZ+f+U=; b=Mh/0Fqe4J9Gxd9yhWb OUpgA091suAw6ViHGacta70g9GBKlwdrta28bMqzWiKymshbRm2ESa/6jNKWhAYG F5T8gX0hf54tZObQOKT4CbLYFk+eg2idlayCNGqctG7GdR0f1SGqQxqxDHfQ/2Xg r+y0oR7L4VpieEVveOTEb6LnYl5TP5eg3+crUW7j4ectF+hHiCtkUazV8GNsxxVx jRTN8CPOEEfriwhLPLxztpRkhdR6EeLjXsiyl5pCYQIqGqPPt4XXbA48JQZfgwBn opn3H6sJuaQ2t887CK4aeJURFfDgghAkOazP7fAxUEfUclpAihPNl2gpdVrSUxZN 4xyA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1669618081; x=1669704481; bh=Pa+tCGLjXYq4G iPntw7v9KpUNtj1Xg2mrCCq2CZ+f+U=; b=Ud02My7jivpQCxsj5maJKyQUHdIer 6nQECh14UGXtUSS0QdTJuP8YxPqIFYjXGSyQi9hqfMyG9zjVJPv1/t6PsB/4KtB+ SNCxansm56jaiBf7qkTDZ2iVUW06KotW2vv/eGtj/TJOryYFaG1z4U/p790cAnOE fnKznxYg54eKJezOHnYuTWsaXDzLfs8CycGK24aXkXTPgxnHPk7aNVZjascKklpH 0TclW0njCETs4mIa4Jep52fGZ+znzQ+AudRfBbf6WD4El6xoaASD5y5exQIhWRYr h5qtqF/Uawh3z1n6pAN+XYqcFOPNo69KQLksN/D4XHRd1uo5oIeE5kRHw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrjedugddutdduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepufgrmhhu vghlucfjohhllhgrnhguuceoshgrmhhuvghlsehshhholhhlrghnugdrohhrgheqnecugg ftrfgrthhtvghrnhepudekteeuudehtdelteevgfduvddvjefhfedulefgudevgeeghefg udefiedtveetnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepshgrmhhuvghlsehshhholhhlrghnugdrohhrgh X-ME-Proxy: Feedback-ID: i0ad843c9:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 28 Nov 2022 01:48:01 -0500 (EST) From: Samuel Holland To: Jaehoon Chung , Andre Przywara Cc: u-boot@lists.denx.de, Samuel Holland Subject: [PATCH 3/3] power: pmic: axp: Bind regulators from the DT Date: Mon, 28 Nov 2022 00:47:56 -0600 Message-Id: <20221128064757.2933-4-samuel@sholland.org> X-Mailer: git-send-email 2.37.4 In-Reply-To: <20221128064757.2933-1-samuel@sholland.org> References: <20221128064757.2933-1-samuel@sholland.org> 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.6 at phobos.denx.de X-Virus-Status: Clean Now that a regulator driver exists for this PMIC, hook it up to the device tree "regulators" subnodes. Signed-off-by: Samuel Holland --- drivers/power/pmic/axp.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/drivers/power/pmic/axp.c b/drivers/power/pmic/axp.c index e0005994e21..025dac24f28 100644 --- a/drivers/power/pmic/axp.c +++ b/drivers/power/pmic/axp.c @@ -45,14 +45,32 @@ static struct dm_pmic_ops axp_pmic_ops = { .write = dm_i2c_write, }; +static const struct pmic_child_info axp_pmic_child_info[] = { + { "aldo", "axp_regulator" }, + { "bldo", "axp_regulator" }, + { "cldo", "axp_regulator" }, + { "dc", "axp_regulator" }, + { "dldo", "axp_regulator" }, + { "eldo", "axp_regulator" }, + { "fldo", "axp_regulator" }, + { "ldo", "axp_regulator" }, + { "sw", "axp_regulator" }, + { } +}; + static int axp_pmic_bind(struct udevice *dev) { + ofnode regulators_node; int ret; ret = dm_scan_fdt_dev(dev); if (ret) return ret; + regulators_node = dev_read_subnode(dev, "regulators"); + if (ofnode_valid(regulators_node)) + pmic_bind_children(dev, regulators_node, axp_pmic_child_info); + if (CONFIG_IS_ENABLED(SYSRESET)) { ret = device_bind_driver_to_node(dev, "axp_sysreset", "axp_sysreset", dev_ofnode(dev), NULL); -- 2.37.4