Re: [PATCH 2/3] regulator: tps65023: Setting correct core regulatorfor tps65021

From: Marcus Folkesson
Date: Fri Jul 29 2011 - 15:59:41 EST


On 07/29/2011 02:33 PM, Mark Brown wrote:
> On Wed, Jul 27, 2011 at 12:32:46PM +0200, Marcus Folkesson wrote:
>> TPS65023 is using VDCDC1 as core regulator and TPS65021 is using VDCDC3.
>> Core-regulator, voltage-tables and size of voltage-table may differ between
>> different regulators. All those three is now passed as driver data.
>
> Acked-by: Mark Brown <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx>

Changing struct member tps_driver_data.info to const for avoiding awkward type castings.

Changes from original patch:

@@ -173,7 +173,7 @@ struct tps_pmic {

/* Struct passed as driver data */
struct tps_driver_data {
- struct tps_info *info;
+ const struct tps_info *info;
u8 core_regulator;
unsigned int *num_voltages;
};
@@ -681,19 +681,19 @@ static const struct tps_info tps65023_regs[] = {
};

static struct tps_driver_data tps65021_drv_data = {
- .info = (struct tps_info *) tps65021_regs,
+ .info = tps65021_regs,
.core_regulator = TPS65023_DCDC_3,
.num_voltages = tps65021_num_voltages,
};

static struct tps_driver_data tps65023_drv_data = {
- .info = (struct tps_info *) tps65023_regs,
+ .info = tps65023_regs,
.core_regulator = TPS65023_DCDC_1,
.num_voltages = tps65023_num_voltages,
};