From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 00/24] pmic: Redesign PMIC framework to support multiple instances of devices
Date: Wed, 31 Oct 2012 07:38:34 +0100 [thread overview]
Message-ID: <5090C76A.80904@denx.de> (raw)
In-Reply-To: <1351616239-21079-1-git-send-email-l.majewski@samsung.com>
On 30/10/2012 17:56, Lukasz Majewski wrote:
> PMIC framework has been redesigned to support multiple instances of power related devices
> (e.g. fuel gauge, PMICs, chargers, micro USB IC, battery).
>
> Due to that, code at other architectures and boards have been adjusted properly.
>
> New power_init_board() 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.
>
> Moreover device's battery is treated as an oridinary "power" device (like PMIC). Due to
> that, framework unification is possible.
> For even more versalite design, each power device instance can specify its parent.
>
> For trats one can build a following scheme (it can de different for other boards):
> -----------------
> --------| BAT |------------
> | | | |
> | ----------------- |
> | | |
> \|/ \|/ \|/
> ----------- ----------------- ---------
> |FG | |MUIC | |CHRG |
> | | | | | |
> ----------- ----------------- ---------
>
> Finally, this patch series also comprises of a "namespace" cleanup - an attempt to rename
> "pmic" to "power" to better reflect generality of this framework.
>
>
>
> Test HW:
> - Exynos4210 Trats development board
>
>
> Lukasz Majewski (24):
> pmic:i2c: Handle PMIC I2C transmission comprising of two bytes
> pmic:i2c: Add I2C sensor byte order (big/little) 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_init_board() 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: Move pmic related code to ./drivers/power directory
> pmic: Extend struct pmic to support battery and charger related
> operations
> pmic:battery: Support for Trats Battery at PMIC framework
> 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
> arm:trats:pmic: Enable battery support at Samsung's TRATS board
> pmic:max8997: Support for MAX8997 internal charger control
> arm:trats:pmic: Power consumption reduction state for Samsung's TRATS
> board
> arm:trats:pmic: Support for charging battery at Samsung's TRATS board
> pmic: Extend PMIC framework to support battery related commands
> power:pmic: Rename ./drivers/power/pmic_* to ./drivers/power/power_*
> files
> power:pmic: Rename CONFIG_PMIC* defines to CONFIG_POWER
> power:pmic: Rename CONFIG_DIALOG_PMIC defines to CONFIG_DIALOG_POWER
>
> Makefile | 5 +-
> arch/arm/lib/board.c | 8 +
> 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 | 11 +-
> board/samsung/trats/trats.c | 247 +++++++++++++++++++-
> board/samsung/universal_c210/universal.c | 12 +-
> board/ttcontrol/vision2/vision2.c | 6 +-
> drivers/misc/Makefile | 7 -
> drivers/misc/pmic_core.c | 147 ------------
> drivers/misc/pmic_i2c.c | 98 --------
> drivers/misc/pmic_max8997.c | 43 ----
> drivers/power/Makefile | 12 +-
> drivers/power/battery/Makefile | 47 ++++
> drivers/power/battery/bat_trats.c | 94 ++++++++
> drivers/power/fuel_gauge/Makefile | 47 ++++
> drivers/power/fuel_gauge/fg_max17042.c | 244 +++++++++++++++++++
> drivers/power/pmic/Makefile | 49 ++++
> drivers/power/pmic/muic_max8997.c | 84 +++++++
> drivers/power/pmic/pmic_max8997.c | 117 +++++++++
> drivers/{misc => power/pmic}/pmic_max8998.c | 10 +-
> drivers/power/power_core.c | 230 ++++++++++++++++++
> .../{misc/pmic_dialog.c => power/power_dialog.c} | 8 +-
> drivers/{misc/pmic_fsl.c => power/power_fsl.c} | 16 +-
> drivers/power/power_i2c.c | 125 ++++++++++
> drivers/{misc/pmic_spi.c => power/power_spi.c} | 4 +-
> drivers/rtc/mc13xxx-rtc.c | 6 +-
> include/configs/imx31_litekit.h | 6 +-
> include/configs/mx31ads.h | 6 +-
> include/configs/mx31pdk.h | 6 +-
> include/configs/mx35pdk.h | 6 +-
> include/configs/mx51_efikamx.h | 6 +-
> include/configs/mx51evk.h | 6 +-
> include/configs/mx53evk.h | 6 +-
> include/configs/mx53loco.h | 8 +-
> include/configs/qong.h | 6 +-
> include/configs/s5p_goni.h | 6 +-
> include/configs/s5pc210_universal.h | 6 +-
> include/configs/trats.h | 14 +-
> include/configs/tt01.h | 6 +-
> include/configs/vision2.h | 6 +-
> include/pmic.h | 72 ------
> include/power/battery.h | 38 +++
> include/power/fg_battery_cell_params.h | 90 +++++++
> include/power/max17042_fg.h | 74 ++++++
> include/power/max8997_muic.h | 61 +++++
> include/{ => power}/max8997_pmic.h | 26 ++-
> include/{ => power}/max8998_pmic.h | 0
> include/power/pmic.h | 109 +++++++++
> include/power/power_chrg.h | 43 ++++
> 55 files changed, 1847 insertions(+), 485 deletions(-)
> delete mode 100644 drivers/misc/pmic_core.c
> delete mode 100644 drivers/misc/pmic_i2c.c
> delete mode 100644 drivers/misc/pmic_max8997.c
> create mode 100644 drivers/power/battery/Makefile
> create mode 100644 drivers/power/battery/bat_trats.c
> create mode 100644 drivers/power/fuel_gauge/Makefile
> create mode 100644 drivers/power/fuel_gauge/fg_max17042.c
> create mode 100644 drivers/power/pmic/Makefile
> create mode 100644 drivers/power/pmic/muic_max8997.c
> create mode 100644 drivers/power/pmic/pmic_max8997.c
> rename drivers/{misc => power/pmic}/pmic_max8998.c (89%)
> create mode 100644 drivers/power/power_core.c
> rename drivers/{misc/pmic_dialog.c => power/power_dialog.c} (89%)
> rename drivers/{misc/pmic_fsl.c => power/power_fsl.c} (86%)
> create mode 100644 drivers/power/power_i2c.c
> rename drivers/{misc/pmic_spi.c => power/power_spi.c} (97%)
> delete mode 100644 include/pmic.h
> create mode 100644 include/power/battery.h
> 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 (88%)
> rename include/{ => power}/max8998_pmic.h (100%)
> create mode 100644 include/power/pmic.h
> create mode 100644 include/power/power_chrg.h
>
I reviewed V3, nice works !
Acked-by: Stefano Babic <sbabic@denx.de>
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
next prev parent reply other threads:[~2012-10-31 6:38 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-30 16:56 [U-Boot] [PATCH v4 00/24] pmic: Redesign PMIC framework to support multiple instances of devices Lukasz Majewski
2012-10-30 16:56 ` [U-Boot] [PATCH v4 01/24] pmic:i2c: Handle PMIC I2C transmission comprising of two bytes Lukasz Majewski
2012-10-31 6:33 ` Stefano Babic
2012-10-30 16:56 ` [U-Boot] [PATCH v4 02/24] pmic:i2c: Add I2C sensor byte order (big/little) to PMIC framework Lukasz Majewski
2012-10-30 16:56 ` [U-Boot] [PATCH v4 03/24] pmic:max8997: Switch the MAX8997 PMIC to be used with multibus I2C Lukasz Majewski
2012-10-30 16:56 ` [U-Boot] [PATCH v4 04/24] pmic: Extend PMIC framework to support multiple instances of PMIC devices Lukasz Majewski
2012-10-30 16:57 ` [U-Boot] [PATCH v4 05/24] pmic: Introduce power_init_board() method at ./lib/board.c file Lukasz Majewski
2012-10-30 16:57 ` [U-Boot] [PATCH v4 06/24] pmic: Enable power_board_init() support at TRATS Lukasz Majewski
2012-10-30 16:57 ` [U-Boot] [PATCH v4 07/24] pmic:chrg: Common information about charger and battery (power_chrg.h) Lukasz Majewski
2012-10-30 16:57 ` [U-Boot] [PATCH v4 08/24] pmic: Move pmic related code to ./drivers/power directory Lukasz Majewski
2012-10-30 20:02 ` Tom Rini
2012-10-30 22:59 ` Lukasz Majewski
2012-10-30 23:41 ` Tom Rini
2012-10-30 16:57 ` [U-Boot] [PATCH v4 09/24] pmic: Extend struct pmic to support battery and charger related operations Lukasz Majewski
2012-10-30 16:57 ` [U-Boot] [PATCH v4 10/24] pmic:battery: Support for Trats Battery at PMIC framework Lukasz Majewski
2012-10-30 16:57 ` [U-Boot] [PATCH v4 11/24] pmic:muic: Support for MUIC built into MAX8997 device Lukasz Majewski
2012-10-30 16:57 ` [U-Boot] [PATCH v4 12/24] pmic:fuel-gauge: Support for MAX17042 fuel-gauge Lukasz Majewski
2012-10-30 16:57 ` [U-Boot] [PATCH v4 13/24] pmic:max8997: Function for calculating LDO internal register value Lukasz Majewski
2012-10-30 16:57 ` [U-Boot] [PATCH v4 14/24] arm:trats:pmic: Default PMIC(MAX8997) initialization for Samsung's TRATS board Lukasz Majewski
2012-10-30 16:57 ` [U-Boot] [PATCH v4 15/24] arm:trats:pmic: Enable MUIC (MAX8997) at " Lukasz Majewski
2012-10-30 16:57 ` [U-Boot] [PATCH v4 16/24] arm:trats:pmic: Enable fuel-gauge (MAX17042) " Lukasz Majewski
2012-10-30 16:57 ` [U-Boot] [PATCH v4 17/24] arm:trats:pmic: Enable battery support " Lukasz Majewski
2012-10-30 16:57 ` [U-Boot] [PATCH v4 18/24] pmic:max8997: Support for MAX8997 internal charger control Lukasz Majewski
2012-10-30 16:57 ` [U-Boot] [PATCH v4 19/24] arm:trats:pmic: Power consumption reduction state for Samsung's TRATS board Lukasz Majewski
2012-10-30 16:57 ` [U-Boot] [PATCH v4 20/24] arm:trats:pmic: Support for charging battery at " Lukasz Majewski
2012-10-30 16:57 ` [U-Boot] [PATCH v4 21/24] pmic: Extend PMIC framework to support battery related commands Lukasz Majewski
2012-10-30 16:57 ` [U-Boot] [PATCH v4 22/24] power:pmic: Rename ./drivers/power/pmic_* to ./drivers/power/power_* files Lukasz Majewski
2012-10-30 16:57 ` [U-Boot] [PATCH v4 23/24] power:pmic: Rename CONFIG_PMIC* defines to CONFIG_POWER Lukasz Majewski
2012-10-30 16:57 ` [U-Boot] [PATCH v4 24/24] power:pmic: Rename CONFIG_DIALOG_PMIC defines to CONFIG_DIALOG_POWER Lukasz Majewski
2012-10-31 6:38 ` Stefano Babic [this message]
2012-10-31 9:43 ` [U-Boot] [PATCH v4 00/24] pmic: Redesign PMIC framework to support multiple instances of devices Lukasz Majewski
2012-11-03 22:57 ` Tom Rini
2012-11-05 7:34 ` Lukasz Majewski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5090C76A.80904@denx.de \
--to=sbabic@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.