Skip to content

Commit

Permalink
regulator: twl6030: Remove unused fields from struct twlreg_info
Browse files Browse the repository at this point in the history
The table_len, *table, remap and max_mV fields are not used, so remove
them.

Signed-off-by: Axel Lin <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
AxelLin authored and broonie committed Nov 23, 2016
1 parent 15cc95c commit 3498c5e
Showing 1 changed file with 17 additions and 29 deletions.
46 changes: 17 additions & 29 deletions drivers/regulator/twl6030-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,8 @@ struct twlreg_info {
/* twl resource ID, for resource control state machine */
u8 id;

/* voltage in mV = table[VSEL]; table_len must be a power-of-two */
u8 table_len;
const u16 *table;

/* State REMAP default configuration */
u8 remap;

/* chip constraints on regulator behavior */
u16 min_mV;
u16 max_mV;

u8 flags;

Expand Down Expand Up @@ -535,11 +527,10 @@ static const struct twlreg_info TWL6030_INFO_##label = { \
}, \
}

#define TWL6030_ADJUSTABLE_LDO(label, offset, min_mVolts, max_mVolts) \
#define TWL6030_ADJUSTABLE_LDO(label, offset, min_mVolts) \
static const struct twlreg_info TWL6030_INFO_##label = { \
.base = offset, \
.min_mV = min_mVolts, \
.max_mV = max_mVolts, \
.desc = { \
.name = #label, \
.id = TWL6030_REG_##label, \
Expand All @@ -550,11 +541,10 @@ static const struct twlreg_info TWL6030_INFO_##label = { \
}, \
}

#define TWL6032_ADJUSTABLE_LDO(label, offset, min_mVolts, max_mVolts) \
#define TWL6032_ADJUSTABLE_LDO(label, offset, min_mVolts) \
static const struct twlreg_info TWL6032_INFO_##label = { \
.base = offset, \
.min_mV = min_mVolts, \
.max_mV = max_mVolts, \
.desc = { \
.name = #label, \
.id = TWL6032_REG_##label, \
Expand All @@ -570,7 +560,6 @@ static const struct twlreg_info TWLFIXED_INFO_##label = { \
.base = offset, \
.id = 0, \
.min_mV = mVolts, \
.remap = 0, \
.desc = { \
.name = #label, \
.id = TWL6030##_REG_##label, \
Expand All @@ -588,7 +577,6 @@ static const struct twlreg_info TWLFIXED_INFO_##label = { \
static const struct twlreg_info TWLSMPS_INFO_##label = { \
.base = offset, \
.min_mV = 600, \
.max_mV = 2100, \
.desc = { \
.name = #label, \
.id = TWL6032_REG_##label, \
Expand All @@ -606,22 +594,22 @@ static const struct twlreg_info TWLSMPS_INFO_##label = { \
TWL6030_ADJUSTABLE_SMPS(VDD1);
TWL6030_ADJUSTABLE_SMPS(VDD2);
TWL6030_ADJUSTABLE_SMPS(VDD3);
TWL6030_ADJUSTABLE_LDO(VAUX1_6030, 0x54, 1000, 3300);
TWL6030_ADJUSTABLE_LDO(VAUX2_6030, 0x58, 1000, 3300);
TWL6030_ADJUSTABLE_LDO(VAUX3_6030, 0x5c, 1000, 3300);
TWL6030_ADJUSTABLE_LDO(VMMC, 0x68, 1000, 3300);
TWL6030_ADJUSTABLE_LDO(VPP, 0x6c, 1000, 3300);
TWL6030_ADJUSTABLE_LDO(VUSIM, 0x74, 1000, 3300);
TWL6030_ADJUSTABLE_LDO(VAUX1_6030, 0x54, 1000);
TWL6030_ADJUSTABLE_LDO(VAUX2_6030, 0x58, 1000);
TWL6030_ADJUSTABLE_LDO(VAUX3_6030, 0x5c, 1000);
TWL6030_ADJUSTABLE_LDO(VMMC, 0x68, 1000);
TWL6030_ADJUSTABLE_LDO(VPP, 0x6c, 1000);
TWL6030_ADJUSTABLE_LDO(VUSIM, 0x74, 1000);
/* 6025 are renamed compared to 6030 versions */
TWL6032_ADJUSTABLE_LDO(LDO2, 0x54, 1000, 3300);
TWL6032_ADJUSTABLE_LDO(LDO4, 0x58, 1000, 3300);
TWL6032_ADJUSTABLE_LDO(LDO3, 0x5c, 1000, 3300);
TWL6032_ADJUSTABLE_LDO(LDO5, 0x68, 1000, 3300);
TWL6032_ADJUSTABLE_LDO(LDO1, 0x6c, 1000, 3300);
TWL6032_ADJUSTABLE_LDO(LDO7, 0x74, 1000, 3300);
TWL6032_ADJUSTABLE_LDO(LDO6, 0x60, 1000, 3300);
TWL6032_ADJUSTABLE_LDO(LDOLN, 0x64, 1000, 3300);
TWL6032_ADJUSTABLE_LDO(LDOUSB, 0x70, 1000, 3300);
TWL6032_ADJUSTABLE_LDO(LDO2, 0x54, 1000);
TWL6032_ADJUSTABLE_LDO(LDO4, 0x58, 1000);
TWL6032_ADJUSTABLE_LDO(LDO3, 0x5c, 1000);
TWL6032_ADJUSTABLE_LDO(LDO5, 0x68, 1000);
TWL6032_ADJUSTABLE_LDO(LDO1, 0x6c, 1000);
TWL6032_ADJUSTABLE_LDO(LDO7, 0x74, 1000);
TWL6032_ADJUSTABLE_LDO(LDO6, 0x60, 1000);
TWL6032_ADJUSTABLE_LDO(LDOLN, 0x64, 1000);
TWL6032_ADJUSTABLE_LDO(LDOUSB, 0x70, 1000);
TWL6030_FIXED_LDO(VANA, 0x50, 2100, 0);
TWL6030_FIXED_LDO(VCXIO, 0x60, 1800, 0);
TWL6030_FIXED_LDO(VDAC, 0x64, 1800, 0);
Expand Down

0 comments on commit 3498c5e

Please sign in to comment.