Lines Matching full:ab8500_fg
153 * struct ab8500_fg - ab8500 FG device information
195 struct ab8500_fg { struct
244 struct ab8500_fg *ab8500_fg_get(void) in ab8500_fg_get() argument
246 return list_first_entry_or_null(&ab8500_fg_list, struct ab8500_fg, in ab8500_fg_get()
354 * @di: pointer to the ab8500_fg structure
359 static int ab8500_fg_is_low_curr(struct ab8500_fg *di, int curr_ua) in ab8500_fg_is_low_curr()
372 * @di: pointer to the ab8500_fg structure
378 static int ab8500_fg_add_cap_sample(struct ab8500_fg *di, int sample) in ab8500_fg_add_cap_sample()
408 * @di: pointer to the ab8500_fg structure
412 static void ab8500_fg_clear_cap_samples(struct ab8500_fg *di) in ab8500_fg_clear_cap_samples()
430 * @di: pointer to the ab8500_fg structure
435 static void ab8500_fg_fill_cap_sample(struct ab8500_fg *di, int sample) in ab8500_fg_fill_cap_sample()
456 * @di: pointer to the ab8500_fg structure
462 static int ab8500_fg_coulomb_counter(struct ab8500_fg *di, bool enable) in ab8500_fg_coulomb_counter()
525 * @di: pointer to the ab8500_fg structure
531 int ab8500_fg_inst_curr_start(struct ab8500_fg *di) in ab8500_fg_inst_curr_start()
579 * @di: pointer to the ab8500_fg structure
583 int ab8500_fg_inst_curr_started(struct ab8500_fg *di) in ab8500_fg_inst_curr_started()
590 * @di: pointer to the ab8500_fg structure
594 int ab8500_fg_inst_curr_done(struct ab8500_fg *di) in ab8500_fg_inst_curr_done()
601 * @di: pointer to the ab8500_fg structure
608 int ab8500_fg_inst_curr_finalize(struct ab8500_fg *di, int *curr_ua) in ab8500_fg_inst_curr_finalize()
698 * @di: pointer to the ab8500_fg structure
703 int ab8500_fg_inst_curr_blocking(struct ab8500_fg *di) in ab8500_fg_inst_curr_blocking()
757 struct ab8500_fg *di = container_of(work, in ab8500_fg_acc_cur_work()
758 struct ab8500_fg, fg_acc_cur_work); in ab8500_fg_acc_cur_work()
822 * @di: pointer to the ab8500_fg structure
826 static int ab8500_fg_bat_voltage(struct ab8500_fg *di) in ab8500_fg_bat_voltage()
847 * @di: pointer to the ab8500_fg structure
852 static int ab8500_fg_volt_to_capacity(struct ab8500_fg *di, int voltage_uv) in ab8500_fg_volt_to_capacity()
862 * @di: pointer to the ab8500_fg structure
867 static int ab8500_fg_uncomp_volt_to_capacity(struct ab8500_fg *di) in ab8500_fg_uncomp_volt_to_capacity()
875 * @di: pointer to the ab8500_fg structure
882 static int ab8500_fg_battery_resistance(struct ab8500_fg *di, int vbat_uncomp_uv) in ab8500_fg_battery_resistance()
925 * @di: pointer to the ab8500_fg structure
932 static int ab8500_load_comp_fg_bat_voltage(struct ab8500_fg *di, bool always) in ab8500_load_comp_fg_bat_voltage()
979 * @di: pointer to the ab8500_fg structure
984 static int ab8500_fg_load_comp_volt_to_capacity(struct ab8500_fg *di) in ab8500_fg_load_comp_volt_to_capacity()
995 * @di: pointer to the ab8500_fg structure
1000 static int ab8500_fg_convert_mah_to_permille(struct ab8500_fg *di, int cap_mah) in ab8500_fg_convert_mah_to_permille()
1007 * @di: pointer to the ab8500_fg structure
1012 static int ab8500_fg_convert_permille_to_mah(struct ab8500_fg *di, int cap_pm) in ab8500_fg_convert_permille_to_mah()
1019 * @di: pointer to the ab8500_fg structure
1024 static int ab8500_fg_convert_mah_to_uwh(struct ab8500_fg *di, int cap_mah) in ab8500_fg_convert_mah_to_uwh()
1046 * @di: pointer to the ab8500_fg structure
1051 static int ab8500_fg_calc_cap_charging(struct ab8500_fg *di) in ab8500_fg_calc_cap_charging()
1085 * @di: pointer to the ab8500_fg structure
1091 static int ab8500_fg_calc_cap_discharge_voltage(struct ab8500_fg *di) in ab8500_fg_calc_cap_discharge_voltage()
1108 * @di: pointer to the ab8500_fg structure
1114 static int ab8500_fg_calc_cap_discharge_fg(struct ab8500_fg *di) in ab8500_fg_calc_cap_discharge_fg()
1161 * @di: pointer to the ab8500_fg structure
1165 static int ab8500_fg_capacity_level(struct ab8500_fg *di) in ab8500_fg_capacity_level()
1188 * @di: pointer to the ab8500_fg structure
1194 static int ab8500_fg_calculate_scaled_capacity(struct ab8500_fg *di) in ab8500_fg_calculate_scaled_capacity()
1247 * @di: pointer to the ab8500_fg structure
1252 static void ab8500_fg_update_cap_scalers(struct ab8500_fg *di) in ab8500_fg_update_cap_scalers()
1281 * @di: pointer to the ab8500_fg structure
1287 static void ab8500_fg_check_capacity_limits(struct ab8500_fg *di, bool init) in ab8500_fg_check_capacity_limits()
1409 static void ab8500_fg_charge_state_to(struct ab8500_fg *di, in ab8500_fg_charge_state_to()
1421 static void ab8500_fg_discharge_state_to(struct ab8500_fg *di, in ab8500_fg_discharge_state_to()
1435 * @di: pointer to the ab8500_fg structure
1439 static void ab8500_fg_algorithm_charging(struct ab8500_fg *di) in ab8500_fg_algorithm_charging()
1487 static void force_capacity(struct ab8500_fg *di) in force_capacity()
1504 static bool check_sysfs_capacity(struct ab8500_fg *di) in check_sysfs_capacity()
1539 * @di: pointer to the ab8500_fg structure
1543 static void ab8500_fg_algorithm_discharging(struct ab8500_fg *di) in ab8500_fg_algorithm_discharging()
1708 * @di: pointer to the ab8500_fg structure
1711 static void ab8500_fg_algorithm_calibrate(struct ab8500_fg *di) in ab8500_fg_algorithm_calibrate()
1759 * @di: pointer to the ab8500_fg structure
1763 static void ab8500_fg_algorithm(struct ab8500_fg *di) in ab8500_fg_algorithm()
1803 struct ab8500_fg *di = container_of(work, struct ab8500_fg, in ab8500_fg_periodic_work()
1841 struct ab8500_fg *di = container_of(work, struct ab8500_fg, in ab8500_fg_check_hw_failure_work()
1881 struct ab8500_fg *di = container_of(work, struct ab8500_fg, in ab8500_fg_low_bat_work()
1916 * @di: pointer to the ab8500_fg structure
1923 static int ab8500_fg_battok_calc(struct ab8500_fg *di, int target) in ab8500_fg_battok_calc()
1935 * @di: pointer to the ab8500_fg structure
1939 static int ab8500_fg_battok_init_hw_register(struct ab8500_fg *di) in ab8500_fg_battok_init_hw_register()
1983 struct ab8500_fg *di = container_of(work, struct ab8500_fg, fg_work); in ab8500_fg_instant_work()
1991 * @_di: pointer to the ab8500_fg structure
1997 struct ab8500_fg *di = _di; in ab8500_fg_cc_data_end_handler()
2011 * @_di: pointer to the ab8500_fg structure
2017 struct ab8500_fg *di = _di; in ab8500_fg_cc_int_calib_handler()
2026 * @_di: pointer to the ab8500_fg structure
2032 struct ab8500_fg *di = _di; in ab8500_fg_cc_convend_handler()
2042 * @_di: pointer to the ab8500_fg structure
2048 struct ab8500_fg *di = _di; in ab8500_fg_batt_ovv_handler()
2061 * @_di: pointer to the ab8500_fg structure
2067 struct ab8500_fg *di = _di; in ab8500_fg_lowbatf_handler()
2105 struct ab8500_fg *di = power_supply_get_drvdata(psy); in ab8500_fg_get_property()
2182 struct ab8500_fg *di; in ab8500_fg_get_ext_psy_data()
2294 * @di: pointer to the ab8500_fg structure
2298 static int ab8500_fg_init_hw_registers(struct ab8500_fg *di) in ab8500_fg_init_hw_registers()
2418 struct ab8500_fg *di = container_of(work, struct ab8500_fg, in ab8500_fg_reinit_work()
2442 ssize_t (*show)(struct ab8500_fg *, char *);
2443 ssize_t (*store)(struct ab8500_fg *, const char *, size_t);
2446 static ssize_t charge_full_show(struct ab8500_fg *di, char *buf) in charge_full_show()
2451 static ssize_t charge_full_store(struct ab8500_fg *di, const char *buf, in charge_full_store()
2465 static ssize_t charge_now_show(struct ab8500_fg *di, char *buf) in charge_now_show()
2470 static ssize_t charge_now_store(struct ab8500_fg *di, const char *buf, in charge_now_store()
2496 struct ab8500_fg *di; in ab8500_fg_show()
2499 di = container_of(kobj, struct ab8500_fg, fg_kobject); in ab8500_fg_show()
2511 struct ab8500_fg *di; in ab8500_fg_store()
2514 di = container_of(kobj, struct ab8500_fg, fg_kobject); in ab8500_fg_store()
2532 ATTRIBUTE_GROUPS(ab8500_fg);
2545 static void ab8500_fg_sysfs_exit(struct ab8500_fg *di) in ab8500_fg_sysfs_exit()
2557 static int ab8500_fg_sysfs_init(struct ab8500_fg *di) in ab8500_fg_sysfs_init()
2579 struct ab8500_fg *di = power_supply_get_drvdata(psy); in ab8505_powercut_flagtime_read()
2602 struct ab8500_fg *di = power_supply_get_drvdata(psy); in ab8505_powercut_flagtime_write()
2629 struct ab8500_fg *di = power_supply_get_drvdata(psy); in ab8505_powercut_maxtime_read()
2653 struct ab8500_fg *di = power_supply_get_drvdata(psy); in ab8505_powercut_maxtime_write()
2680 struct ab8500_fg *di = power_supply_get_drvdata(psy); in ab8505_powercut_restart_read()
2703 struct ab8500_fg *di = power_supply_get_drvdata(psy); in ab8505_powercut_restart_write()
2731 struct ab8500_fg *di = power_supply_get_drvdata(psy); in ab8505_powercut_timer_read()
2754 struct ab8500_fg *di = power_supply_get_drvdata(psy); in ab8505_powercut_restart_counter_read()
2777 struct ab8500_fg *di = power_supply_get_drvdata(psy); in ab8505_powercut_read()
2798 struct ab8500_fg *di = power_supply_get_drvdata(psy); in ab8505_powercut_write()
2826 struct ab8500_fg *di = power_supply_get_drvdata(psy); in ab8505_powercut_flag_read()
2849 struct ab8500_fg *di = power_supply_get_drvdata(psy); in ab8505_powercut_debounce_read()
2872 struct ab8500_fg *di = power_supply_get_drvdata(psy); in ab8505_powercut_debounce_write()
2899 struct ab8500_fg *di = power_supply_get_drvdata(psy); in ab8505_powercut_enable_status_read()
2934 static int ab8500_fg_sysfs_psy_create_attrs(struct ab8500_fg *di) in ab8500_fg_sysfs_psy_create_attrs()
2954 static void ab8500_fg_sysfs_psy_remove_attrs(struct ab8500_fg *di) in ab8500_fg_sysfs_psy_remove_attrs()
2969 struct ab8500_fg *di = dev_get_drvdata(dev); in ab8500_fg_resume()
2985 struct ab8500_fg *di = dev_get_drvdata(dev); in ab8500_fg_suspend()
3019 .name = "ab8500_fg",
3030 struct ab8500_fg *di = dev_get_drvdata(dev); in ab8500_fg_bind()
3047 struct ab8500_fg *di = dev_get_drvdata(dev); in ab8500_fg_unbind()
3067 struct ab8500_fg *di; in ab8500_fg_probe()
3226 struct ab8500_fg *di = platform_get_drvdata(pdev); in ab8500_fg_remove()