diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-09-09 14:44:39 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-09-09 14:44:39 -0700 |
commit | 0ce5c79f384b9f730cf03a1e464673ae906e7c89 (patch) | |
tree | 138c18ff2e9f6a01d7eadbca4b73719c4030948a /drivers/power/supply/lp8788-charger.c | |
parent | 7151202b64c8c5eb163e41fa0adcb8239eea64aa (diff) | |
parent | 5d01fd38a3b01ca2112a689d70f7ecec40d952ee (diff) | |
download | linux-0ce5c79f384b9f730cf03a1e464673ae906e7c89.tar.bz2 |
Merge tag 'for-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply
Pull power supply and reset changes from Sebastian Reichel:
"New chip/feature support:
- bq27xxx: support updating battery config from DT
- bq24190: support loading battery charge info from DT
- LTC2941: add LTC2942/LTC2944 support
- max17042: add ACPI support
- max1721x: new driver
Misc:
- Move bq27xxx w1 driver from w1 into power-supply subsystem
- Introduce power_supply_set_input_current_limit_from_supplier
- constify stuff
- some minor fixes"
* tag 'for-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (39 commits)
power: supply: bq27xxx: enable writing capacity values for bq27421
power: supply: bq24190_charger: Get input_current_limit from our supplier
power: supply: bq24190_charger: Export 5V boost converter as regulator
power: supply: bq24190_charger: Add power_supply_battery_info support
power: supply: bq24190_charger: Add property system-minimum-microvolt
power: supply: bq24190_charger: Enable devicetree config
dt-bindings: power: supply: Add docs for TI BQ24190 battery charger
power: supply: bq27xxx: Remove duplicate chip data arrays
power: supply: bq27xxx: Enable data memory update for certain chips
power: supply: bq27xxx: Add chip IDs for previously shadowed chips
power: supply: bq27xxx: Create single chip data table
power: supply: bq24190_charger: Add ti,bq24192i to devicetree table
power: supply: bq24190_charger: Add input_current_limit property
power: supply: Add power_supply_set_input_current_limit_from_supplier helper
power: supply: max17042_battery: Fix compiler warning
power: supply: core: Delete two error messages for a failed memory allocation in power_supply_check_supplies()
power: supply: make device_attribute const
power: supply: max17042_battery: Fix ACPI interrupt issues
power: supply: max17042_battery: Add support for ACPI enumeration
power: supply: lp8788: Make several arrays static const * const
...
Diffstat (limited to 'drivers/power/supply/lp8788-charger.c')
-rw-r--r-- | drivers/power/supply/lp8788-charger.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/drivers/power/supply/lp8788-charger.c b/drivers/power/supply/lp8788-charger.c index 677f7c40b25a..0f3432795f3c 100644 --- a/drivers/power/supply/lp8788-charger.c +++ b/drivers/power/supply/lp8788-charger.c @@ -626,7 +626,7 @@ static ssize_t lp8788_show_charger_status(struct device *dev, { struct lp8788_charger *pchg = dev_get_drvdata(dev); enum lp8788_charging_state state; - char *desc[LP8788_MAX_CHG_STATE] = { + static const char * const desc[LP8788_MAX_CHG_STATE] = { [LP8788_OFF] = "CHARGER OFF", [LP8788_WARM_UP] = "WARM UP", [LP8788_LOW_INPUT] = "LOW INPUT STATE", @@ -650,8 +650,10 @@ static ssize_t lp8788_show_eoc_time(struct device *dev, struct device_attribute *attr, char *buf) { struct lp8788_charger *pchg = dev_get_drvdata(dev); - char *stime[] = { "400ms", "5min", "10min", "15min", - "20min", "25min", "30min", "No timeout" }; + static const char * const stime[] = { + "400ms", "5min", "10min", "15min", + "20min", "25min", "30min", "No timeout" + }; u8 val; lp8788_read_byte(pchg->lp, LP8788_CHG_EOC, &val); @@ -665,9 +667,13 @@ static ssize_t lp8788_show_eoc_level(struct device *dev, struct device_attribute *attr, char *buf) { struct lp8788_charger *pchg = dev_get_drvdata(dev); - char *abs_level[] = { "25mA", "49mA", "75mA", "98mA" }; - char *relative_level[] = { "5%", "10%", "15%", "20%" }; - char *level; + static const char * const abs_level[] = { + "25mA", "49mA", "75mA", "98mA" + }; + static const char * const relative_level[] = { + "5%", "10%", "15%", "20%" + }; + const char *level; u8 val; u8 mode; |