[U-Boot] [PATCH 07/19] dm: pmic: add max77686 pmic driver

Tom Rini
2014-10-22T15:31:59Z

On Wed, Oct 08, 2014 at 10:48:43PM +0200, Przemyslaw Marczak wrote:

> This adds a simple implementation of driver model uclass pmic driver.
> This implementation includes two funcitons:
> - max77686_ofdata_to_platdada(...) - init I/O data from fdt
> - max77686_probe(...) - looks for max77686 regulator driver and bind it
>
> If there is no regulator driver, then pmic can still provide read/write
> operations, and can be accessed by 'pmic' commands.
>
> Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
[snip]
> + parent = fdt_parent_offset(blob, node);
> +
> + if (parent < 0) {
> + error("%s: Cannot find node parent", __func__);
> + return -EINVAL;
> + }
> +
> + pl->bus = i2c_get_bus_num_fdt(parent);
> + if (pl->bus < 0) {
> + debug("%s: Cannot find bus num\n", __func__);
> + return -EINVAL;
> + }

Both of those should be error() and please note (and fix globally!) that
error() already has __FILE__, __LINE__ and __func__ so you can drop
those duplications.

Otherwise:

Reviewed-by: Tom Rini <trini@ti.com>

--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20141022/2098aa10/attachment.pgp>