Lines Matching refs:cinfo

307 	const struct mtk_pmic_auxadc_info *cinfo = adc_dev->chip_info;  in mt6358_stop_imp_conv()  local
310 regmap_set_bits(regmap, cinfo->regs[PMIC_AUXADC_IMP0], MT6358_IMP0_CLEAR); in mt6358_stop_imp_conv()
311 regmap_clear_bits(regmap, cinfo->regs[PMIC_AUXADC_IMP0], MT6358_IMP0_CLEAR); in mt6358_stop_imp_conv()
312 regmap_clear_bits(regmap, cinfo->regs[PMIC_AUXADC_IMP1], MT6358_IMP1_AUTOREPEAT_EN); in mt6358_stop_imp_conv()
313 regmap_clear_bits(regmap, cinfo->regs[PMIC_AUXADC_DCM_CON], MT6358_DCM_CK_SW_EN); in mt6358_stop_imp_conv()
318 const struct mtk_pmic_auxadc_info *cinfo = adc_dev->chip_info; in mt6358_start_imp_conv() local
323 regmap_set_bits(regmap, cinfo->regs[PMIC_AUXADC_DCM_CON], MT6358_DCM_CK_SW_EN); in mt6358_start_imp_conv()
324 regmap_set_bits(regmap, cinfo->regs[PMIC_AUXADC_IMP1], MT6358_IMP1_AUTOREPEAT_EN); in mt6358_start_imp_conv()
326 ret = regmap_read_poll_timeout(adc_dev->regmap, cinfo->regs[PMIC_AUXADC_IMP0], in mt6358_start_imp_conv()
339 const struct mtk_pmic_auxadc_info *cinfo = adc_dev->chip_info; in mt6358_read_imp() local
341 u16 reg_adc0 = cinfo->regs[PMIC_AUXADC_ADC0]; in mt6358_read_imp()
350 regmap_read(regmap, reg_adc0 + (cinfo->imp_adc_num << 1), &val_v); in mt6358_read_imp()
364 const struct mtk_pmic_auxadc_info *cinfo = adc_dev->chip_info; in mt6359_read_imp() local
370 regmap_write(regmap, cinfo->regs[PMIC_AUXADC_IMP0], MT6359_IMP0_CONV_EN); in mt6359_read_imp()
371 ret = regmap_read_poll_timeout(regmap, cinfo->regs[PMIC_AUXADC_IMP1], in mt6359_read_imp()
376 regmap_write(regmap, cinfo->regs[PMIC_AUXADC_IMP0], 0); in mt6359_read_imp()
383 ret = regmap_read(regmap, cinfo->regs[PMIC_AUXADC_IMP3], &val_v); in mt6359_read_imp()
387 ret = regmap_read(regmap, cinfo->regs[PMIC_FGADC_R_CON0], &val_i); in mt6359_read_imp()
431 const struct mtk_pmic_auxadc_info *cinfo = adc_dev->chip_info; in mt6359_auxadc_reset() local
435 if (cinfo->sec_unlock_key) in mt6359_auxadc_reset()
436 regmap_write(regmap, cinfo->regs[PMIC_HK_TOP_WKEY], cinfo->sec_unlock_key); in mt6359_auxadc_reset()
439 regmap_set_bits(regmap, cinfo->regs[PMIC_HK_TOP_RST_CON0], PMIC_RG_RESET_VAL); in mt6359_auxadc_reset()
442 regmap_clear_bits(regmap, cinfo->regs[PMIC_HK_TOP_RST_CON0], PMIC_RG_RESET_VAL); in mt6359_auxadc_reset()
445 if (cinfo->sec_unlock_key) in mt6359_auxadc_reset()
446 regmap_write(regmap, cinfo->regs[PMIC_HK_TOP_WKEY], 0); in mt6359_auxadc_reset()
452 const struct mtk_pmic_auxadc_info *cinfo = adc_dev->chip_info; in mt6359_auxadc_read_adc() local
453 const struct mtk_pmic_auxadc_chan *desc = &cinfo->desc[chan->scan_index]; in mt6359_auxadc_read_adc()
459 ret = regmap_write(regmap, cinfo->regs[desc->req_idx], desc->req_mask); in mt6359_auxadc_read_adc()
467 cinfo->regs[PMIC_AUXADC_ADC0] + (chan->address << 1), in mt6359_auxadc_read_adc()
474 regmap_write(regmap, cinfo->regs[desc->req_idx], 0); in mt6359_auxadc_read_adc()
491 const struct mtk_pmic_auxadc_info *cinfo = adc_dev->chip_info; in mt6359_auxadc_read_raw() local
492 const struct mtk_pmic_auxadc_chan *desc = &cinfo->desc[chan->scan_index]; in mt6359_auxadc_read_raw()