All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2 00/21] pmic: Redesign PMIC framework to support multiple instances of devices
@ 2012-10-05  8:16 Lukasz Majewski
  2012-10-05  8:16 ` [U-Boot] [PATCH v2 01/21] pmic:i2c: Handle PMIC I2C transmission comprising of two bytes Lukasz Majewski
                   ` (20 more replies)
  0 siblings, 21 replies; 39+ messages in thread
From: Lukasz Majewski @ 2012-10-05  8:16 UTC (permalink / raw)
  To: u-boot

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_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.

Moreover device's battery is treated as an oridinary "power" device (like PMIC). Due to
that, framework unification is possible.


Dependencies:
1. gpio:fix: Proper handling of GPIO subsystem parts at Samsung devices
http://patchwork.ozlabs.org/patch/181768/

Test HW:
 - Exynos4210 Trats development board


Lukasz Majewski (21):
  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: 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

 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                        |  249 +++++++++++++++++++-
 board/samsung/universal_c210/universal.c           |   10 +-
 board/ttcontrol/vision2/vision2.c                  |    6 +-
 drivers/misc/Makefile                              |    7 -
 drivers/misc/pmic_core.c                           |  147 ------------
 drivers/power/Makefile                             |   11 +
 drivers/power/battery/bat_trats.c                  |   79 ++++++
 drivers/power/max17042/fg_max17042.c               |  251 ++++++++++++++++++++
 drivers/power/max8997/muic_max8997.c               |   91 +++++++
 drivers/power/max8997/pmic_max8997.c               |  124 ++++++++++
 drivers/{misc => power/max8998}/pmic_max8998.c     |   10 +-
 drivers/power/pmic_core.c                          |  230 ++++++++++++++++++
 drivers/{misc => power}/pmic_dialog.c              |    8 +-
 drivers/{misc => power}/pmic_fsl.c                 |    8 +-
 drivers/{misc => power}/pmic_i2c.c                 |   40 +++-
 drivers/{misc => power}/pmic_spi.c                 |    4 +-
 drivers/rtc/mc13xxx-rtc.c                          |    6 +-
 include/common.h                                   |    3 +
 include/configs/trats.h                            |    7 +
 include/pmic.h                                     |   72 ------
 .../misc/pmic_max8997.c => include/power/battery.h |   29 +--
 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                               |  102 ++++++++
 .../pmic_max8997.c => include/power/power_chrg.h   |   34 ++--
 37 files changed, 1508 insertions(+), 332 deletions(-)
 delete mode 100644 drivers/misc/pmic_core.c
 create mode 100644 drivers/power/battery/bat_trats.c
 create mode 100644 drivers/power/max17042/fg_max17042.c
 create mode 100644 drivers/power/max8997/muic_max8997.c
 create mode 100644 drivers/power/max8997/pmic_max8997.c
 rename drivers/{misc => power/max8998}/pmic_max8998.c (89%)
 create mode 100644 drivers/power/pmic_core.c
 rename drivers/{misc => power}/pmic_dialog.c (89%)
 rename drivers/{misc => power}/pmic_fsl.c (94%)
 rename drivers/{misc => power}/pmic_i2c.c (70%)
 rename drivers/{misc => power}/pmic_spi.c (97%)
 delete mode 100644 include/pmic.h
 copy drivers/misc/pmic_max8997.c => include/power/battery.h (71%)
 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
 rename drivers/misc/pmic_max8997.c => include/power/power_chrg.h (71%)

-- 
1.7.2.3

^ permalink raw reply	[flat|nested] 39+ messages in thread

end of thread, other threads:[~2012-10-18 16:09 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-05  8:16 [U-Boot] [PATCH v2 00/21] pmic: Redesign PMIC framework to support multiple instances of devices Lukasz Majewski
2012-10-05  8:16 ` [U-Boot] [PATCH v2 01/21] pmic:i2c: Handle PMIC I2C transmission comprising of two bytes Lukasz Majewski
2012-10-05  8:16 ` [U-Boot] [PATCH v2 02/21] pmic:i2c: Add I2C byte order to PMIC framework Lukasz Majewski
2012-10-09  8:36   ` Stefano Babic
2012-10-09  9:52     ` Lukasz Majewski
2012-10-09 11:02       ` Stefano Babic
2012-10-05  8:16 ` [U-Boot] [PATCH v2 03/21] pmic:max8997: Switch the MAX8997 PMIC to be used with multibus I2C Lukasz Majewski
2012-10-05  8:16 ` [U-Boot] [PATCH v2 04/21] pmic: Extend PMIC framework to support multiple instances of PMIC devices Lukasz Majewski
2012-10-05  8:16 ` [U-Boot] [PATCH v2 05/21] pmic: Introduce power_board_init() method at ./lib/board.c file Lukasz Majewski
2012-10-09  8:54   ` Stefano Babic
2012-10-09 10:25     ` Lukasz Majewski
2012-10-09 11:34       ` Stefano Babic
2012-10-09 18:05         ` Tom Rini
2012-10-10  6:24           ` Lukasz Majewski
2012-10-05  8:16 ` [U-Boot] [PATCH v2 06/21] pmic: Enable power_board_init() support at TRATS Lukasz Majewski
2012-10-09  8:56   ` Stefano Babic
2012-10-09 10:30     ` Lukasz Majewski
2012-10-09 11:37       ` Stefano Babic
2012-10-09 12:06         ` Lukasz Majewski
2012-10-05  8:16 ` [U-Boot] [PATCH v2 07/21] pmic:chrg: Common information about charger and battery (power_chrg.h) Lukasz Majewski
2012-10-05  8:16 ` [U-Boot] [PATCH v2 08/21] pmic: Move pmic related code to ./drivers/power directory Lukasz Majewski
2012-10-09  8:58   ` Stefano Babic
2012-10-09 10:37     ` Lukasz Majewski
2012-10-05  8:16 ` [U-Boot] [PATCH v2 09/21] pmic: Extend struct pmic to support battery and charger related operations Lukasz Majewski
2012-10-11  7:52   ` Stefano Babic
2012-10-12  7:54     ` Lukasz Majewski
2012-10-18 16:09     ` [U-Boot] [PATCH v2 09/21] pmic: Extend struct pmic to support battery and charger related operations [explanation] Lukasz Majewski
2012-10-05  8:16 ` [U-Boot] [PATCH v2 10/21] pmic:battery: Support for Trats Battery at PMIC framework Lukasz Majewski
2012-10-05  8:16 ` [U-Boot] [PATCH v2 11/21] pmic:muic: Support for MUIC built into MAX8997 device Lukasz Majewski
2012-10-05  8:16 ` [U-Boot] [PATCH v2 12/21] pmic:fuel-gauge: Support for MAX17042 fuel-gauge Lukasz Majewski
2012-10-05  8:16 ` [U-Boot] [PATCH v2 13/21] pmic:max8997: Function for calculating LDO internal register value Lukasz Majewski
2012-10-05  8:16 ` [U-Boot] [PATCH v2 14/21] arm:trats:pmic: Default PMIC(MAX8997) initialization for Samsung's TRATS board Lukasz Majewski
2012-10-05  8:16 ` [U-Boot] [PATCH v2 15/21] arm:trats:pmic: Enable MUIC (MAX8997) at " Lukasz Majewski
2012-10-05  8:16 ` [U-Boot] [PATCH v2 16/21] arm:trats:pmic: Enable fuel-gauge (MAX17042) " Lukasz Majewski
2012-10-05  8:16 ` [U-Boot] [PATCH v2 17/21] arm:trats:pmic: Enable battery support " Lukasz Majewski
2012-10-05  8:16 ` [U-Boot] [PATCH v2 18/21] pmic:max8997: Support for MAX8997 internal charger control Lukasz Majewski
2012-10-05  8:16 ` [U-Boot] [PATCH v2 19/21] arm:trats:pmic: Power consumption reduction state for Samsung's TRATS board Lukasz Majewski
2012-10-05  8:16 ` [U-Boot] [PATCH v2 20/21] arm:trats:pmic: Support for charging battery at " Lukasz Majewski
2012-10-05  8:16 ` [U-Boot] [PATCH v2 21/21] pmic: Extend PMIC framework to support battery related commands Lukasz Majewski

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.