Lines Matching refs:vtg
445 u16 vtg; member
449 static int menelaus_set_voltage(const struct menelaus_vtg *vtg, int mV, in menelaus_set_voltage() argument
457 ret = menelaus_read_reg(vtg->vtg_reg); in menelaus_set_voltage()
460 val = ret & ~(((1 << vtg->vtg_bits) - 1) << vtg->vtg_shift); in menelaus_set_voltage()
461 val |= vtg_val << vtg->vtg_shift; in menelaus_set_voltage()
465 vtg->name, mV, vtg->vtg_reg, val); in menelaus_set_voltage()
467 ret = menelaus_write_reg(vtg->vtg_reg, val); in menelaus_set_voltage()
470 ret = menelaus_write_reg(vtg->mode_reg, mode); in menelaus_set_voltage()
480 static int menelaus_get_vtg_value(int vtg, const struct menelaus_vtg_value *tbl, in menelaus_get_vtg_value() argument
486 if (tbl->vtg == vtg) in menelaus_get_vtg_value()
646 const struct menelaus_vtg *vtg; in menelaus_set_vdcdc() local
652 vtg = &vdcdc2_vtg; in menelaus_set_vdcdc()
654 vtg = &vdcdc3_vtg; in menelaus_set_vdcdc()
657 return menelaus_set_voltage(vtg, 0, 0, 0); in menelaus_set_vdcdc()
663 return menelaus_set_voltage(vtg, mV, val, 0x03); in menelaus_set_vdcdc()