[U-Boot] [PATCH v2 3/6] sunxi: add AXP_PMIC_BUS invisible options for AXP PMICs access

Jagan Teki jagan at openedev.com
Wed Mar 1 10:36:55 UTC 2017


On Sun, Feb 26, 2017 at 5:22 AM, Icenowy Zheng <icenowy at aosc.xyz> wrote:
> For AXP PMICs' drivers some functions are needed to provide I/O access
> for the PMIC.
>
> The source file used to be controlled by different AXPxxx_POWER config
> option.
>
> Control the file's compliation via a generic AXP_PMIC_BUS option, and
> make all AXPxxx_POWER select this option, to prevent furtherly more and
> more AXP PMIC names are added to the Makefile of mach-sunxi.
>
> Signed-off-by: Icenowy Zheng <icenowy at aosc.xyz>
> ---
>  arch/arm/mach-sunxi/Makefile |  6 +-----
>  drivers/power/Kconfig        | 10 ++++++++++
>  2 files changed, 11 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arm/mach-sunxi/Makefile b/arch/arm/mach-sunxi/Makefile
> index a8bf3a6c64..5767f7643f 100644
> --- a/arch/arm/mach-sunxi/Makefile
> +++ b/arch/arm/mach-sunxi/Makefile
> @@ -31,11 +31,7 @@ obj-$(CONFIG_MACH_SUN8I)     += clock_sun6i.o
>  endif
>  obj-$(CONFIG_MACH_SUN9I)       += clock_sun9i.o gtbus_sun9i.o
>
> -obj-$(CONFIG_AXP152_POWER)     += pmic_bus.o
> -obj-$(CONFIG_AXP209_POWER)     += pmic_bus.o
> -obj-$(CONFIG_AXP221_POWER)     += pmic_bus.o
> -obj-$(CONFIG_AXP809_POWER)     += pmic_bus.o
> -obj-$(CONFIG_AXP818_POWER)     += pmic_bus.o
> +obj-$(CONFIG_AXP_PMIC_BUS)     += pmic_bus.o
>
>  ifdef CONFIG_SPL_BUILD
>  obj-$(CONFIG_MACH_SUN4I)       += dram_sun4i.o
> diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig
> index f2c5629be2..442e33ea30 100644
> --- a/drivers/power/Kconfig
> +++ b/drivers/power/Kconfig
> @@ -6,6 +6,11 @@ source "drivers/power/pmic/Kconfig"
>
>  source "drivers/power/regulator/Kconfig"
>
> +config AXP_PMIC_BUS
> +       bool
> +       ---help---
> +       Select this for code providing PMIC access code for AXP PMICs.

No, better to move this pmic driver to drivers/power or if possible
use the existing drivers/power/axp*.c

thanks!
-- 
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.


More information about the U-Boot mailing list