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.marc...@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 <tr...@ti.com>

-- 
Tom

Attachment: signature.asc
Description: Digital signature

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to