Lines Matching refs:pmic
426 u32 get_offset_code(u32 volt_offset, struct pmic_data *pmic) in get_offset_code() argument
430 volt_offset -= pmic->base_offset; in get_offset_code()
432 offset_code = (volt_offset + pmic->step - 1) / pmic->step; in get_offset_code()
438 return offset_code + pmic->start_code; in get_offset_code()
441 void do_scale_vcore(u32 vcore_reg, u32 volt_mv, struct pmic_data *pmic) in do_scale_vcore() argument
450 pmic->pmic_bus_init(); in do_scale_vcore()
452 if (pmic->gpio_en) in do_scale_vcore()
453 ret = gpio_request(pmic->gpio, "PMIC_GPIO"); in do_scale_vcore()
457 pmic->gpio, ret); in do_scale_vcore()
462 if (pmic->gpio_en) in do_scale_vcore()
463 gpio_direction_output(pmic->gpio, 0); in do_scale_vcore()
468 offset_code = get_offset_code(offset, pmic); in do_scale_vcore()
473 if (pmic->pmic_write(pmic->i2c_slave_addr, vcore_reg, offset_code)) in do_scale_vcore()
475 if (pmic->gpio_en) in do_scale_vcore()
476 gpio_direction_output(pmic->gpio, 1); in do_scale_vcore()
564 (pv->pmic->i2c_slave_addr == in scale_vcores()
565 px->pmic->i2c_slave_addr) && in scale_vcores()
584 vcores->core.pmic); in scale_vcores()
598 vcores->mpu.pmic); in scale_vcores()
611 vcores->mm.pmic); in scale_vcores()
624 vcores->gpu.pmic); in scale_vcores()
637 vcores->eve.pmic); in scale_vcores()
650 vcores->iva.pmic); in scale_vcores()