Lines Matching refs:pbat
86 struct pmu_battery_dev *pbat = to_pmu_battery_dev(psy); in pmu_bat_get_property() local
87 struct pmu_battery_info *pbi = pbat->pbi; in pmu_bat_get_property()
163 struct pmu_battery_dev *pbat = kzalloc(sizeof(*pbat), in pmu_bat_init() local
165 if (!pbat) in pmu_bat_init()
168 sprintf(pbat->name, "PMU_battery_%d", i); in pmu_bat_init()
169 pbat->bat_desc.name = pbat->name; in pmu_bat_init()
170 pbat->bat_desc.properties = pmu_bat_props; in pmu_bat_init()
171 pbat->bat_desc.num_properties = ARRAY_SIZE(pmu_bat_props); in pmu_bat_init()
172 pbat->bat_desc.get_property = pmu_bat_get_property; in pmu_bat_init()
173 pbat->pbi = &pmu_batteries[i]; in pmu_bat_init()
174 psy_cfg.drv_data = pbat; in pmu_bat_init()
176 pbat->bat = power_supply_register(&bat_pdev->dev, in pmu_bat_init()
177 &pbat->bat_desc, in pmu_bat_init()
179 if (IS_ERR(pbat->bat)) { in pmu_bat_init()
180 ret = PTR_ERR(pbat->bat); in pmu_bat_init()
181 kfree(pbat); in pmu_bat_init()
184 pbats[i] = pbat; in pmu_bat_init()