Lines Matching full:battery
24 struct rt5033_battery *battery = i2c_get_clientdata(client); in rt5033_battery_get_status() local
28 ret = power_supply_get_property_from_supplier(battery->psy, in rt5033_battery_get_status()
39 struct rt5033_battery *battery = i2c_get_clientdata(client); in rt5033_battery_get_capacity() local
42 regmap_read(battery->regmap, RT5033_FUEL_REG_SOC_H, &msb); in rt5033_battery_get_capacity()
49 struct rt5033_battery *battery = i2c_get_clientdata(client); in rt5033_battery_get_present() local
52 regmap_read(battery->regmap, RT5033_FUEL_REG_CONFIG_L, &val); in rt5033_battery_get_present()
60 struct rt5033_battery *battery = i2c_get_clientdata(client); in rt5033_battery_get_watt_prop() local
82 regmap_read(battery->regmap, regh, &msb); in rt5033_battery_get_watt_prop()
83 regmap_read(battery->regmap, regl, &lsb); in rt5033_battery_get_watt_prop()
94 struct rt5033_battery *battery = power_supply_get_drvdata(psy); in rt5033_battery_get_property() local
100 val->intval = rt5033_battery_get_watt_prop(battery->client, in rt5033_battery_get_property()
104 val->intval = rt5033_battery_get_present(battery->client); in rt5033_battery_get_property()
107 val->intval = rt5033_battery_get_capacity(battery->client); in rt5033_battery_get_property()
110 val->intval = rt5033_battery_get_status(battery->client); in rt5033_battery_get_property()
134 .name = "rt5033-battery",
145 struct rt5033_battery *battery; in rt5033_battery_probe() local
150 battery = devm_kzalloc(&client->dev, sizeof(*battery), GFP_KERNEL); in rt5033_battery_probe()
151 if (!battery) in rt5033_battery_probe()
154 battery->client = client; in rt5033_battery_probe()
155 battery->regmap = devm_regmap_init_i2c(client, in rt5033_battery_probe()
157 if (IS_ERR(battery->regmap)) { in rt5033_battery_probe()
162 i2c_set_clientdata(client, battery); in rt5033_battery_probe()
164 psy_cfg.drv_data = battery; in rt5033_battery_probe()
166 battery->psy = devm_power_supply_register(&client->dev, in rt5033_battery_probe()
169 if (IS_ERR(battery->psy)) in rt5033_battery_probe()
170 return dev_err_probe(&client->dev, PTR_ERR(battery->psy), in rt5033_battery_probe()
177 { "rt5033-battery", },
183 { .compatible = "richtek,rt5033-battery", },
190 .name = "rt5033-battery",