
22 Oct
2014
22 Oct
'14
5:31 p.m.
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