Skip to content

Commit 925c066

Browse files
committed
power: supply: ln8411: Adds MODEL_NAME and MANUFACTURER properties
Reports IC model name and manufacturer to the appropriate power supply properties. Change-Id: Ied384688cc9ef376eedd5a8c182e852befd0de98 Signed-off-by: Ricardo Rivera-Matos <[email protected]>
1 parent 242db89 commit 925c066

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

drivers/power/supply/ln8411_charger.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1650,6 +1650,12 @@ static int ln8411_get_charger_property(struct power_supply *psy,
16501650
break;
16511651
case POWER_SUPPLY_PROP_HEALTH:
16521652
return ln8411_get_charger_health(ln8411, val);
1653+
case POWER_SUPPLY_PROP_MODEL_NAME:
1654+
val->strval = LN8411_MODEL_NAME;
1655+
break;
1656+
case POWER_SUPPLY_PROP_MANUFACTURER:
1657+
val->strval = LN8411_MANUFACTURER;
1658+
break;
16531659
default:
16541660
return -EINVAL;
16551661
}
@@ -1658,6 +1664,8 @@ static int ln8411_get_charger_property(struct power_supply *psy,
16581664
}
16591665

16601666
static enum power_supply_property ln8411_2nd_charger_props[] = {
1667+
POWER_SUPPLY_PROP_MODEL_NAME,
1668+
POWER_SUPPLY_PROP_MANUFACTURER,
16611669
POWER_SUPPLY_PROP_ONLINE,
16621670
POWER_SUPPLY_PROP_INPUT_CURRENT_LIMIT,
16631671
POWER_SUPPLY_PROP_CURRENT_NOW,
@@ -1668,6 +1676,8 @@ static enum power_supply_property ln8411_2nd_charger_props[] = {
16681676
};
16691677

16701678
static enum power_supply_property ln8411_charger_props[] = {
1679+
POWER_SUPPLY_PROP_MODEL_NAME,
1680+
POWER_SUPPLY_PROP_MANUFACTURER,
16711681
POWER_SUPPLY_PROP_ONLINE,
16721682
POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE_MAX,
16731683
POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT_MAX,

drivers/power/supply/ln8411_charger.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
#ifndef LN8411_CHARGER_H
1919
#define LN8411_CHARGER_H
2020

21-
#define LN8411_MANUFACTURER "Cirrus Logic"
22-
#define LN8411_MODEL_NAME "ln8411"
21+
#define LN8411_MANUFACTURER "Cirrus Logic, Inc."
22+
#define LN8411_MODEL_NAME "LN8411"
2323

2424
#define LN8411_REG_BITS 8
2525
#define LN8411_VAL_BITS 8

0 commit comments

Comments
 (0)