Loading drivers/power/supply/qcom/qpnp-smb5.c +3 −0 Original line number Diff line number Diff line Loading @@ -1289,6 +1289,9 @@ static int smb5_dc_get_prop(struct power_supply *psy, case POWER_SUPPLY_PROP_REAL_TYPE: val->intval = POWER_SUPPLY_TYPE_WIPOWER; break; case POWER_SUPPLY_PROP_INPUT_VOLTAGE_REGULATION: rc = smblib_get_prop_voltage_wls_output(chg, val); break; default: return -EINVAL; } Loading drivers/power/supply/qcom/smb5-lib.c +21 −0 Original line number Diff line number Diff line Loading @@ -2742,6 +2742,27 @@ static int smblib_process_thermal_readings(struct smb_charger *chg) * DC PSY GETTERS * *******************/ int smblib_get_prop_voltage_wls_output(struct smb_charger *chg, union power_supply_propval *val) { int rc; if (!chg->wls_psy) { chg->wls_psy = power_supply_get_by_name("wireless"); if (!chg->wls_psy) return -ENODEV; } rc = power_supply_get_property(chg->wls_psy, POWER_SUPPLY_PROP_INPUT_VOLTAGE_REGULATION, val); if (rc < 0) dev_err(chg->dev, "Couldn't get POWER_SUPPLY_PROP_VOLTAGE_REGULATION, rc=%d\n", rc); return rc; } int smblib_get_prop_dc_present(struct smb_charger *chg, union power_supply_propval *val) { Loading drivers/power/supply/qcom/smb5-lib.h +2 −0 Original line number Diff line number Diff line Loading @@ -627,6 +627,8 @@ int smblib_get_prop_dc_voltage_now(struct smb_charger *chg, union power_supply_propval *val); int smblib_get_prop_dc_voltage_max(struct smb_charger *chg, union power_supply_propval *val); int smblib_get_prop_voltage_wls_output(struct smb_charger *chg, union power_supply_propval *val); int smblib_set_prop_voltage_wls_output(struct smb_charger *chg, const union power_supply_propval *val); int smblib_get_prop_usb_present(struct smb_charger *chg, Loading Loading
drivers/power/supply/qcom/qpnp-smb5.c +3 −0 Original line number Diff line number Diff line Loading @@ -1289,6 +1289,9 @@ static int smb5_dc_get_prop(struct power_supply *psy, case POWER_SUPPLY_PROP_REAL_TYPE: val->intval = POWER_SUPPLY_TYPE_WIPOWER; break; case POWER_SUPPLY_PROP_INPUT_VOLTAGE_REGULATION: rc = smblib_get_prop_voltage_wls_output(chg, val); break; default: return -EINVAL; } Loading
drivers/power/supply/qcom/smb5-lib.c +21 −0 Original line number Diff line number Diff line Loading @@ -2742,6 +2742,27 @@ static int smblib_process_thermal_readings(struct smb_charger *chg) * DC PSY GETTERS * *******************/ int smblib_get_prop_voltage_wls_output(struct smb_charger *chg, union power_supply_propval *val) { int rc; if (!chg->wls_psy) { chg->wls_psy = power_supply_get_by_name("wireless"); if (!chg->wls_psy) return -ENODEV; } rc = power_supply_get_property(chg->wls_psy, POWER_SUPPLY_PROP_INPUT_VOLTAGE_REGULATION, val); if (rc < 0) dev_err(chg->dev, "Couldn't get POWER_SUPPLY_PROP_VOLTAGE_REGULATION, rc=%d\n", rc); return rc; } int smblib_get_prop_dc_present(struct smb_charger *chg, union power_supply_propval *val) { Loading
drivers/power/supply/qcom/smb5-lib.h +2 −0 Original line number Diff line number Diff line Loading @@ -627,6 +627,8 @@ int smblib_get_prop_dc_voltage_now(struct smb_charger *chg, union power_supply_propval *val); int smblib_get_prop_dc_voltage_max(struct smb_charger *chg, union power_supply_propval *val); int smblib_get_prop_voltage_wls_output(struct smb_charger *chg, union power_supply_propval *val); int smblib_set_prop_voltage_wls_output(struct smb_charger *chg, const union power_supply_propval *val); int smblib_get_prop_usb_present(struct smb_charger *chg, Loading