Lines Matching refs:pbi
19 struct pmu_battery_info *pbi; member
68 static char *pmu_bat_get_model_name(struct pmu_battery_info *pbi) in pmu_bat_get_model_name() argument
70 switch (pbi->flags & PMU_BATT_TYPE_MASK) { in pmu_bat_get_model_name()
87 struct pmu_battery_info *pbi = pbat->pbi; in pmu_bat_get_property() local
91 if (pbi->flags & PMU_BATT_CHARGING) in pmu_bat_get_property()
99 val->intval = !!(pbi->flags & PMU_BATT_PRESENT); in pmu_bat_get_property()
102 val->strval = pmu_bat_get_model_name(pbi); in pmu_bat_get_property()
105 val->intval = pbi->charge * 1000; /* mWh -> µWh */ in pmu_bat_get_property()
108 val->intval = pbi->max_charge * 1000; /* mWh -> µWh */ in pmu_bat_get_property()
111 val->intval = pbi->amperage * 1000; /* mA -> µA */ in pmu_bat_get_property()
114 val->intval = pbi->voltage * 1000; /* mV -> µV */ in pmu_bat_get_property()
117 val->intval = pbi->time_remaining; in pmu_bat_get_property()
173 pbat->pbi = &pmu_batteries[i]; in pmu_bat_init()