Lines Matching refs:rk808

50 	struct rk808 *rk808;  member
177 regmap_bulk_read(charger->rk808->regmap, RK817_GAS_GAUGE_VCALIB0_H, in rk817_bat_calib_vol()
181 regmap_bulk_read(charger->rk808->regmap, RK817_GAS_GAUGE_VCALIB1_H, in rk817_bat_calib_vol()
196 regmap_bulk_read(charger->rk808->regmap, RK817_GAS_GAUGE_IOFFSET_H, in rk817_bat_calib_cur()
198 regmap_bulk_write(charger->rk808->regmap, RK817_GAS_GAUGE_CAL_OFFSET_H, in rk817_bat_calib_cur()
216 ret = regmap_bulk_write(charger->rk808->regmap, RK817_GAS_GAUGE_BAT_R1, in rk817_record_battery_nvram_values()
226 ret = regmap_bulk_write(charger->rk808->regmap, RK817_GAS_GAUGE_DATA0, in rk817_record_battery_nvram_values()
232 ret = regmap_bulk_write(charger->rk808->regmap, RK817_GAS_GAUGE_DATA3, in rk817_record_battery_nvram_values()
242 struct rk808 *rk808 = charger->rk808; in rk817_bat_calib_cap() local
264 regmap_bulk_write(rk808->regmap, RK817_GAS_GAUGE_Q_INIT_H3, in rk817_bat_calib_cap()
278 regmap_bulk_read(rk808->regmap, RK817_GAS_GAUGE_Q_PRES_H3, in rk817_bat_calib_cap()
301 regmap_bulk_write(rk808->regmap, in rk817_bat_calib_cap()
315 regmap_bulk_read(charger->rk808->regmap, RK817_GAS_GAUGE_BAT_VOL_H, in rk817_bat_calib_cap()
321 regmap_bulk_read(rk808->regmap, RK817_GAS_GAUGE_Q_PRES_H3, in rk817_bat_calib_cap()
354 regmap_read(charger->rk808->regmap, RK817_GAS_GAUGE_ADC_CONFIG1, &reg); in rk817_read_props()
358 regmap_write_bits(charger->rk808->regmap, in rk817_read_props()
365 regmap_bulk_read(charger->rk808->regmap, RK817_GAS_GAUGE_Q_PRES_H3, in rk817_read_props()
378 regmap_bulk_read(charger->rk808->regmap, RK817_GAS_GAUGE_BAT_VOL_H, in rk817_read_props()
388 regmap_bulk_read(charger->rk808->regmap, RK817_GAS_GAUGE_BAT_CUR_H, in rk817_read_props()
398 regmap_read(charger->rk808->regmap, RK817_PMIC_CHRG_OUT, &reg); in rk817_read_props()
406 regmap_read(charger->rk808->regmap, RK817_PMIC_CHRG_OUT, &reg); in rk817_read_props()
411 regmap_read(charger->rk808->regmap, RK817_PMIC_CHRG_STS, &reg); in rk817_read_props()
415 regmap_read(charger->rk808->regmap, RK817_PMIC_CHRG_STS, &reg); in rk817_read_props()
430 regmap_bulk_read(charger->rk808->regmap, RK817_GAS_GAUGE_USB_VOL_H, in rk817_read_props()
602 struct rk808 *rk808; in rk817_plug_out_isr() local
605 rk808 = charger->rk808; in rk817_plug_out_isr()
616 regmap_write_bits(rk808->regmap, RK817_PMIC_CHRG_IN, in rk817_plug_out_isr()
618 regmap_write_bits(rk808->regmap, RK817_PMIC_CHRG_IN, RK817_USB_VLIM_EN, in rk817_plug_out_isr()
625 regmap_write_bits(rk808->regmap, RK817_PMIC_CHRG_IN, in rk817_plug_out_isr()
627 regmap_write_bits(rk808->regmap, RK817_PMIC_CHRG_IN, RK817_USB_ILIM_EN, in rk817_plug_out_isr()
691 ret = regmap_bulk_read(charger->rk808->regmap, in rk817_read_battery_nvram_values()
717 ret = regmap_bulk_read(charger->rk808->regmap, in rk817_read_battery_nvram_values()
732 struct rk808 *rk808 = charger->rk808; in rk817_read_or_set_full_charge_on_boot() local
742 ret = regmap_read(rk808->regmap, RK817_GAS_GAUGE_GG_STS, &reg); in rk817_read_or_set_full_charge_on_boot()
752 regmap_bulk_read(rk808->regmap, RK817_GAS_GAUGE_PWRON_VOL_H, in rk817_read_or_set_full_charge_on_boot()
774 regmap_write_bits(rk808->regmap, RK817_GAS_GAUGE_GG_STS, in rk817_read_or_set_full_charge_on_boot()
785 regmap_bulk_read(rk808->regmap, RK817_GAS_GAUGE_Q_PRES_H3, in rk817_read_or_set_full_charge_on_boot()
803 regmap_read(rk808->regmap, RK817_GAS_GAUGE_OFF_CNT, &off_time); in rk817_read_or_set_full_charge_on_boot()
805 regmap_bulk_read(rk808->regmap, in rk817_read_or_set_full_charge_on_boot()
821 regmap_bulk_read(rk808->regmap, RK817_GAS_GAUGE_PWRON_VOL_H, in rk817_read_or_set_full_charge_on_boot()
825 regmap_bulk_read(rk808->regmap, RK817_GAS_GAUGE_Q_PRES_H3, in rk817_read_or_set_full_charge_on_boot()
831 regmap_bulk_read(rk808->regmap, RK817_GAS_GAUGE_OCV_VOL_H, in rk817_read_or_set_full_charge_on_boot()
845 ret = regmap_bulk_write(rk808->regmap, RK817_GAS_GAUGE_Q_INIT_H3, in rk817_read_or_set_full_charge_on_boot()
854 ret = regmap_bulk_write(rk808->regmap, RK817_GAS_GAUGE_Q_MAX_H3, in rk817_read_or_set_full_charge_on_boot()
865 struct rk808 *rk808 = charger->rk808; in rk817_battery_init() local
872 regmap_read(rk808->regmap, RK817_SYS_STS, &tmp); in rk817_battery_init()
880 regmap_write(rk808->regmap, RK817_GAS_GAUGE_ADC_CONFIG0, 0xfc); in rk817_battery_init()
887 regmap_write(rk808->regmap, RK817_GAS_GAUGE_GG_CON, 0x04); in rk817_battery_init()
896 regmap_bulk_write(rk808->regmap, RK817_GAS_GAUGE_RELAX_THRE_H, in rk817_battery_init()
903 regmap_bulk_write(rk808->regmap, RK817_GAS_GAUGE_SLEEP_CON_SAMP_CUR_H, in rk817_battery_init()
907 regmap_write_bits(rk808->regmap, RK817_GAS_GAUGE_GG_STS, in rk817_battery_init()
914 regmap_write(rk808->regmap, RK817_GAS_GAUGE_OCV_THRE_VOL, 0xff); in rk817_battery_init()
969 ret = regmap_write_bits(rk808->regmap, RK817_PMIC_CHRG_OUT, in rk817_battery_init()
977 ret = regmap_write_bits(rk808->regmap, RK817_PMIC_CHRG_OUT, in rk817_battery_init()
986 regmap_write_bits(rk808->regmap, RK817_PMIC_CHRG_TERM, in rk817_battery_init()
1006 regmap_write_bits(rk808->regmap, RK817_PMIC_CHRG_TERM, in rk817_battery_init()
1017 regmap_write_bits(rk808->regmap, RK817_PMIC_CHRG_IN, in rk817_battery_init()
1019 regmap_write_bits(rk808->regmap, RK817_PMIC_CHRG_IN, RK817_USB_VLIM_EN, in rk817_battery_init()
1026 regmap_write_bits(rk808->regmap, RK817_PMIC_CHRG_IN, in rk817_battery_init()
1028 regmap_write_bits(rk808->regmap, RK817_PMIC_CHRG_IN, RK817_USB_ILIM_EN, in rk817_battery_init()
1048 struct rk808 *rk808 = dev_get_drvdata(pdev->dev.parent); in rk817_charger_probe() local
1068 charger->rk808 = rk808; in rk817_charger_probe()