Re: [PATCH] regulator: tps65023: add device tree support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Tue, Sep 15, 2015 at 03:33:55PM +0200, Thomas Elste wrote:

> +static struct regulator_init_data*
> +	of_get_tps65023_platform_data(struct device *dev)
> +{
> +	struct regulator_init_data *reg_data;
> +	struct device_node *np = dev->of_node;
> +	struct device_node *regulators;
> +	struct of_regulator_match *matches;
> +	int idx, count, ret;
> +
> +	regulators = of_get_child_by_name(np, "regulators");
> +	if (!regulators) {
> +		dev_err(dev, "Regulator node not found\n");
> +		return NULL;
> +	}

There's now core support for this so no need to open code in the driver
- set of_match and regulators_node in the regulator_desc instead.

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux