Lines Matching refs:ab8500_fg

158  * struct ab8500_fg - ab8500 FG device information
200 struct ab8500_fg {
249 struct ab8500_fg *ab8500_fg_get(void)
251 return list_first_entry_or_null(&ab8500_fg_list, struct ab8500_fg,
359 * @di: pointer to the ab8500_fg structure
364 static int ab8500_fg_is_low_curr(struct ab8500_fg *di, int curr_ua)
377 * @di: pointer to the ab8500_fg structure
383 static int ab8500_fg_add_cap_sample(struct ab8500_fg *di, int sample)
413 * @di: pointer to the ab8500_fg structure
417 static void ab8500_fg_clear_cap_samples(struct ab8500_fg *di)
435 * @di: pointer to the ab8500_fg structure
440 static void ab8500_fg_fill_cap_sample(struct ab8500_fg *di, int sample)
461 * @di: pointer to the ab8500_fg structure
467 static int ab8500_fg_coulomb_counter(struct ab8500_fg *di, bool enable)
530 * @di: pointer to the ab8500_fg structure
536 int ab8500_fg_inst_curr_start(struct ab8500_fg *di)
584 * @di: pointer to the ab8500_fg structure
588 int ab8500_fg_inst_curr_started(struct ab8500_fg *di)
595 * @di: pointer to the ab8500_fg structure
599 int ab8500_fg_inst_curr_done(struct ab8500_fg *di)
606 * @di: pointer to the ab8500_fg structure
613 int ab8500_fg_inst_curr_finalize(struct ab8500_fg *di, int *curr_ua)
703 * @di: pointer to the ab8500_fg structure
708 int ab8500_fg_inst_curr_blocking(struct ab8500_fg *di)
762 struct ab8500_fg *di = container_of(work,
763 struct ab8500_fg, fg_acc_cur_work);
827 * @di: pointer to the ab8500_fg structure
831 static int ab8500_fg_bat_voltage(struct ab8500_fg *di)
852 * @di: pointer to the ab8500_fg structure
857 static int ab8500_fg_volt_to_capacity(struct ab8500_fg *di, int voltage_uv)
867 * @di: pointer to the ab8500_fg structure
872 static int ab8500_fg_uncomp_volt_to_capacity(struct ab8500_fg *di)
880 * @di: pointer to the ab8500_fg structure
887 static int ab8500_fg_battery_resistance(struct ab8500_fg *di, int vbat_uncomp_uv)
930 * @di: pointer to the ab8500_fg structure
937 static int ab8500_load_comp_fg_bat_voltage(struct ab8500_fg *di, bool always)
984 * @di: pointer to the ab8500_fg structure
989 static int ab8500_fg_load_comp_volt_to_capacity(struct ab8500_fg *di)
1000 * @di: pointer to the ab8500_fg structure
1005 static int ab8500_fg_convert_mah_to_permille(struct ab8500_fg *di, int cap_mah)
1012 * @di: pointer to the ab8500_fg structure
1017 static int ab8500_fg_convert_permille_to_mah(struct ab8500_fg *di, int cap_pm)
1024 * @di: pointer to the ab8500_fg structure
1029 static int ab8500_fg_convert_mah_to_uwh(struct ab8500_fg *di, int cap_mah)
1051 * @di: pointer to the ab8500_fg structure
1056 static int ab8500_fg_calc_cap_charging(struct ab8500_fg *di)
1090 * @di: pointer to the ab8500_fg structure
1096 static int ab8500_fg_calc_cap_discharge_voltage(struct ab8500_fg *di)
1113 * @di: pointer to the ab8500_fg structure
1119 static int ab8500_fg_calc_cap_discharge_fg(struct ab8500_fg *di)
1166 * @di: pointer to the ab8500_fg structure
1170 static int ab8500_fg_capacity_level(struct ab8500_fg *di)
1193 * @di: pointer to the ab8500_fg structure
1199 static int ab8500_fg_calculate_scaled_capacity(struct ab8500_fg *di)
1252 * @di: pointer to the ab8500_fg structure
1257 static void ab8500_fg_update_cap_scalers(struct ab8500_fg *di)
1286 * @di: pointer to the ab8500_fg structure
1292 static void ab8500_fg_check_capacity_limits(struct ab8500_fg *di, bool init)
1414 static void ab8500_fg_charge_state_to(struct ab8500_fg *di,
1426 static void ab8500_fg_discharge_state_to(struct ab8500_fg *di,
1440 * @di: pointer to the ab8500_fg structure
1444 static void ab8500_fg_algorithm_charging(struct ab8500_fg *di)
1492 static void force_capacity(struct ab8500_fg *di)
1509 static bool check_sysfs_capacity(struct ab8500_fg *di)
1544 * @di: pointer to the ab8500_fg structure
1548 static void ab8500_fg_algorithm_discharging(struct ab8500_fg *di)
1713 * @di: pointer to the ab8500_fg structure
1716 static void ab8500_fg_algorithm_calibrate(struct ab8500_fg *di)
1764 * @di: pointer to the ab8500_fg structure
1768 static void ab8500_fg_algorithm(struct ab8500_fg *di)
1808 struct ab8500_fg *di = container_of(work, struct ab8500_fg,
1846 struct ab8500_fg *di = container_of(work, struct ab8500_fg,
1886 struct ab8500_fg *di = container_of(work, struct ab8500_fg,
1921 * @di: pointer to the ab8500_fg structure
1928 static int ab8500_fg_battok_calc(struct ab8500_fg *di, int target)
1940 * @di: pointer to the ab8500_fg structure
1944 static int ab8500_fg_battok_init_hw_register(struct ab8500_fg *di)
1988 struct ab8500_fg *di = container_of(work, struct ab8500_fg, fg_work);
1996 * @_di: pointer to the ab8500_fg structure
2002 struct ab8500_fg *di = _di;
2016 * @_di: pointer to the ab8500_fg structure
2022 struct ab8500_fg *di = _di;
2031 * @_di: pointer to the ab8500_fg structure
2037 struct ab8500_fg *di = _di;
2047 * @_di: pointer to the ab8500_fg structure
2053 struct ab8500_fg *di = _di;
2066 * @_di: pointer to the ab8500_fg structure
2072 struct ab8500_fg *di = _di;
2110 struct ab8500_fg *di = power_supply_get_drvdata(psy);
2187 struct ab8500_fg *di;
2299 * @di: pointer to the ab8500_fg structure
2303 static int ab8500_fg_init_hw_registers(struct ab8500_fg *di)
2424 struct ab8500_fg *di = container_of(work, struct ab8500_fg,
2448 ssize_t (*show)(struct ab8500_fg *, char *);
2449 ssize_t (*store)(struct ab8500_fg *, const char *, size_t);
2452 static ssize_t charge_full_show(struct ab8500_fg *di, char *buf)
2457 static ssize_t charge_full_store(struct ab8500_fg *di, const char *buf,
2471 static ssize_t charge_now_show(struct ab8500_fg *di, char *buf)
2476 static ssize_t charge_now_store(struct ab8500_fg *di, const char *buf,
2502 struct ab8500_fg *di;
2505 di = container_of(kobj, struct ab8500_fg, fg_kobject);
2517 struct ab8500_fg *di;
2520 di = container_of(kobj, struct ab8500_fg, fg_kobject);
2538 ATTRIBUTE_GROUPS(ab8500_fg);
2551 static void ab8500_fg_sysfs_exit(struct ab8500_fg *di)
2563 static int ab8500_fg_sysfs_init(struct ab8500_fg *di)
2585 struct ab8500_fg *di = power_supply_get_drvdata(psy);
2608 struct ab8500_fg *di = power_supply_get_drvdata(psy);
2635 struct ab8500_fg *di = power_supply_get_drvdata(psy);
2659 struct ab8500_fg *di = power_supply_get_drvdata(psy);
2686 struct ab8500_fg *di = power_supply_get_drvdata(psy);
2709 struct ab8500_fg *di = power_supply_get_drvdata(psy);
2737 struct ab8500_fg *di = power_supply_get_drvdata(psy);
2760 struct ab8500_fg *di = power_supply_get_drvdata(psy);
2783 struct ab8500_fg *di = power_supply_get_drvdata(psy);
2804 struct ab8500_fg *di = power_supply_get_drvdata(psy);
2832 struct ab8500_fg *di = power_supply_get_drvdata(psy);
2855 struct ab8500_fg *di = power_supply_get_drvdata(psy);
2878 struct ab8500_fg *di = power_supply_get_drvdata(psy);
2905 struct ab8500_fg *di = power_supply_get_drvdata(psy);
2940 static int ab8500_fg_sysfs_psy_create_attrs(struct ab8500_fg *di)
2960 static void ab8500_fg_sysfs_psy_remove_attrs(struct ab8500_fg *di)
2975 struct ab8500_fg *di = dev_get_drvdata(dev);
2991 struct ab8500_fg *di = dev_get_drvdata(dev);
3025 .name = "ab8500_fg",
3036 struct ab8500_fg *di = dev_get_drvdata(dev);
3053 struct ab8500_fg *di = dev_get_drvdata(dev);
3073 struct ab8500_fg *di;
3232 struct ab8500_fg *di = platform_get_drvdata(pdev);