Re: [PATCH 8/9] regulator: helper to extract regulator node based on supply name
From: Mark Brown <hidden>
Date: 2011-09-27 12:21:55
Also in:
linux-arm-kernel, linux-omap
From: Mark Brown <hidden>
Date: 2011-09-27 12:21:55
Also in:
linux-arm-kernel, linux-omap
On Tue, Sep 27, 2011 at 03:42:51PM +0530, Rajendra Nayak wrote:
+ if (!dev) + return NULL;
So how do we handle CPUs? cpufreq is one of the most active users of regulators...
+ snprintf(prop_name, 32, "%s-supply", supply); + + prop = of_get_property(dev->of_node, prop_name, &sz); + if (!prop || sz < 4) + return NULL;
sz < 4? Magic! :)
+extern struct device_node *of_get_regulator(struct device *dev, + const char *supply);
This shouldn't be part of the public API, it should be transparently handled within the core.