Home
last modified time | relevance | path

Searched refs:cw_bat (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/power/supply/
H A Dcw2015_battery.c84 static int cw_read_word(struct cw_battery *cw_bat, u8 reg, u16 *val) in cw_read_word() argument
89 ret = regmap_bulk_read(cw_bat->regmap, reg, &value, sizeof(value)); in cw_read_word()
97 static int cw_update_profile(struct cw_battery *cw_bat) in cw_update_profile() argument
104 ret = regmap_read(cw_bat->regmap, CW2015_REG_MODE, &reg_val); in cw_update_profile()
110 dev_err(cw_bat->dev, in cw_update_profile()
116 ret = regmap_raw_write(cw_bat->regmap, CW2015_REG_BATINFO, in cw_update_profile()
117 cw_bat->bat_profile, in cw_update_profile()
125 reg_val |= CW2015_ATHD(cw_bat->alert_level); in cw_update_profile()
126 ret = regmap_write(cw_bat->regmap, CW2015_REG_CONFIG, reg_val); in cw_update_profile()
133 ret = regmap_write(cw_bat->regmap, CW2015_REG_MODE, reg_val); in cw_update_profile()
[all …]