Re: [U-Boot] [PATCH 1/7] sunxi: Kconfig-ify CONFIG_AXP152_POWER and _AXP209_POWER

2015-10-09 Thread Ian Campbell
On Sat, 2015-10-03 at 16:26 +0200, Hans de Goede wrote:
> Note that sun5i boards can have either an AXP209 or an AXP152 pmic,

Is it actually xor? I think so given that you later on unify the names
such that they cannot be compiled in at the same time.

If so then...
 
> +config AXP152_POWER
> + boolean "axp152 pmic support"
> + depends on MACH_SUN5I
> + ---help---
> + Say y here to enable support for the axp152 pmic found on
> most A10s
> + boards.
> +
> +config AXP209_POWER
> + boolean "axp209 pmic support"
> + depends on MACH_SUN4I || MACH_SUN5I || MACH_SUN7I
> + default y if MACH_SUN4I || MACH_SUN7I
> + ---help---
> + Say y here to enable support for the axp209 pmic found on
> most
> + A10, A13 and A20 boards.
> +
>  config AXP221_POWER

... these three ought to be inside a choice?

Ian.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/7] sunxi: Kconfig-ify CONFIG_AXP152_POWER and _AXP209_POWER

2015-10-09 Thread Hans de Goede

Hi,

On 09-10-15 08:49, Ian Campbell wrote:

On Sat, 2015-10-03 at 16:26 +0200, Hans de Goede wrote:

Note that sun5i boards can have either an AXP209 or an AXP152 pmic,


Is it actually xor? I think so given that you later on unify the names
such that they cannot be compiled in at the same time.

If so then...


+config AXP152_POWER
+   boolean "axp152 pmic support"
+   depends on MACH_SUN5I
+   ---help---
+   Say y here to enable support for the axp152 pmic found on
most A10s
+   boards.
+
+config AXP209_POWER
+   boolean "axp209 pmic support"
+   depends on MACH_SUN4I || MACH_SUN5I || MACH_SUN7I
+   default y if MACH_SUN4I || MACH_SUN7I
+   ---help---
+   Say y here to enable support for the axp209 pmic found on
most
+   A10, A13 and A20 boards.
+
  config AXP221_POWER


... these three ought to be inside a choice?


I was thinking the same, but on A80 boards there are 2
different axp chips, so if we make this a choice now we
just end up needing to revert this when we get full A80 support.

Regards,

Hans
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 1/7] sunxi: Kconfig-ify CONFIG_AXP152_POWER and _AXP209_POWER

2015-10-03 Thread Hans de Goede
Kconfig-ify CONFIG_AXP152_POWER and _AXP209_POWER settings, removing
them from CONFIG_SYS_EXTRA_OPTIONS.

Note that sun5i boards can have either an AXP209 or an AXP152 pmic, so
there is no default for these in Kconfig, and the board-defconfig must
always select one (except on the rare pmic-less board).

Signed-off-by: Hans de Goede 
---
 configs/A10-OLinuXino-Lime_defconfig   |  2 +-
 configs/A10s-OLinuXino-M_defconfig |  3 ++-
 configs/A13-OLinuXino_defconfig|  3 ++-
 configs/A20-OLinuXino-Lime2_defconfig  |  2 +-
 configs/A20-OLinuXino-Lime_defconfig   |  2 +-
 configs/A20-OLinuXino_MICRO_defconfig  |  2 +-
 configs/A20-Olimex-SOM-EVB_defconfig   |  2 +-
 configs/Ainol_AW1_defconfig|  1 -
 configs/Ampe_A76_defconfig |  3 ++-
 configs/Auxtek-T003_defconfig  |  2 +-
 configs/Auxtek-T004_defconfig  |  2 +-
 configs/Bananapi_defconfig |  2 +-
 configs/Bananapro_defconfig|  2 +-
 configs/Chuwi_V7_CW0825_defconfig  |  1 -
 configs/Cubieboard2_defconfig  |  2 +-
 configs/Cubieboard_defconfig   |  2 +-
 configs/Cubietruck_defconfig   |  2 +-
 configs/Hyundai_A7HD_defconfig |  1 -
 configs/Linksprite_pcDuino3_Nano_defconfig |  2 +-
 configs/Linksprite_pcDuino3_defconfig  |  2 +-
 configs/Linksprite_pcDuino_defconfig   |  2 +-
 configs/MK808C_defconfig   |  1 -
 configs/MSI_Primo73_defconfig  |  1 -
 configs/Mele_A1000_defconfig   |  2 +-
 configs/Mele_M3_defconfig  |  2 +-
 configs/Mini-X_defconfig   |  1 -
 configs/Orangepi_defconfig |  2 +-
 configs/Orangepi_mini_defconfig|  2 +-
 configs/UTOO_P66_defconfig |  2 +-
 configs/Wexler_TAB7200_defconfig   |  1 -
 configs/Wits_Pro_A20_DKT_defconfig |  2 +-
 configs/Wobo_i5_defconfig  |  2 +-
 configs/Yones_Toptech_BD1078_defconfig |  1 -
 configs/ba10_tv_box_defconfig  |  2 +-
 configs/i12-tvbox_defconfig|  2 +-
 configs/iNet_3F_defconfig  |  1 -
 configs/iNet_3W_defconfig  |  1 -
 configs/iNet_86VS_defconfig|  2 +-
 configs/inet1_defconfig|  1 -
 configs/inet97fv2_defconfig|  1 -
 configs/inet98v_rev2_defconfig |  3 ++-
 configs/inet9f_rev03_defconfig |  1 -
 configs/jesurun_q5_defconfig   |  2 +-
 configs/mk802_a10s_defconfig   |  2 +-
 configs/mk802_defconfig|  1 +
 configs/mk802ii_defconfig  |  1 -
 configs/pov_protab2_ips9_defconfig |  1 -
 configs/q8_a13_tablet_defconfig|  3 ++-
 configs/r7-tv-dongle_defconfig |  2 +-
 configs/sunxi_Gemei_G9_defconfig   |  1 -
 drivers/power/Kconfig  | 15 +++
 51 files changed, 54 insertions(+), 49 deletions(-)

diff --git a/configs/A10-OLinuXino-Lime_defconfig 
b/configs/A10-OLinuXino-Lime_defconfig
index f4ff7c5..b22fdb3 100644
--- a/configs/A10-OLinuXino-Lime_defconfig
+++ b/configs/A10-OLinuXino-Lime_defconfig
@@ -8,7 +8,7 @@ CONFIG_MMC0_CD_PIN="PH1"
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-olinuxino-lime"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_EMAC,AHCI,SATAPWR=SUNXI_GPC(3)"
+CONFIG_SYS_EXTRA_OPTIONS="SUNXI_EMAC,AHCI,SATAPWR=SUNXI_GPC(3)"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
diff --git a/configs/A10s-OLinuXino-M_defconfig 
b/configs/A10s-OLinuXino-M_defconfig
index 7783c7d..d9add78 100644
--- a/configs/A10s-OLinuXino-M_defconfig
+++ b/configs/A10s-OLinuXino-M_defconfig
@@ -9,8 +9,9 @@ CONFIG_USB1_VBUS_PIN="PB10"
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-a10s-olinuxino-micro"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_SYS_EXTRA_OPTIONS="AXP152_POWER,SUNXI_EMAC"
+CONFIG_SYS_EXTRA_OPTIONS="SUNXI_EMAC"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
 CONFIG_USB_EHCI_HCD=y
+CONFIG_AXP152_POWER=y
diff --git a/configs/A13-OLinuXino_defconfig b/configs/A13-OLinuXino_defconfig
index 0645716..2edc0d2 100644
--- a/configs/A13-OLinuXino_defconfig
+++ b/configs/A13-OLinuXino_defconfig
@@ -14,9 +14,10 @@ CONFIG_VIDEO_LCD_BL_PWM="PB2"
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-olinuxino"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
-CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=2,AXP209_POWER"
+CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=2"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
 CONFIG_USB_EHCI_HCD=y
 CONFIG_NAND_SUNXI=y
+CONFIG_AXP209_POWER=y
diff --git a/configs/A20-OLinuXino-Lime2_defconfig 
b/configs/A20-OLinuXino-Lime2_defconfig
index c9d0f47..678132c 100644
---