Lines Matching full:sw
21 int mc34vr500_get_sw_volt(uint8_t sw) in mc34vr500_get_sw_volt() argument
29 debug("%s: Get SW%u volt from swxvolt_addr = 0x%x\n", in mc34vr500_get_sw_volt()
30 __func__, sw + 1, swxvolt_addr[sw]); in mc34vr500_get_sw_volt()
31 if (sw > SW4) { in mc34vr500_get_sw_volt()
32 printf("%s: Unsupported SW(sw%d)\n", __func__, sw + 1); in mc34vr500_get_sw_volt()
46 ret = pmic_reg_read(p, swxvolt_addr[sw], &swxvolt); in mc34vr500_get_sw_volt()
48 printf("%s: Failed to get SW%u volt\n", __func__, sw + 1); in mc34vr500_get_sw_volt()
52 debug("%s: SW%d step point swxvolt = %u\n", __func__, sw + 1, swxvolt); in mc34vr500_get_sw_volt()
53 spb = swx_set_point_base[sw]; in mc34vr500_get_sw_volt()
54 /* The base of SW volt is 625mV and increase by step 25mV */ in mc34vr500_get_sw_volt()
57 debug("%s: SW%u volt = %dmV\n", __func__, sw + 1, sw_volt); in mc34vr500_get_sw_volt()
61 int mc34vr500_set_sw_volt(uint8_t sw, int sw_volt) in mc34vr500_set_sw_volt() argument
68 debug("%s: Set SW%u volt to %dmV\n", __func__, sw + 1, sw_volt); in mc34vr500_set_sw_volt()
69 /* The least SW volt is 625mV, and only 4 SW outputs */ in mc34vr500_set_sw_volt()
70 if (sw > SW4 || sw_volt < 625) in mc34vr500_set_sw_volt()
83 spb = swx_set_point_base[sw]; in mc34vr500_set_sw_volt()
84 /* The base of SW volt is 625mV and increase by step 25mV */ in mc34vr500_set_sw_volt()
86 debug("%s: SW%d step point swxvolt = %u\n", __func__, sw + 1, swxvolt); in mc34vr500_set_sw_volt()
90 ret = pmic_reg_write(p, swxvolt_addr[sw], swxvolt); in mc34vr500_set_sw_volt()