[U-Boot] [PATCH 00/12] PMIC/REGULATOR cleanup and Sandbox tests
Przemyslaw Marczak
p.marczak at samsung.com
Mon May 11 09:38:18 CEST 2015
Hello Simon,
On 05/10/2015 03:56 PM, Simon Glass wrote:
> Hi Przemyslaw,
>
> On 8 May 2015 at 10:20, Przemyslaw Marczak <p.marczak at samsung.com> wrote:
>> Hello!
>> This patchset cleanups the POWER framework V4, which is applied into
>> u-boot-dm/next tree.
>>
>> The main changes:
>> - pmic/regulator uclasses cleanup - each commit message describes
>> the changes in details.
>> - added sandbox PMIC emulated device support, which consists of three
>> drivers: pmic I2C emul, pmic I/O and regulator.
>> - PMIC/REGULATOR tests for sandbox in: tests/dm/power.c
>>
>> I tried to add the implementation of all pmic/regulator operations for the
>> sandbox PMIC device - I hope that the drivers are not too complicated.
>>
>> The tests for sandbox includes every pmic/regulator function call, so for now
>> the tests should well cover the framework features.
>>
>> The patchset is rebased on the top of u-boot-dm/next, and can be fetched from
>> here: https://github.com/bobenstein/u-boot.git
>> branch: dm-pmic-v4-sandbox
>>
>> Best regards,
>> Przemyslaw Marczak
>
> This looks great, thank you. I pushed the current state to u-boot-dm/working.
>
> I have a small bisectability problem though:
>
> buildman -b dm-next samsung -se
> boards.cfg is up to date. Nothing to do.
> Summary of 29 commits for 16 boards (16 threads, 2 jobs per thread)
> 01: dm: sf: Update default name of spi flash in structure udevice
> 02: exynos5: fix build break by adding CONFIG_POWER
> 03: exynos4-common: remove the unsued CONFIG_CMD_PMIC
> 04: lib: Kconfig: add entry for errno_str() function
> 05: dm: pmic: add implementation of driver model pmic uclass
> 06: dm: regulator: add implementation of driver model regulator uclass
> 07: dm: pmic: add pmic command
> 08: dm: regulator: add regulator command
> 09: pmic: max77686 set the same compatible as in the kernel
> 10: dm: pmic: add max77686 pmic driver
> 11: dm: regulator: add max77686 regulator driver
> 12: dm: regulator: add fixed voltage regulator driver
> 13: doc: driver-model: pmic and regulator uclass documentation
> 14: dm: board:samsung: power_init_board: add requirement of CONFIG_DM_PMIC
> 15: odroid: board: add support to dm pmic api
> arm: + odroid
> +board/samsung/odroid/built-in.o: In function `s5pc210_phy_control':
> +build/../board/samsung/odroid/odroid.c:444: undefined reference to
> `regulator_by_platname'
> +build/../board/samsung/odroid/odroid.c:453: undefined reference to
> `regulator_set_mode'
> +board/samsung/odroid/built-in.o: In function `exynos_power_init':
> +build/../board/samsung/odroid/odroid.c:432: undefined reference to
> `regulator_by_platname_list_autoset_and_enable'
> +board/samsung/odroid/built-in.o: In function `board_usb_init':
> +build/../board/samsung/odroid/odroid.c:490: undefined reference to
> `regulator_by_platname'
> +build/../board/samsung/odroid/odroid.c:496: undefined reference to
> `regulator_set_enable'
> +build/../board/samsung/odroid/odroid.c:502: undefined reference to
> `regulator_set_value'
> +build/../board/samsung/odroid/odroid.c:508: undefined reference to
> `regulator_set_value'
> +arm-linux-gnueabihf-ld.bfd: BFD (crosstool-NG
> linaro-1.13.1-4.7-2013.04-20130415 - Linaro GCC 2013.04) 2.23.1
> assertion fail /cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/.build/src/binutils-2.23.1/bfd/elf32-arm.c:7677
> +arm-linux-gnueabihf-ld.bfd: error: required section '.rel.plt' not
> found in the linker script
> +arm-linux-gnueabihf-ld.bfd: final link failed: Invalid operation
> +make[1]: *** [u-boot] Error 1
> +make: *** [sub-make] Error 2
> 16: odroid: dts: add 'voltage-regulators' description to max77686 node
> 17: odroid: config: enable dm pmic, dm regulator and max77686 driver
> arm: odroid
> -board/samsung/odroid/built-in.o: In function `s5pc210_phy_control':
> -build/../board/samsung/odroid/odroid.c:444: undefined reference to
> `regulator_by_platname'
> -build/../board/samsung/odroid/odroid.c:453: undefined reference to
> `regulator_set_mode'
> -board/samsung/odroid/built-in.o: In function `exynos_power_init':
> -build/../board/samsung/odroid/odroid.c:432: undefined reference to
> `regulator_by_platname_list_autoset_and_enable'
> -board/samsung/odroid/built-in.o: In function `board_usb_init':
> -build/../board/samsung/odroid/odroid.c:490: undefined reference to
> `regulator_by_platname'
> -build/../board/samsung/odroid/odroid.c:496: undefined reference to
> `regulator_set_enable'
> -build/../board/samsung/odroid/odroid.c:502: undefined reference to
> `regulator_set_value'
> -build/../board/samsung/odroid/odroid.c:508: undefined reference to
> `regulator_set_value'
> -arm-linux-gnueabihf-ld.bfd: BFD (crosstool-NG
> linaro-1.13.1-4.7-2013.04-20130415 - Linaro GCC 2013.04) 2.23.1
> assertion fail /cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/.build/src/binutils-2.23.1/bfd/elf32-arm.c:7677
> -arm-linux-gnueabihf-ld.bfd: error: required section '.rel.plt' not
> found in the linker script
> -arm-linux-gnueabihf-ld.bfd: final link failed: Invalid operation
> -make[1]: *** [u-boot] Error 1
> -make: *** [sub-make] Error 2
> 18: dm: pmic: code cleanup of PMIC uclass driver
> arm: + odroid
> +../drivers/power/pmic/max77686.c: At top level:
> +drivers/power/pmic/built-in.o: In function `max77686_bind':
> +build/../drivers/power/pmic/max77686.c:62: undefined reference to
> `pmic_bind_childs'
> +arm-linux-gnueabihf-ld.bfd: BFD (crosstool-NG
> linaro-1.13.1-4.7-2013.04-20130415 - Linaro GCC 2013.04) 2.23.1
> assertion fail /cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/.build/src/binutils-2.23.1/bfd/elf32-arm.c:7677
> +arm-linux-gnueabihf-ld.bfd: error: required section '.rel.plt' not
> found in the linker script
> +arm-linux-gnueabihf-ld.bfd: final link failed: Invalid operation
> +make[1]: *** [u-boot] Error 1
> +make: *** [sub-make] Error 2
> w+../drivers/power/pmic/max77686.c: In function ‘max77686_bind’:
> w+../drivers/power/pmic/max77686.c:62:2: warning: implicit declaration
> of function ‘pmic_bind_childs’ [-Wimplicit-function-declaration]
> w+../drivers/power/pmic/max77686.c:71:2: warning: initialization makes
> pointer from integer without a cast [enabled by default]
> w+../drivers/power/pmic/max77686.c:71:2: warning: (near initialization
> for ‘max77686_ops.reg_count’) [enabled by default]
> 19: dm: pmic: max77686: update driver code
> arm: odroid
> -../drivers/power/pmic/max77686.c: At top level:
> -drivers/power/pmic/built-in.o: In function `max77686_bind':
> -build/../drivers/power/pmic/max77686.c:62: undefined reference to
> `pmic_bind_childs'
> -arm-linux-gnueabihf-ld.bfd: BFD (crosstool-NG
> linaro-1.13.1-4.7-2013.04-20130415 - Linaro GCC 2013.04) 2.23.1
> assertion fail /cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/.build/src/binutils-2.23.1/bfd/elf32-arm.c:7677
> -arm-linux-gnueabihf-ld.bfd: error: required section '.rel.plt' not
> found in the linker script
> -arm-linux-gnueabihf-ld.bfd: final link failed: Invalid operation
> -make[1]: *** [u-boot] Error 1
> -make: *** [sub-make] Error 2
> w-../drivers/power/pmic/max77686.c: In function ‘max77686_bind’:
> w-../drivers/power/pmic/max77686.c:62:2: warning: implicit declaration
> of function ‘pmic_bind_childs’ [-Wimplicit-function-declaration]
> w-../drivers/power/pmic/max77686.c:71:2: warning: initialization makes
> pointer from integer without a cast [enabled by default]
> w-../drivers/power/pmic/max77686.c:71:2: warning: (near initialization
> for ‘max77686_ops.reg_count’) [enabled by default]
> 20: dm: regulator: uclass driver code cleanup
> arm: + odroid
> +In file included from ../board/samsung/odroid/odroid.c:17:0:
> +../include/power/regulator.h:356:5: note: expected ‘struct udevice
> **’ but argument is of type ‘int’
> +../board/samsung/odroid/odroid.c:432:2: error: too many arguments to
> function ‘regulator_list_autoset’
> +../include/power/regulator.h:356:5: note: declared here
> +make[2]: *** [board/samsung/odroid/odroid.o] Error 1
> +make[1]: *** [board/samsung/odroid] Error 2
> +make: *** [sub-make] Error 2
> w+../board/samsung/odroid/odroid.c: In function ‘exynos_power_init’:
> w+../board/samsung/odroid/odroid.c:432:2: warning: passing argument 2
> of ‘regulator_list_autoset’ makes pointer from integer without a cast
> [enabled by default]
> w+../board/samsung/odroid/odroid.c: In function ‘s5pc210_phy_control’:
> w+../board/samsung/odroid/odroid.c:444:2: warning: implicit
> declaration of function ‘regulator_by_platname’
> [-Wimplicit-function-declaration]
> 21: odroid u3: cleanup the regulator calls
> arm: odroid
> -In file included from ../board/samsung/odroid/odroid.c:17:0:
> -../include/power/regulator.h:356:5: note: expected ‘struct udevice
> **’ but argument is of type ‘int’
> -../board/samsung/odroid/odroid.c:432:2: error: too many arguments to
> function ‘regulator_list_autoset’
> -../include/power/regulator.h:356:5: note: declared here
> -make[2]: *** [board/samsung/odroid/odroid.o] Error 1
> -make[1]: *** [board/samsung/odroid] Error 2
> -make: *** [sub-make] Error 2
> w-../board/samsung/odroid/odroid.c: In function ‘exynos_power_init’:
> w-../board/samsung/odroid/odroid.c:432:2: warning: passing argument 2
> of ‘regulator_list_autoset’ makes pointer from integer without a cast
> [enabled by default]
> w-../board/samsung/odroid/odroid.c: In function ‘s5pc210_phy_control’:
> w-../board/samsung/odroid/odroid.c:444:2: warning: implicit
> declaration of function ‘regulator_by_platname’
> [-Wimplicit-function-declaration]
> 22: common: cmd pmic: command cleanup
> 23: common: cmd regulator: command cleanup
> 24: doc: driver-model: pmic-framework.txt - cleanup
> 25: sandbox: i2c: search child emul dev and check its uclass id
> 26: sandbox: add: sandbox PMIC device drivers: I2C emul, pmic, regulator
> 27: test: dm: dts: add sandbox pmic i2c node
> 28: sandbox: defconfig: enable support of sandbox PMIC drivers
> 29: test: dm: add sandbox PMIC framework tests
>
>
> Can you please take a look?
>
Ok, will check this.
>>
>> Przemyslaw Marczak (12):
>> dm: pmic: code cleanup of PMIC uclass driver
>> dm: pmic: max77686: update driver code
>> dm: regulator: uclass driver code cleanup
>> odroid u3: cleanup the regulator calls
>> common: cmd pmic: command cleanup
>> common: cmd regulator: command cleanup
>> doc: driver-model: pmic-framework.txt - cleanup
>> sandbox: i2c: search child emul dev and check its uclass id
>> sandbox: add: sandbox PMIC device drivers: I2C emul, pmic, regulator
>> test: dm: dts: add sandbox pmic i2c node
>> sandbox: defconfig: enable support of sandbox PMIC drivers
>> test: dm: add sandbox PMIC framework tests
>>
>> board/samsung/odroid/odroid.c | 9 +-
>> common/cmd_pmic.c | 131 ++++-----
>> common/cmd_regulator.c | 239 ++++++++--------
>> configs/sandbox_defconfig | 7 +
>> doc/device-tree-bindings/pmic/sandbox.txt | 35 +++
>> doc/device-tree-bindings/regulator/sandbox.txt | 45 +++
>> doc/driver-model/pmic-framework.txt | 20 +-
>> drivers/i2c/sandbox_i2c.c | 20 +-
>> drivers/power/pmic/Kconfig | 27 +-
>> drivers/power/pmic/Makefile | 3 +-
>> drivers/power/pmic/i2c_pmic_emul.c | 145 ++++++++++
>> drivers/power/pmic/max77686.c | 15 +-
>> drivers/power/pmic/pmic-uclass.c | 25 +-
>> drivers/power/pmic/sandbox.c | 79 ++++++
>> drivers/power/regulator/Kconfig | 32 ++-
>> drivers/power/regulator/Makefile | 1 +
>> drivers/power/regulator/regulator-uclass.c | 104 ++++---
>> drivers/power/regulator/sandbox.c | 355 +++++++++++++++++++++++
>> include/power/pmic.h | 39 +--
>> include/power/regulator.h | 116 ++++----
>> include/power/sandbox_pmic.h | 222 +++++++++++++++
>> test/dm/Makefile | 2 +
>> test/dm/power.c | 371 +++++++++++++++++++++++++
>> test/dm/test.dts | 38 +++
>> 24 files changed, 1732 insertions(+), 348 deletions(-)
>> create mode 100644 doc/device-tree-bindings/pmic/sandbox.txt
>> create mode 100644 doc/device-tree-bindings/regulator/sandbox.txt
>> create mode 100644 drivers/power/pmic/i2c_pmic_emul.c
>> create mode 100644 drivers/power/pmic/sandbox.c
>> create mode 100644 drivers/power/regulator/sandbox.c
>> create mode 100644 include/power/sandbox_pmic.h
>> create mode 100644 test/dm/power.c
>>
>> --
>> 1.9.1
>>
>
> Regards,
> Simon
>
Best regards,
--
Przemyslaw Marczak
Samsung R&D Institute Poland
Samsung Electronics
p.marczak at samsung.com
More information about the U-Boot
mailing list