aboutsummaryrefslogtreecommitdiff
path: root/drivers/power
diff options
context:
space:
mode:
authorSimon Glass2021-08-08 12:20:25 -0600
committerTom Rini2021-09-04 12:26:02 -0400
commit7abf178bb815df7d7e1f6c5db202e02ae7d9489f (patch)
tree6e9399995d9e905fbdb8e9e9de11053c719d36b0 /drivers/power
parentb2f9bac0e703631b12f1e40c1a8b15345923a29a (diff)
power: Tidy up #undef of CONFIG_DM_PMIC
Add a proper Kconfig option for SPL so we can remove the hack in some of the board config files. This involves adding CONFIG_SPL_DM_PMIC to some of the configs as well as updateing the Makefile rule for PMIC_RK8XX to exclude SPL. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> [trini: Add SPL_PMIC_RK8XX, enable when needed, handle undef of CONFIG_DM_PMIC_PFUZE100 as well] Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/pmic/Kconfig22
-rw-r--r--drivers/power/pmic/Makefile4
2 files changed, 24 insertions, 2 deletions
diff --git a/drivers/power/pmic/Kconfig b/drivers/power/pmic/Kconfig
index fd6648b313e..cf2a9b2c17e 100644
--- a/drivers/power/pmic/Kconfig
+++ b/drivers/power/pmic/Kconfig
@@ -10,6 +10,19 @@ config DM_PMIC
- 'drivers/power/pmic/pmic-uclass.c'
- 'include/power/pmic.h'
+config SPL_DM_PMIC
+ bool "Enable Driver Model for PMIC drivers (UCLASS_PMIC) in SPL"
+ depends on SPL_DM
+ default y if DM_PMIC
+ ---help---
+ This config enables the driver-model PMIC support in SPL.
+ UCLASS_PMIC - designed to provide an I/O interface for PMIC devices.
+ For the multi-function PMIC devices, this can be used as parent I/O
+ device for each IC's interface. Then, each children uses its parent
+ for read/write. For detailed description, please refer to the files:
+ - 'drivers/power/pmic/pmic-uclass.c'
+ - 'include/power/pmic.h'
+
config PMIC_CHILDREN
bool "Allow child devices for PMICs"
depends on DM_PMIC
@@ -205,6 +218,15 @@ config PMIC_RK8XX
accessed via an I2C interface. The device is used with Rockchip SoCs.
This driver implements register read/write operations.
+config SPL_PMIC_RK8XX
+ bool "Enable support for Rockchip PMIC RK8XX"
+ depends on DM_PMIC
+ ---help---
+ The Rockchip RK808 PMIC provides four buck DC-DC convertors, 8 LDOs,
+ an RTC and two low Rds (resistance (drain to source)) switches. It is
+ accessed via an I2C interface. The device is used with Rockchip SoCs.
+ This driver implements register read/write operations.
+
config PMIC_S2MPS11
bool "Enable Driver Model for PMIC Samsung S2MPS11"
depends on DM_PMIC
diff --git a/drivers/power/pmic/Makefile b/drivers/power/pmic/Makefile
index 5d1a97e5f6f..5250eac12f2 100644
--- a/drivers/power/pmic/Makefile
+++ b/drivers/power/pmic/Makefile
@@ -3,7 +3,7 @@
# Copyright (C) 2012 Samsung Electronics
# Lukasz Majewski <l.majewski@samsung.com>
-obj-$(CONFIG_DM_PMIC) += pmic-uclass.o
+obj-$(CONFIG_$(SPL_TPL_)DM_PMIC) += pmic-uclass.o
obj-$(CONFIG_DM_PMIC_FAN53555) += fan53555.o
obj-$(CONFIG_$(SPL_)DM_PMIC_DA9063) += da9063.o
obj-$(CONFIG_DM_PMIC_MAX77686) += max77686.o
@@ -20,7 +20,7 @@ obj-$(CONFIG_PMIC_ACT8846) += act8846.o
obj-$(CONFIG_PMIC_AS3722) += as3722.o as3722_gpio.o
obj-$(CONFIG_PMIC_MAX8997) += max8997.o
obj-$(CONFIG_PMIC_PM8916) += pm8916.o
-obj-$(CONFIG_PMIC_RK8XX) += rk8xx.o
+obj-$(CONFIG_$(SPL_TPL_)PMIC_RK8XX) += rk8xx.o
obj-$(CONFIG_PMIC_RN5T567) += rn5t567.o
obj-$(CONFIG_PMIC_TPS65090) += tps65090.o
obj-$(CONFIG_PMIC_S5M8767) += s5m8767.o