Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6179dd5c authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "smb138x-charger: expose charger temperature"

parents 55d84b4e 2e8f6559
Loading
Loading
Loading
Loading
+16 −0
Original line number Original line Diff line number Diff line
@@ -52,6 +52,22 @@ Charger specific properties:
  Value type: <u32>
  Value type: <u32>
  Definition: Specifies the DC input current limit in micro-amps.
  Definition: Specifies the DC input current limit in micro-amps.


- io-channels
  Usage:      optional
  Value type: List of <phandle u32>
  Definition: List of phandle and IIO specifier pairs, one pair
		for each IIO input to the device. Note: if the
		IIO provider specifies '0' for #io-channel-cells,
		then only the phandle portion of the pair will appear.

- io-channel-names
  Usage:      optional
  Value type: List of <string>
  Definition: List of IIO input name strings sorted in the same
		order as the io-channels property. Consumer drivers
		will use io-channel-names to match IIO input names
		with IIO specifiers.

================================================
================================================
Second Level Nodes - SMB138X Charger Peripherals
Second Level Nodes - SMB138X Charger Peripherals
================================================
================================================
+16 −0
Original line number Original line Diff line number Diff line
@@ -267,6 +267,8 @@ static enum power_supply_property smb138x_batt_props[] = {
	POWER_SUPPLY_PROP_PRESENT,
	POWER_SUPPLY_PROP_PRESENT,
	POWER_SUPPLY_PROP_CHARGE_TYPE,
	POWER_SUPPLY_PROP_CHARGE_TYPE,
	POWER_SUPPLY_PROP_CAPACITY,
	POWER_SUPPLY_PROP_CAPACITY,
	POWER_SUPPLY_PROP_CHARGER_TEMP,
	POWER_SUPPLY_PROP_CHARGER_TEMP_MAX,
};
};


static int smb138x_batt_get_prop(struct power_supply *psy,
static int smb138x_batt_get_prop(struct power_supply *psy,
@@ -296,6 +298,12 @@ static int smb138x_batt_get_prop(struct power_supply *psy,
	case POWER_SUPPLY_PROP_CAPACITY:
	case POWER_SUPPLY_PROP_CAPACITY:
		rc = smblib_get_prop_batt_capacity(chg, val);
		rc = smblib_get_prop_batt_capacity(chg, val);
		break;
		break;
	case POWER_SUPPLY_PROP_CHARGER_TEMP:
		rc = smblib_get_prop_charger_temp(chg, val);
		break;
	case POWER_SUPPLY_PROP_CHARGER_TEMP_MAX:
		rc = smblib_get_prop_charger_temp_max(chg, val);
		break;
	default:
	default:
		pr_err("batt power supply get prop %d not supported\n",
		pr_err("batt power supply get prop %d not supported\n",
			prop);
			prop);
@@ -381,6 +389,8 @@ static enum power_supply_property smb138x_parallel_props[] = {
	POWER_SUPPLY_PROP_INPUT_SUSPEND,
	POWER_SUPPLY_PROP_INPUT_SUSPEND,
	POWER_SUPPLY_PROP_VOLTAGE_MAX,
	POWER_SUPPLY_PROP_VOLTAGE_MAX,
	POWER_SUPPLY_PROP_CURRENT_MAX,
	POWER_SUPPLY_PROP_CURRENT_MAX,
	POWER_SUPPLY_PROP_CHARGER_TEMP,
	POWER_SUPPLY_PROP_CHARGER_TEMP_MAX,
};
};


static int smb138x_parallel_get_prop(struct power_supply *psy,
static int smb138x_parallel_get_prop(struct power_supply *psy,
@@ -415,6 +425,12 @@ static int smb138x_parallel_get_prop(struct power_supply *psy,
		rc = smblib_get_charge_param(chg, &chg->param.fcc,
		rc = smblib_get_charge_param(chg, &chg->param.fcc,
					     &val->intval);
					     &val->intval);
		break;
		break;
	case POWER_SUPPLY_PROP_CHARGER_TEMP:
		rc = smblib_get_prop_charger_temp(chg, val);
		break;
	case POWER_SUPPLY_PROP_CHARGER_TEMP_MAX:
		rc = smblib_get_prop_charger_temp_max(chg, val);
		break;
	default:
	default:
		pr_err("parallel power supply get prop %d not supported\n",
		pr_err("parallel power supply get prop %d not supported\n",
			prop);
			prop);