smb1351: add MODEL_NAME property in parallel power_supply

Add MODEL_NAME property in parallel psy to expose the model
information of parallel chip.

Change-Id: Ib02fa449696e52dc9e9f4ad7ee0b04e841129b95
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
This commit is contained in:
Ashay Jaiswal 2017-11-20 14:43:09 +05:30
parent 74a9c48a91
commit 50cd6e03ba

View file

@ -1417,6 +1417,7 @@ static enum power_supply_property smb1351_parallel_properties[] = {
POWER_SUPPLY_PROP_CHARGE_TYPE,
POWER_SUPPLY_PROP_PARALLEL_MODE,
POWER_SUPPLY_PROP_INPUT_SUSPEND,
POWER_SUPPLY_PROP_MODEL_NAME,
};
static int smb1351_parallel_set_chg_suspend(struct smb1351_charger *chip,
@ -1706,6 +1707,9 @@ static int smb1351_parallel_get_property(struct power_supply *psy,
case POWER_SUPPLY_PROP_INPUT_SUSPEND:
val->intval = chip->parallel_charger_suspended;
break;
case POWER_SUPPLY_PROP_MODEL_NAME:
val->strval = "smb1351";
break;
default:
return -EINVAL;
}