Skip to content

pmic: sandbox: Add support for MC34709 PMIC

Lukasz Majewski u-boot 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest11 patches 0 repliesNew
  2. v211 patches 0 repliesSuperseded
  3. v15 patches 0 repliesSuperseded

Changes in v3 from the cover letter · 17 lines

- None
- None
- Rename dm_pmic_info to uc_pmic_priv
- Rename dm_pmic_info -> uc_pmic_priv
- Replace printf() -> debug()
- Use priv->trans_len instead of tx_num
- Rename dm_pmic_info with uc_pmic_priv
- Sort alphabetically includes
- Add comment regarding MC34708 byte ordering
- Replace dm_pmic_info with uc_pmic_priv
- Replace pmic_info with priv
- Replace pr_err() with debug()
- dm_pmic_info -> uc_pmic_priv
- Fix DTS property style to compy with Device Tree specification as suggested by Fabio.
- Enable MC34708 PMIC support in sandbox_{flattree|spl}_defconfig
- None
- Fix pmic.c test code after adjusting the sandbox PMIC related dts

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11pmic: fsl: Provide some more definitions for MC34708 PMICinclude/fsl_pmic.h+40 -01 reply
2/11pmic: fsl: Define number of bytes sent at once by MC34708 PMICinclude/fsl_pmic.h+1 -00 replies
3/11pmic: Add support for setting transmission length in uclass private datadrivers/power/pmic/pmic-uclass.c include/power/pmic.h+19 -00 replies
4/11pmic: dm: Rewrite pmic_reg_{read|write|clrsetbits} to support 3 bytes transmissionsdrivers/power/pmic/pmic-uclass.c+30 -120 replies
5/11pmic: dm: Add support for MC34708 for PMIC DMdrivers/power/pmic/Kconfig drivers/power/pmic/Makefile drivers/power/pmic/mc34708.c+113 -01 reply
6/11pmic: Rewrite the pmic command to not only work with single byte transmissioncmd/pmic.c+19 -120 replies
7/11sandbox: Rewrite i2c_pmic_emul.c to support PMIC with 3 bytes transmissiondrivers/power/pmic/i2c_pmic_emul.c+31 -140 replies
8/11sandbox: Enable support for MC34708 PMIC in DTSarch/sandbox/dts/sandbox.dts arch/sandbox/dts/sandbox64.dts arch/sandbox/dts/sandbox_pmic.dtsi +1 more+45 -00 replies
9/11sandbox: Enable MC34708 PMIC supportconfigs/sandbox_defconfig configs/sandbox_flattree_defconfig configs/sandbox_spl_defconfig+3 -00 replies
10/11sandbox: tests: Exclude common test code (pmic_get) in test/dm/pmic.ctest/dm/pmic.c+10 -20 replies
11/11sandbox: tests: Add tests for mc34708 PMIC devicetest/dm/pmic.c+56 -00 replies

Reviews trailers per patch

All 11 patches have a Reviewed-by or Acked-by.

PatchSimon Glass
1/11R-b
2/11R-b
3/11R-b
4/11R-b
5/11R-b
6/11R-b
7/11R-b
8/11R-b
9/11R-b
10/11R-b
11/11R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [U-Boot] [PATCH v3 00/11] pmic: sandbox: Add support for MC34709 PMIC

Adding this device required some changes into the PMIC uclass. Most notable one was the support for 3 bytes r/w operations. Moreover, emulation and tests for this device has been added to sandbox.

Travis-CI:
https://travis-ci.org/lmajewski/u-boot-dfu/builds/378678458

Changes in v3:
- None
- None
- Rename dm_pmic_info to uc_pmic_priv
- Rename dm_pmic_info -> uc_pmic_priv
- Replace printf() -> debug()
- Use priv->trans_len instead of tx_num
- Rename dm_pmic_info with uc_pmic_priv
- Sort alphabetically includes
- Add comment regarding MC34708 byte ordering
- Replace dm_pmic_info with uc_pmic_priv
- Replace pmic_info with priv
- Replace pr_err() with debug()
- dm_pmic_info -> uc_pmic_priv
- Fix DTS property style to compy with Device Tree specification as suggested by Fabio.
- Enable MC34708 PMIC support in sandbox_{flattree|spl}_defconfig
- None
- Fix pmic.c test code after adjusting the sandbox PMIC related dts

Changes in v2:
- None
- None
- New patch
- pmic_reg_* fixes to use uclass private structure
- Support for uclass private data with trasfer length
- New patch
- New patch
- New patch
- New patch
- New patch
- New patch

Lukasz Majewski (11):
pmic: fsl: Provide some more definitions for MC34708 PMIC
pmic: fsl: Define number of bytes sent at once by MC34708 PMIC
pmic: Add support for setting transmission length in uclass private
data
pmic: dm: Rewrite pmic_reg_{read|write|clrsetbits} to support 3 bytes
transmissions
pmic: dm: Add support for MC34708 for PMIC DM
pmic: Rewrite the pmic command to not only work with single byte
transmission
sandbox: Rewrite i2c_pmic_emul.c to support PMIC with 3 bytes
transmission
sandbox: Enable support for MC34708 PMIC in DTS
sandbox: Enable MC34708 PMIC support
sandbox: tests: Exclude common test code (pmic_get) in test/dm/pmic.c
sandbox: tests: Add tests for mc34708 PMIC device

 arch/sandbox/dts/sandbox.dts       |   4 ++
 arch/sandbox/dts/sandbox64.dts     |   4 ++
 arch/sandbox/dts/sandbox_pmic.dtsi |  33 ++++++++++++
 arch/sandbox/dts/test.dts          |   4 ++
 cmd/pmic.c                         |  31 ++++++-----
 configs/sandbox_defconfig          |   1 +
 configs/sandbox_flattree_defconfig |   1 +
 configs/sandbox_spl_defconfig      |   1 +
 drivers/power/pmic/Kconfig         |   7 +++
 drivers/power/pmic/Makefile        |   1 +
 drivers/power/pmic/i2c_pmic_emul.c |  45 +++++++++++-----
 drivers/power/pmic/mc34708.c       | 105 +++++++++++++++++++++++++++++++++++++
 drivers/power/pmic/pmic-uclass.c   |  52 +++++++++++++-----
 include/fsl_pmic.h                 |  41 +++++++++++++++
 include/power/pmic.h               |   9 ++++
 test/dm/pmic.c                     |  68 +++++++++++++++++++++++-
 16 files changed, 367 insertions(+), 40 deletions(-)
 create mode 100644 drivers/power/pmic/mc34708.c
Signature · 1 line
2.11.0