Skip to content

Commit 3498c5e

Browse files
AxelLinbroonie
authored andcommitted
regulator: twl6030: Remove unused fields from struct twlreg_info
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]>
1 parent 15cc95c commit 3498c5e

File tree

1 file changed

+17
-29
lines changed

1 file changed

+17
-29
lines changed

drivers/regulator/twl6030-regulator.c

Lines changed: 17 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,8 @@ struct twlreg_info {
3131
/* twl resource ID, for resource control state machine */
3232
u8 id;
3333

34-
/* voltage in mV = table[VSEL]; table_len must be a power-of-two */
35-
u8 table_len;
36-
const u16 *table;
37-
38-
/* State REMAP default configuration */
39-
u8 remap;
40-
4134
/* chip constraints on regulator behavior */
4235
u16 min_mV;
43-
u16 max_mV;
4436

4537
u8 flags;
4638

@@ -535,11 +527,10 @@ static const struct twlreg_info TWL6030_INFO_##label = { \
535527
}, \
536528
}
537529

538-
#define TWL6030_ADJUSTABLE_LDO(label, offset, min_mVolts, max_mVolts) \
530+
#define TWL6030_ADJUSTABLE_LDO(label, offset, min_mVolts) \
539531
static const struct twlreg_info TWL6030_INFO_##label = { \
540532
.base = offset, \
541533
.min_mV = min_mVolts, \
542-
.max_mV = max_mVolts, \
543534
.desc = { \
544535
.name = #label, \
545536
.id = TWL6030_REG_##label, \
@@ -550,11 +541,10 @@ static const struct twlreg_info TWL6030_INFO_##label = { \
550541
}, \
551542
}
552543

553-
#define TWL6032_ADJUSTABLE_LDO(label, offset, min_mVolts, max_mVolts) \
544+
#define TWL6032_ADJUSTABLE_LDO(label, offset, min_mVolts) \
554545
static const struct twlreg_info TWL6032_INFO_##label = { \
555546
.base = offset, \
556547
.min_mV = min_mVolts, \
557-
.max_mV = max_mVolts, \
558548
.desc = { \
559549
.name = #label, \
560550
.id = TWL6032_REG_##label, \
@@ -570,7 +560,6 @@ static const struct twlreg_info TWLFIXED_INFO_##label = { \
570560
.base = offset, \
571561
.id = 0, \
572562
.min_mV = mVolts, \
573-
.remap = 0, \
574563
.desc = { \
575564
.name = #label, \
576565
.id = TWL6030##_REG_##label, \
@@ -588,7 +577,6 @@ static const struct twlreg_info TWLFIXED_INFO_##label = { \
588577
static const struct twlreg_info TWLSMPS_INFO_##label = { \
589578
.base = offset, \
590579
.min_mV = 600, \
591-
.max_mV = 2100, \
592580
.desc = { \
593581
.name = #label, \
594582
.id = TWL6032_REG_##label, \
@@ -606,22 +594,22 @@ static const struct twlreg_info TWLSMPS_INFO_##label = { \
606594
TWL6030_ADJUSTABLE_SMPS(VDD1);
607595
TWL6030_ADJUSTABLE_SMPS(VDD2);
608596
TWL6030_ADJUSTABLE_SMPS(VDD3);
609-
TWL6030_ADJUSTABLE_LDO(VAUX1_6030, 0x54, 1000, 3300);
610-
TWL6030_ADJUSTABLE_LDO(VAUX2_6030, 0x58, 1000, 3300);
611-
TWL6030_ADJUSTABLE_LDO(VAUX3_6030, 0x5c, 1000, 3300);
612-
TWL6030_ADJUSTABLE_LDO(VMMC, 0x68, 1000, 3300);
613-
TWL6030_ADJUSTABLE_LDO(VPP, 0x6c, 1000, 3300);
614-
TWL6030_ADJUSTABLE_LDO(VUSIM, 0x74, 1000, 3300);
597+
TWL6030_ADJUSTABLE_LDO(VAUX1_6030, 0x54, 1000);
598+
TWL6030_ADJUSTABLE_LDO(VAUX2_6030, 0x58, 1000);
599+
TWL6030_ADJUSTABLE_LDO(VAUX3_6030, 0x5c, 1000);
600+
TWL6030_ADJUSTABLE_LDO(VMMC, 0x68, 1000);
601+
TWL6030_ADJUSTABLE_LDO(VPP, 0x6c, 1000);
602+
TWL6030_ADJUSTABLE_LDO(VUSIM, 0x74, 1000);
615603
/* 6025 are renamed compared to 6030 versions */
616-
TWL6032_ADJUSTABLE_LDO(LDO2, 0x54, 1000, 3300);
617-
TWL6032_ADJUSTABLE_LDO(LDO4, 0x58, 1000, 3300);
618-
TWL6032_ADJUSTABLE_LDO(LDO3, 0x5c, 1000, 3300);
619-
TWL6032_ADJUSTABLE_LDO(LDO5, 0x68, 1000, 3300);
620-
TWL6032_ADJUSTABLE_LDO(LDO1, 0x6c, 1000, 3300);
621-
TWL6032_ADJUSTABLE_LDO(LDO7, 0x74, 1000, 3300);
622-
TWL6032_ADJUSTABLE_LDO(LDO6, 0x60, 1000, 3300);
623-
TWL6032_ADJUSTABLE_LDO(LDOLN, 0x64, 1000, 3300);
624-
TWL6032_ADJUSTABLE_LDO(LDOUSB, 0x70, 1000, 3300);
604+
TWL6032_ADJUSTABLE_LDO(LDO2, 0x54, 1000);
605+
TWL6032_ADJUSTABLE_LDO(LDO4, 0x58, 1000);
606+
TWL6032_ADJUSTABLE_LDO(LDO3, 0x5c, 1000);
607+
TWL6032_ADJUSTABLE_LDO(LDO5, 0x68, 1000);
608+
TWL6032_ADJUSTABLE_LDO(LDO1, 0x6c, 1000);
609+
TWL6032_ADJUSTABLE_LDO(LDO7, 0x74, 1000);
610+
TWL6032_ADJUSTABLE_LDO(LDO6, 0x60, 1000);
611+
TWL6032_ADJUSTABLE_LDO(LDOLN, 0x64, 1000);
612+
TWL6032_ADJUSTABLE_LDO(LDOUSB, 0x70, 1000);
625613
TWL6030_FIXED_LDO(VANA, 0x50, 2100, 0);
626614
TWL6030_FIXED_LDO(VCXIO, 0x60, 1800, 0);
627615
TWL6030_FIXED_LDO(VDAC, 0x64, 1800, 0);

0 commit comments

Comments
 (0)