Lines Matching refs:vreg

157 	struct pcap_regulator *vreg = &vreg_table[rdev_get_id(rdev)];  in pcap_regulator_set_voltage()  local
163 if (vreg->n_voltages == 1) in pcap_regulator_set_voltage()
166 for (i = 0; i < vreg->n_voltages; i++) { in pcap_regulator_set_voltage()
170 else if (i + 1 == vreg->n_voltages && rdev_get_id(rdev) == V1) in pcap_regulator_set_voltage()
173 uV = vreg->voltage_table[i] * 1000; in pcap_regulator_set_voltage()
176 return ezx_pcap_set_bits(pcap, vreg->reg, in pcap_regulator_set_voltage()
177 (vreg->n_voltages - 1) << vreg->index, in pcap_regulator_set_voltage()
178 i << vreg->index); in pcap_regulator_set_voltage()
182 i = vreg->n_voltages - 1; in pcap_regulator_set_voltage()
191 struct pcap_regulator *vreg = &vreg_table[rdev_get_id(rdev)]; in pcap_regulator_get_voltage() local
196 if (vreg->n_voltages == 1) in pcap_regulator_get_voltage()
197 return vreg->voltage_table[0] * 1000; in pcap_regulator_get_voltage()
199 ezx_pcap_read(pcap, vreg->reg, &tmp); in pcap_regulator_get_voltage()
200 tmp = ((tmp >> vreg->index) & (vreg->n_voltages - 1)); in pcap_regulator_get_voltage()
201 mV = vreg->voltage_table[tmp]; in pcap_regulator_get_voltage()
208 struct pcap_regulator *vreg = &vreg_table[rdev_get_id(rdev)]; in pcap_regulator_enable() local
211 if (vreg->en == NA) in pcap_regulator_enable()
214 return ezx_pcap_set_bits(pcap, vreg->reg, 1 << vreg->en, 1 << vreg->en); in pcap_regulator_enable()
219 struct pcap_regulator *vreg = &vreg_table[rdev_get_id(rdev)]; in pcap_regulator_disable() local
222 if (vreg->en == NA) in pcap_regulator_disable()
225 return ezx_pcap_set_bits(pcap, vreg->reg, 1 << vreg->en, 0); in pcap_regulator_disable()
230 struct pcap_regulator *vreg = &vreg_table[rdev_get_id(rdev)]; in pcap_regulator_is_enabled() local
234 if (vreg->en == NA) in pcap_regulator_is_enabled()
237 ezx_pcap_read(pcap, vreg->reg, &tmp); in pcap_regulator_is_enabled()
238 return (tmp >> vreg->en) & 1; in pcap_regulator_is_enabled()
244 struct pcap_regulator *vreg = &vreg_table[rdev_get_id(rdev)]; in pcap_regulator_list_voltage() local
246 return vreg->voltage_table[index] * 1000; in pcap_regulator_list_voltage()