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 48767C27C76 for ; Sun, 22 Jan 2023 23:46:31 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E2B86856CB; Mon, 23 Jan 2023 00:46:28 +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="fWjsOuZb"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="nDkORSDj"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 16BF1855DA; Mon, 23 Jan 2023 00:46:27 +0100 (CET) Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) (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 78DA9854D2 for ; Mon, 23 Jan 2023 00:46:24 +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.west.internal (Postfix) with ESMTP id 3409532000D7; Sun, 22 Jan 2023 18:46:22 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Sun, 22 Jan 2023 18:46:22 -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 :message-id:mime-version:reply-to:sender:subject:subject:to:to; s=fm1; t=1674431181; x=1674517581; bh=xhpO5YA56Zufj5yJRQRqxXsMR vE7jORh9lB22IBw6ek=; b=fWjsOuZbp+3xXYxVD2k9Hm6JX8PCbC5cKxcxcD5Aa bzN2A/nMI5cws06Mj9CKl5eo8D4Db0t0Ripsieh1JVzGM0QgLTrdVUECUmPLfZQf 1boEoubLugDgf/GpmT+/SSQPW2lhztMiZ04n5PncJYpOeoNH8scZ5AfsVq3Veom7 FMqLzM9tsxSl/lB2+Uh4D6oZ+P5vzm7SsuhjFs+HURbks5jhTdYf7PIxZ5ZrxIGC TwBOJJzd90RwwS6D0Umq9f0dsBJMUHOBz6ULhM1Yaf+ugyOHFPkUESxihPMlxl04 SsVVYQU4L9FJSR07FM7U4fZiMm5LrY6rN3D+1Pg/meXng== 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:message-id :mime-version:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1674431181; x=1674517581; bh=xhpO5YA56Zufj5yJRQRqxXsMRvE7jORh9lB 22IBw6ek=; b=nDkORSDjPwVAnavjR1zz0+5VBBFM1X5tKxj5DDIY9Kgd1zZOFnQ HhmsZdTssRwYIQHD6ljU7qedzITgsWzy12USXejW8SXq0GuilxgDZGg8RMvImtfJ mX28iic+056EX5EshTkrxo4QzEX0Tm3u1olcTt5zgaSdZ1hz9BykRMt/xPV+IL4E qMlqAhuEwScuEQuWbmKUtI40Lr0HfnPMOxpRmXxkWJmDStlpYqZOaai1dcIzUGpV eNivkGM5WzPoq6gwLL8LusvW7phOtsfW2rPuSRqrSSgUyWHZ3GafkpxdgcHIygqH VlCkP/wjw/OzIA19nobDkAzzjKEOXHjeaQg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedruddujedgudehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgggfestdekredtredttdenucfhrhhomhepufgrmhhuvghl ucfjohhllhgrnhguuceoshgrmhhuvghlsehshhholhhlrghnugdrohhrgheqnecuggftrf grthhtvghrnhepkeehffethedtteffgfefteetjedvfeelueevudffgfeutdejvdehledv vdffhfevnecuffhomhgrihhnpehkvghrnhgvlhdrohhrghenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehsrghmuhgvlhesshhhohhllhgrnhgu rdhorhhg X-ME-Proxy: Feedback-ID: i0ad843c9:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 22 Jan 2023 18:46:21 -0500 (EST) From: Samuel Holland To: Andre Przywara , Jagan Teki , Jaehoon Chung Cc: u-boot@lists.denx.de, Samuel Holland Subject: [PATCH 0/3] power: Model X-Powers PMIC VBUS detection using the driver model Date: Sun, 22 Jan 2023 17:46:19 -0600 Message-Id: <20230122234623.1636-1-samuel@sholland.org> X-Mailer: git-send-email 2.37.4 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 This is the next step, after basic regulator support[1], of converting the X-Powers AXPxxx PMIC to use the driver model. This series creates a regulator driver to represent the VBUS detection function, which is used by the sun4i USB PHY driver. The USB PHY driver has already been updated to use this regulator device when present[2]. The net result is removing some ugly hacks from a couple of GPIO drivers. [1]: https://lore.kernel.org/u-boot/20230121231307.42628-1-samuel@sholland.org/ [2]: commit 6fa41cdd19b9 ("phy: sun4i-usb: Support VBUS detection via power supply") Samuel Holland (3): power: regulator: Add a driver for the AXP USB power supply sunxi: Switch to PMIC USB power supply VBUS detection gpio: axp/sunxi: Remove virtual VBUS detection GPIO arch/arm/include/asm/arch-sunxi/gpio.h | 1 - configs/A33-OLinuXino_defconfig | 2 +- configs/Ainol_AW1_defconfig | 2 +- configs/Cubieboard4_defconfig | 3 +- configs/Cubietruck_plus_defconfig | 2 +- configs/MSI_Primo81_defconfig | 2 +- configs/Merrii_A80_Optimus_defconfig | 3 +- .../Nintendo_NES_Classic_Edition_defconfig | 2 +- configs/Sinovoip_BPI_M3_defconfig | 2 +- configs/Wexler_TAB7200_defconfig | 2 +- configs/Yones_Toptech_BD1078_defconfig | 2 +- configs/Yones_Toptech_BS1078_V2_defconfig | 2 +- configs/colorfly_e708_q1_defconfig | 2 +- configs/ga10h_v1_1_defconfig | 2 +- configs/gt90h_v4_defconfig | 2 +- configs/iNet_D978_rev2_defconfig | 2 +- configs/inet86dz_defconfig | 2 +- configs/inet_q972_defconfig | 2 +- configs/polaroid_mid2407pxe03_defconfig | 2 +- configs/polaroid_mid2809pxe04_defconfig | 2 +- configs/q8_a23_tablet_800x480_defconfig | 2 +- configs/q8_a33_tablet_1024x600_defconfig | 2 +- configs/q8_a33_tablet_800x480_defconfig | 2 +- configs/tbs_a711_defconfig | 2 +- drivers/gpio/axp_gpio.c | 21 ++------ drivers/gpio/sunxi_gpio.c | 6 +-- drivers/power/regulator/Kconfig | 7 +++ drivers/power/regulator/Makefile | 1 + drivers/power/regulator/axp_usb_power.c | 49 +++++++++++++++++++ include/axp209.h | 1 - include/axp221.h | 1 - include/axp809.h | 1 - include/axp818.h | 1 - 33 files changed, 87 insertions(+), 50 deletions(-) create mode 100644 drivers/power/regulator/axp_usb_power.c -- 2.37.4