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-sam...@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