Commit bab9bf1e authored by Tony Lindgren's avatar Tony Lindgren

Merge source.mvista.com:/home/git/linux-omap-2.6

parents 9cb4dc2e 6f04b38e
...@@ -594,6 +594,36 @@ int menelaus_set_vmmc(unsigned int mV) ...@@ -594,6 +594,36 @@ int menelaus_set_vmmc(unsigned int mV)
} }
EXPORT_SYMBOL(menelaus_set_vmmc); EXPORT_SYMBOL(menelaus_set_vmmc);
static const struct menelaus_vtg_value vaux_values[] = {
{ 1500, 0 },
{ 1800, 1 },
{ 2500, 2 },
{ 2800, 3 },
};
static const struct menelaus_vtg vaux_vtg = {
.name = "VAUX",
.vtg_reg = MENELAUS_LDO_CTRL1,
.vtg_shift = 4,
.vtg_bits = 2,
.mode_reg = MENELAUS_LDO_CTRL6,
};
int menelaus_set_vaux(unsigned int mV)
{
int val;
if (mV == 0)
return menelaus_set_voltage(&vaux_vtg, 0, 0, 0);
val = menelaus_get_vtg_value(mV, vaux_values, ARRAY_SIZE(vaux_values));
if (val < 0)
return -EINVAL;
return menelaus_set_voltage(&vaux_vtg, mV, val, 0x02);
}
EXPORT_SYMBOL(menelaus_set_vaux);
int menelaus_get_slot_pin_states(void) int menelaus_get_slot_pin_states(void)
{ {
return menelaus_read_reg(MENELAUS_MCT_PIN_ST); return menelaus_read_reg(MENELAUS_MCT_PIN_ST);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment