diff options
author | Abhijeet Dharmapurikar <adharmap@codeaurora.org> | 2017-01-06 12:16:49 -0800 |
---|---|---|
committer | Abhijeet Dharmapurikar <adharmap@codeaurora.org> | 2017-01-20 13:04:46 -0800 |
commit | c9f6c20965e14ace70525132e5799f0fd12a9f03 (patch) | |
tree | 1e5854d5aaa54e083d20322c5ea588d852103433 /drivers/power | |
parent | fdddc49ef25b6efe57e7a6e15b59dfb253dc496b (diff) |
qcom-charger: smb138x: Add MODEL_NAME property for parallel
Currently there is no easy way to detect the device name based on
the bus or device sysfs properties.
Implement MODEL_NAME property to identify the parallel charger.
Change-Id: I8134b415a2b36e249b098f4b61d4dd8415008cfa
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Diffstat (limited to 'drivers/power')
-rw-r--r-- | drivers/power/supply/qcom/smb138x-charger.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/power/supply/qcom/smb138x-charger.c b/drivers/power/supply/qcom/smb138x-charger.c index 70d935e9d1df..ed76a585ed03 100644 --- a/drivers/power/supply/qcom/smb138x-charger.c +++ b/drivers/power/supply/qcom/smb138x-charger.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 The Linux Foundation. All rights reserved. +/* Copyright (c) 2016-2017 The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -410,6 +410,7 @@ static enum power_supply_property smb138x_parallel_props[] = { POWER_SUPPLY_PROP_CURRENT_NOW, POWER_SUPPLY_PROP_CHARGER_TEMP, POWER_SUPPLY_PROP_CHARGER_TEMP_MAX, + POWER_SUPPLY_PROP_MODEL_NAME, }; static int smb138x_parallel_get_prop(struct power_supply *psy, @@ -456,6 +457,9 @@ static int smb138x_parallel_get_prop(struct power_supply *psy, case POWER_SUPPLY_PROP_CHARGER_TEMP_MAX: rc = smblib_get_prop_charger_temp_max(chg, val); break; + case POWER_SUPPLY_PROP_MODEL_NAME: + val->strval = "smb138x"; + break; default: pr_err("parallel power supply get prop %d not supported\n", prop); |