Skip to content

Commit

Permalink
regulator: tps65910: dt: support when "regulators" node found
Browse files Browse the repository at this point in the history
The device tree binding for the tps65910 is described as:
	tps65911 {
		reg = <0x2d>
		:::::::::
		regulators {
			compatible = "ti,tps65911";
			ldo1_reg: ldo1 {
				/** regulator entry */
			};

			ldo2_reg: ldo2 {
				/** regulator entry */
			};
			::::::::::
		};
	};

Support the regulators functionality only when there is "regulators"
child node available for tps65910.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Laxman Dewangan authored and Mark Brown committed May 20, 2012
1 parent 7e9a57e commit 92ab953
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/regulator/tps65910-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -1090,6 +1090,10 @@ static struct tps65910_board *tps65910_parse_dt_reg_data(
}

regulators = of_find_node_by_name(np, "regulators");
if (!regulators) {
dev_err(&pdev->dev, "regulator node not found\n");
return NULL;
}

switch (tps65910_chip_id(tps65910)) {
case TPS65910:
Expand Down

0 comments on commit 92ab953

Please sign in to comment.