From: Tom Rini Date: Wed, 22 Oct 2014 11:31:59 -0400 Subject: [U-Boot] [PATCH 07/19] dm: pmic: add max77686 pmic driver In-Reply-To: <1412801335-1591-8-git-send-email-p.marczak@samsung.com> References: <1412801335-1591-1-git-send-email-p.marczak@samsung.com> <1412801335-1591-8-git-send-email-p.marczak@samsung.com> Message-ID: <20141022153159.GG25506@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 [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 -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: