Re: [PATCH 1/2] TPS6235x based Power regulator support added

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

 



On Tue, Dec 16, 2008 at 03:36:06PM +0530, Manikandan Pillai wrote:

> +extern struct regulator_consumer_supply tps62352_core_consumers;
> +extern struct regulator_consumer_supply tps62352_mpu_consumers;

...

> +	/* Register the regulators */
> +	if (client->addr == TPS_62352_CORE_ADDR) {
> +		/* dev needs to be inited since this is required to for get() */
> +		tps62352_core_consumers.dev = &client->dev;
> +		rdev = regulator_register(&regulators[0], &client->dev,
> +					client);
> +	} else if (client->addr == TPS_62353_MPU_ADDR) {
> +		/* dev needs to be inited since this is required to for get() */
> +		tps62352_mpu_consumers.dev = &client->dev;
> +		rdev = regulator_register(&regulators[1], &client->dev,
> +					client);
> +	}

This should be done in the style of other regulators with the list of
consumers passed in as part of the regulator init data supplied by the
board.  This would then allow you to remove all the conditionals (since
the regulator array index is provided for you in the i2c_device_id value
you get passed in).
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux