Skip to contentSkip to conversation

regulator: ab8500: Fix voltage_shift setting for AB8540_LDO_DMIC

PATCH Applied Axel Lin 3 participants 3 messages Apr 15, 2013 Voltage and current regulator framework

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 regulator: ab8500: Fix voltage_shift setting for AB8540_LDO_DMIC

The voltage_mask is 0xc0, thus we need to set voltage_shift = 6 to get correct selector in get_voltage_sel and set_voltage_sel.

---
Hi Bengt,
I don't have the datasheet. Can you confirm if this fix is correct?

BTW, can you also review a couple patches for ab8500 and ab8500-ext I sent a few days ago? I ask this because now I have more patches that may depend on previous patches.

Thanks,
Axel

 drivers/regulator/ab8500.c |    1 +
 1 file changed, 1 insertion(+)
drivers/regulator/ab8500.c +1 -0
index b81ff04..0a62ef9 100644
@@ -1729,6 +1729,7 @@ static struct ab8500_regulator_info
 		.voltage_bank		= 0x03,
 		.voltage_reg		= 0x83,
 		.voltage_mask		= 0xc0,
+		.voltage_shift		= 6,
 	},
 
 	/*
Signature · 1 line
1.7.10.4
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Axel Lin

The voltage_mask is 0xc0, thus we need to set voltage_shift = 6 to get correct selector in get_voltage_sel and set_voltage_sel.

The patch is correct. Voltage selection is done with 0xc0.

Quoted 26 lines

---
Hi Bengt,
I don't have the datasheet. Can you confirm if this fix is correct?

BTW, can you also review a couple patches for ab8500 and ab8500-ext I sent a few days ago? I ask this because now I have more patches that may depend on previous patches.

Thanks,
Axel

  drivers/regulator/ab8500.c |    1 +
  1 file changed, 1 insertion(+)
drivers/regulator/ab8500.c +1 -0
index b81ff04..0a62ef9 100644
@@ -1729,6 +1729,7 @@ static struct ab8500_regulator_info
  		.voltage_bank		= 0x03,
  		.voltage_reg		= 0x83,
  		.voltage_mask		= 0xc0,
+		.voltage_shift		= 6,
  	},
 
  	/*
maintainer Applied
#2 lore raw
In reply to Axel Lin
Quoted 2 lines · Axel Lin

The voltage_mask is 0xc0, thus we need to set voltage_shift = 6 to get correct selector in get_voltage_sel and set_voltage_sel.

Applied, thanks.