On Saturday 19 May 2012 10:11 PM, Mark Brown wrote:Also in regulator_register we set the of_node as* PGP Signed by an unknown keyIf I dont do this then it will not enter in the following case for
On Sat, May 19, 2012 at 07:44:06PM +0530, Laxman Dewangan wrote:When registering the regulator driver, use the rdev->dev forYou're providing no motivation for this and it's difficult to see how it
getting the regulator device of given supply instead of parent
device.
improves things. The class device is dynamically numbered so it's not
suitable for specifying supplies on a non-DT system and for a DT system
it's not obvious to me that we would want to involve the class device in
anything, it requires an additional layer of indirection but that's
about it.
getting the regulator_dev of supply regulator because dev->of_node is
null, the tps65910-regulator driver have not set the pdev->dev.ofnode.
static struct regulator_dev *regulator_dev_lookup(struct device *dev,
const char *supply,
int *ret)
{
/* first do a dt based lookup */
if (dev&& dev->of_node) {
::::::::::::::::
/* Get the regulator device */
}
::::::::::::::::::
}