Loading drivers/power/supply/power_supply_sysfs.c +1 −0 Original line number Diff line number Diff line Loading @@ -397,6 +397,7 @@ static struct device_attribute power_supply_attrs[] = { POWER_SUPPLY_ATTR(dc_reset), POWER_SUPPLY_ATTR(scale_mode_en), POWER_SUPPLY_ATTR(voltage_max_limit), POWER_SUPPLY_ATTR(real_capacity), /* Charge pump properties */ POWER_SUPPLY_ATTR(cp_status1), POWER_SUPPLY_ATTR(cp_status2), Loading drivers/power/supply/qcom/qpnp-fg-gen4.c +9 −0 Original line number Diff line number Diff line Loading @@ -897,6 +897,11 @@ static int fg_gen4_get_prop_capacity(struct fg_dev *fg, int *val) return 0; } static int fg_gen4_get_prop_real_capacity(struct fg_dev *fg, int *val) { return fg_get_msoc(fg, val); } static int fg_gen4_get_prop_capacity_raw(struct fg_gen4_chip *chip, int *val) { struct fg_dev *fg = &chip->fg; Loading Loading @@ -4054,6 +4059,9 @@ static int fg_psy_get_property(struct power_supply *psy, case POWER_SUPPLY_PROP_CAPACITY: rc = fg_gen4_get_prop_capacity(fg, &pval->intval); break; case POWER_SUPPLY_PROP_REAL_CAPACITY: rc = fg_gen4_get_prop_real_capacity(fg, &pval->intval); break; case POWER_SUPPLY_PROP_CAPACITY_RAW: rc = fg_gen4_get_prop_capacity_raw(chip, &pval->intval); break; Loading Loading @@ -4297,6 +4305,7 @@ static int fg_property_is_writeable(struct power_supply *psy, static enum power_supply_property fg_psy_props[] = { POWER_SUPPLY_PROP_CAPACITY, POWER_SUPPLY_PROP_REAL_CAPACITY, POWER_SUPPLY_PROP_CAPACITY_RAW, POWER_SUPPLY_PROP_CC_SOC, POWER_SUPPLY_PROP_TEMP, Loading drivers/power/supply/qcom/qpnp-qg.c +13 −0 Original line number Diff line number Diff line Loading @@ -1547,6 +1547,15 @@ static int qg_get_battery_capacity(struct qpnp_qg *chip, int *soc) return 0; } static int qg_get_battery_capacity_real(struct qpnp_qg *chip, int *soc) { mutex_lock(&chip->soc_lock); *soc = chip->msoc; mutex_unlock(&chip->soc_lock); return 0; } static int qg_get_charge_counter(struct qpnp_qg *chip, int *charge_counter) { int rc, cc_soc = 0; Loading Loading @@ -1800,6 +1809,9 @@ static int qg_psy_get_property(struct power_supply *psy, case POWER_SUPPLY_PROP_CAPACITY: rc = qg_get_battery_capacity(chip, &pval->intval); break; case POWER_SUPPLY_PROP_REAL_CAPACITY: rc = qg_get_battery_capacity_real(chip, &pval->intval); break; case POWER_SUPPLY_PROP_VOLTAGE_NOW: rc = qg_get_battery_voltage(chip, &pval->intval); break; Loading Loading @@ -1920,6 +1932,7 @@ static int qg_property_is_writeable(struct power_supply *psy, static enum power_supply_property qg_psy_props[] = { POWER_SUPPLY_PROP_CAPACITY, POWER_SUPPLY_PROP_REAL_CAPACITY, POWER_SUPPLY_PROP_TEMP, POWER_SUPPLY_PROP_VOLTAGE_NOW, POWER_SUPPLY_PROP_VOLTAGE_OCV, Loading include/linux/power_supply.h +1 −0 Original line number Diff line number Diff line Loading @@ -328,6 +328,7 @@ enum power_supply_property { POWER_SUPPLY_PROP_DC_RESET, POWER_SUPPLY_PROP_SCALE_MODE_EN, POWER_SUPPLY_PROP_VOLTAGE_MAX_LIMIT, POWER_SUPPLY_PROP_REAL_CAPACITY, /* Charge pump properties */ POWER_SUPPLY_PROP_CP_STATUS1, POWER_SUPPLY_PROP_CP_STATUS2, Loading Loading
drivers/power/supply/power_supply_sysfs.c +1 −0 Original line number Diff line number Diff line Loading @@ -397,6 +397,7 @@ static struct device_attribute power_supply_attrs[] = { POWER_SUPPLY_ATTR(dc_reset), POWER_SUPPLY_ATTR(scale_mode_en), POWER_SUPPLY_ATTR(voltage_max_limit), POWER_SUPPLY_ATTR(real_capacity), /* Charge pump properties */ POWER_SUPPLY_ATTR(cp_status1), POWER_SUPPLY_ATTR(cp_status2), Loading
drivers/power/supply/qcom/qpnp-fg-gen4.c +9 −0 Original line number Diff line number Diff line Loading @@ -897,6 +897,11 @@ static int fg_gen4_get_prop_capacity(struct fg_dev *fg, int *val) return 0; } static int fg_gen4_get_prop_real_capacity(struct fg_dev *fg, int *val) { return fg_get_msoc(fg, val); } static int fg_gen4_get_prop_capacity_raw(struct fg_gen4_chip *chip, int *val) { struct fg_dev *fg = &chip->fg; Loading Loading @@ -4054,6 +4059,9 @@ static int fg_psy_get_property(struct power_supply *psy, case POWER_SUPPLY_PROP_CAPACITY: rc = fg_gen4_get_prop_capacity(fg, &pval->intval); break; case POWER_SUPPLY_PROP_REAL_CAPACITY: rc = fg_gen4_get_prop_real_capacity(fg, &pval->intval); break; case POWER_SUPPLY_PROP_CAPACITY_RAW: rc = fg_gen4_get_prop_capacity_raw(chip, &pval->intval); break; Loading Loading @@ -4297,6 +4305,7 @@ static int fg_property_is_writeable(struct power_supply *psy, static enum power_supply_property fg_psy_props[] = { POWER_SUPPLY_PROP_CAPACITY, POWER_SUPPLY_PROP_REAL_CAPACITY, POWER_SUPPLY_PROP_CAPACITY_RAW, POWER_SUPPLY_PROP_CC_SOC, POWER_SUPPLY_PROP_TEMP, Loading
drivers/power/supply/qcom/qpnp-qg.c +13 −0 Original line number Diff line number Diff line Loading @@ -1547,6 +1547,15 @@ static int qg_get_battery_capacity(struct qpnp_qg *chip, int *soc) return 0; } static int qg_get_battery_capacity_real(struct qpnp_qg *chip, int *soc) { mutex_lock(&chip->soc_lock); *soc = chip->msoc; mutex_unlock(&chip->soc_lock); return 0; } static int qg_get_charge_counter(struct qpnp_qg *chip, int *charge_counter) { int rc, cc_soc = 0; Loading Loading @@ -1800,6 +1809,9 @@ static int qg_psy_get_property(struct power_supply *psy, case POWER_SUPPLY_PROP_CAPACITY: rc = qg_get_battery_capacity(chip, &pval->intval); break; case POWER_SUPPLY_PROP_REAL_CAPACITY: rc = qg_get_battery_capacity_real(chip, &pval->intval); break; case POWER_SUPPLY_PROP_VOLTAGE_NOW: rc = qg_get_battery_voltage(chip, &pval->intval); break; Loading Loading @@ -1920,6 +1932,7 @@ static int qg_property_is_writeable(struct power_supply *psy, static enum power_supply_property qg_psy_props[] = { POWER_SUPPLY_PROP_CAPACITY, POWER_SUPPLY_PROP_REAL_CAPACITY, POWER_SUPPLY_PROP_TEMP, POWER_SUPPLY_PROP_VOLTAGE_NOW, POWER_SUPPLY_PROP_VOLTAGE_OCV, Loading
include/linux/power_supply.h +1 −0 Original line number Diff line number Diff line Loading @@ -328,6 +328,7 @@ enum power_supply_property { POWER_SUPPLY_PROP_DC_RESET, POWER_SUPPLY_PROP_SCALE_MODE_EN, POWER_SUPPLY_PROP_VOLTAGE_MAX_LIMIT, POWER_SUPPLY_PROP_REAL_CAPACITY, /* Charge pump properties */ POWER_SUPPLY_PROP_CP_STATUS1, POWER_SUPPLY_PROP_CP_STATUS2, Loading