PMIC framework has been redesigned to support multiple instances of power related devices (e.g. fuel gauge, PMICs, chargers, micro USB IC).
Due to that, code at other architectures and boards have been adjusted properly. New power_board_init() method at ./lib/board.c file has been introduced. It is meant to be an architecture dependent function to support advanced power management. Since PMIC framework uses lists internally to link different devices, its initialization must be done just after malloc initialization. Please consider commits from this patch set as the example of advanced power management for a particular HW (Trats board in this case). In the new approach PMICs are selected with their names (e.g. 'pmic dump MAX8997_PMIC') Presented patch set is a first step to change 'pmic' command to more generic (i.e. power) to provide control for multiple devices. Dependencies: 1. gpio:fix: Proper handling of GPIO subsystem parts at Samsung devices http://patchwork.ozlabs.org/patch/181768/ 2. i2c:soft:multi: Support for multiple soft I2C buses at Samsung boards http://patchwork.ozlabs.org/patch/181789/ 3. i2c:soft:multi: Enable soft I2C multibus at Trats development board http://patchwork.ozlabs.org/patch/181788/ Test HW: - Exynos4210 Trats development board Lukasz Majewski (16): pmic:i2c: Handle PMIC I2C transmission comprising of two bytes pmic:i2c: Add I2C byte order to PMIC framework pmic:max8997: Switch the MAX8997 PMIC to be used with multibus I2C pmic: Extend PMIC framework to support multiple instances of PMIC devices pmic: Introduce power_board_init() method at ./lib/board.c file pmic: Enable power_board_init() support at TRATS pmic:chrg: Common information about charger and battery (power_chrg.h) pmic:muic: Support for MUIC built into MAX8997 device pmic:fuel-gauge: Support for MAX17042 fuel-gauge pmic:max8997: Function for calculating LDO internal register value arm:trats:pmic: Default PMIC(MAX8997) initialization for Samsung's TRATS board arm:trats:pmic: Enable MUIC (MAX8997) at Samsung's TRATS board arm:trats:pmic: Enable fuel-gauge (MAX17042) at Samsung's TRATS board pmic:max8997: Support for MAX8997 internal charger control arm:trats:pmic: Support for charging battery at Samsung's TRATS board arm:trats:pmic: Power consumption reduction state for Samsung's TRATS board arch/arm/lib/board.c | 4 + board/davedenx/qong/qong.c | 6 +- board/freescale/mx31pdk/mx31pdk.c | 6 +- board/freescale/mx35pdk/mx35pdk.c | 8 +- board/freescale/mx51evk/mx51evk.c | 6 +- board/freescale/mx53evk/mx53evk.c | 6 +- board/freescale/mx53loco/mx53loco.c | 10 +- board/hale/tt01/tt01.c | 6 +- board/samsung/goni/goni.c | 9 +- board/samsung/trats/trats.c | 259 ++++++++++++++++++++++++++++- board/samsung/universal_c210/universal.c | 10 +- board/ttcontrol/vision2/vision2.c | 6 +- drivers/misc/Makefile | 2 + drivers/misc/fg_max17042.c | 235 +++++++++++++++++++++++++++ drivers/misc/muic_max8997.c | 80 +++++++++ drivers/misc/pmic_core.c | 108 +++++++++---- drivers/misc/pmic_dialog.c | 8 +- drivers/misc/pmic_fsl.c | 8 +- drivers/misc/pmic_i2c.c | 40 ++++- drivers/misc/pmic_max8997.c | 80 +++++++++- drivers/misc/pmic_max8998.c | 10 +- drivers/misc/pmic_spi.c | 4 +- drivers/rtc/mc13xxx-rtc.c | 6 +- include/common.h | 3 + include/configs/trats.h | 7 + include/power/fg_battery_cell_params.h | 88 ++++++++++ include/power/max17042_fg.h | 74 +++++++++ include/power/max8997_muic.h | 61 +++++++ include/{ => power}/max8997_pmic.h | 27 +++- include/{ => power}/max8998_pmic.h | 0 include/{ => power}/pmic.h | 20 ++- include/power/power_chrg.h | 56 +++++++ 32 files changed, 1143 insertions(+), 110 deletions(-) create mode 100644 drivers/misc/fg_max17042.c create mode 100644 drivers/misc/muic_max8997.c create mode 100644 include/power/fg_battery_cell_params.h create mode 100644 include/power/max17042_fg.h create mode 100644 include/power/max8997_muic.h rename include/{ => power}/max8997_pmic.h (87%) rename include/{ => power}/max8998_pmic.h (100%) rename include/{ => power}/pmic.h (80%) create mode 100644 include/power/power_chrg.h -- 1.7.2.3 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot