[U-Boot] [PATCH v4 04/16] dm: pmic: add implementation of driver model pmic uclass

Simon Glass
2015-04-22T17:09:16Z

On 22 April 2015 at 10:30, Simon Glass <sjg@chromium.org> wrote:
> Hi Przemyslaw,
>
> On 20 April 2015 at 12:07, Przemyslaw Marczak <p.marczak@samsung.com> wrote:
>> This commit introduces the PMIC uclass implementation.
>> It allows providing the basic I/O interface for PMIC devices.
>> For the multi-function PMIC devices, this can be used as I/O
>> parent device, for each IC's interface. Then, each PMIC particular
>> function can be provided by the child device's operations, and the
>> child devices will use its parent for read/write by the common API.
>>
>> Core files:
>> - 'include/power/pmic.h'
>> - 'drivers/power/pmic/pmic-uclass.c'
>>
>> The old pmic framework is still kept and is independent.
>>
>> For more detailed informations, please look into the header file.
>>
>> Changes:
>> - new uclass-id: UCLASS_PMIC
>> - new config: CONFIG_DM_PMIC
>>
>> Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
>> ---
>> Changes V2:
>> - pmic uclass: adjust uclass code to the mainline changes
>> - pmic uclass: remove pmic_i2c and pmic_spi
>> - pmic uclass: modify pmic_platdata
>> - pmic uclass: add pmic_if_* functions
>> - pmic uclass: remove pmic_init_dm()
>> - pmic uclass: cleanup
>> - pmic.h: define pmic ops structure (read/write operations)
>> - pmic.h: add comments to functions
>>
>> Changes V3:
>> - pmic-uclass.c and pmic.h:
>> -- remove pmic_if_* functions
>> -- add new function pmic_child_node_scan()
>> - add Kconfig entry
>>
>> Changes V4:
>> - move drivers/power/pmic-uclass.c to drivers/power/pmic/pmic-uclass.c
>> - move DM_PMIC Kconfig entry: drivers/power/Kconfig to drivers/power/pmic/Kconfig
>> - drivers/power/Kconfig: Add menu "Power" and include pmic Kconfig
>> - Kconfig: provide only the general information about the PMIC
>> - pmic-uclass.c: add pmic_bind_childs()
>> - pmic-uclass.c: add debug
>> - pmic-uclass.c: cleanup includes
>> - pmic-uclass.c: remove pmic_get_uclass_ops() and use of dev_get_driver_ops()
>> - pmic-uclass.c: use of uclass_get_device_by_name()
>> - pmic-uclass.c: add str_get_num() - for get number from string
>> - include/power/pmic.h - start comments rewording
>> - power/pmic.h: comments update
>> ---
>> drivers/power/Kconfig | 6 ++
>> drivers/power/pmic/Kconfig | 11 +++
>> drivers/power/pmic/Makefile | 1 +
>> drivers/power/pmic/pmic-uclass.c | 158 ++++++++++++++++++++++++++++++++
>> include/dm/uclass-id.h | 3 +
>> include/power/pmic.h | 189 +++++++++++++++++++++++++++++++++++++++
>> 6 files changed, 368 insertions(+)
>> create mode 100644 drivers/power/pmic/Kconfig
>> create mode 100644 drivers/power/pmic/pmic-uclass.c
>
> Acked-by: Simon Glass <sjg@chromium.org>
>
> I have a few nits below - perhaps they can be targeted in a follow-up
> patch or two? I'd like to merge this soon and it is not worth holding
> up the series for nits.

Applied to u-boot-dm/next, thanks!