aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2019-05-02power: supply: core: Add missing documentation for CHARGE_CONTROL_* propertiesNick Crews1-0/+19
The existing POWER_SUPPLY_PROP_CHARGE_CONTROL_LIMIT and POWER_SUPPLY_PROP_CHARGE_CONTROL_LIMIT_MAX properties don't have documentation. I add that documentation here. v5 changes: - Split this commit out from the previous two commits. Signed-off-by: Nick Crews <[email protected]> Reviewed-by: Enric Balletbo i Serra <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2019-05-02power: supply: core: Add CHARGE_CONTROL_{START_THRESHOLD,END_THRESHOLD} ↵Nick Crews3-0/+24
properties Add POWER_SUPPLY_PROP_CHARGE_CONTROL_START_THRESHOLD and POWER_SUPPLY_PROP_CHARGE_CONTROL_END_THRESHOLD properties, to expand the existing CHARGE_CONTROL_* properties. I am adding them in order to support a new Chrome OS device, but these properties should be general enough that they can be used on other devices. When the charge_type is "Custom", the charge controller uses the POWER_SUPPLY_PROP_CHARGE_CONTROL_* properties as configuration for some other algorithm. For example, in the use case that I am supporting, this means the battery begins charging when the percentage level drops below POWER_SUPPLY_PROP_CHARGE_CONTROL_START_THRESHOLD and charging ceases when the percentage level goes above POWER_SUPPLY_PROP_CHARGE_CONTROL_END_THRESHOLD. v5 changes: - Add the other missing CHARGE_CONTROL_* properties documentation in a separate commit - Split up adding the charge types and adding the POWER_SUPPLY_PROP_CHARGE_CONTROL_START_THRESHOLD and POWER_SUPPLY_PROP_CHARGE_CONTROL_END_THRESHOLD properties into two different commits. v4 changes: - Add documentation for the new properties, and add documentation for the the previously missing charge_control_limit and charge_control_limit_max properties. Signed-off-by: Nick Crews <[email protected]> Reviewed-by: Enric Balletbo i Serra <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2019-05-02power: supply: core: Add Standard, Adaptive, and Custom charge typesNick Crews3-6/+16
Add "Standard", "Adaptive", and "Custom" modes to the charge_type property, to expand the existing "Trickle" and "Fast" modes. I am adding them in order to support a new Chrome OS device, but these properties should be general enough that they can be used on other devices. The meaning of "Standard" is obvious, but "Adaptive" and "Custom" are more tricky: "Adaptive" means that the charge controller uses some custom algorithm to change the charge type automatically, with no configuration needed. "Custom" means that the charge controller uses the POWER_SUPPLY_PROP_CHARGE_CONTROL_* properties as configuration for some other algorithm. v5 changes: - Split up adding the charge types and adding the POWER_SUPPLY_PROP_CHARGE_CONTROL_START_THRESHOLD and POWER_SUPPLY_PROP_CHARGE_CONTROL_END_THRESHOLD properties into two different commits. v4 changes: - Add documentation for the new properties, and add documentation for the the previously missing charge_control_limit and charge_control_limit_max properties. Signed-off-by: Nick Crews <[email protected]> Reviewed-by: Enric Balletbo i Serra <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2019-05-02power: supply: axp288_fuel_gauge: Add ACEPC T8 and T11 mini PCs to the blacklistHans de Goede1-0/+20
The ACEPC T8 and T11 Cherry Trail Z8350 mini PCs use an AXP288 and as PCs, rather then portables, they does not have a battery. Still for some reason the AXP288 not only thinks there is a battery, it actually thinks it is discharging while the PC is running, slowly going to 0% full, causing userspace to shutdown the system due to the battery being critically low after a while. This commit adds the ACEPC T8 and T11 to the axp288 fuel-gauge driver blacklist, so that we stop reporting bogus battery readings on this device. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1690852 Cc: [email protected] Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2019-05-02power: supply: bq27xxx_battery: Notify also about status changesKrzysztof Kozlowski1-1/+2
User-space might be interested in receiving uevents when the charging starts/stops or if conditions of battery changes (e.g. over-temperature). Notify about changes in battery also when the flags change, not only SoC. Signed-off-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Pali Rohár <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2019-04-18Merge tag 'psy-olpc-1.75-battery-signed' into psy-nextSebastian Reichel3-95/+177
This immutable branch contains the changes required for OLPC 1.75 battery, which touches x86 and power-supply and is based on v5.1-rc1. Signed-off-by: Sebastian Reichel <[email protected]>
2019-04-18power: supply: olpc_battery: Have the framework register sysfs files for usLubomir Rintel1-29/+35
The power framework gained ability to register groups of sysfs attributes in commit cef8fe6a382c ("power: supply: core: add support for custom sysfs attributes"). Signed-off-by: Lubomir Rintel <[email protected]> Suggested-by: Sebastian Reichel <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2019-04-18power: supply: olpc_battery: Add OLPC XO 1.75 supportLubomir Rintel1-6/+19
The battery and the protocol are essentially the same as OLPC XO 1.5, but the responses from the EC are LSB first. Signed-off-by: Lubomir Rintel <[email protected]> Acked-by: Pavel Machek <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2019-04-18power: supply: olpc_battery: Avoid using platform_infoLubomir Rintel1-7/+17
This wouldn't work on the DT-based ARM platform. Let's read the EC version directly from the EC driver instead. This removes x86 specific bits that would prevent this driver from being used with the EC of ARM-based OLPC XO 1.75. Signed-off-by: Lubomir Rintel <[email protected]> Acked-by: Pavel Machek <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2019-04-18power: supply: olpc_battery: Use devm_power_supply_register()Lubomir Rintel1-14/+5
This simplifies the error handling. Signed-off-by: Lubomir Rintel <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2019-04-18power: supply: olpc_battery: Move priv data to a structLubomir Rintel1-30/+48
The global variables for private data are not too nice. I'd like some more, and that would clutter the global name space even further. Signed-off-by: Lubomir Rintel <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2019-04-18power: supply: olpc_battery: Use DT to get battery versionLubomir Rintel1-3/+6
Avoid using the x86 OLPC platform specific call to get the board version. That wouldn't work on FDT-based ARM MMP2 platform. Add the XO 1.5 compatible string too. This is actually not completely necessary as the battery nodes on XO 1.5 claim to be compatible with "olpc,xo1-battery", but there are, in fact, differencies. Signed-off-by: Lubomir Rintel <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Acked-by: Pavel Machek <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2019-04-18x86/platform/olpc: Use a correct version when making up a battery nodeLubomir Rintel1-14/+50
The XO-1 and XO-1.5 batteries apparently differ in an ability to report ambient temperature. We need to use a different compatible string for the XO-1.5 battery. Previously olpc_dt_fixup() used the presence of the battery node's compatible property to decide whether the DT is up to date. Now we need to look for a particular value in the compatible string, to decide Signed-off-by: Lubomir Rintel <[email protected]> Acked-by: Pavel Machek <[email protected]> Acked-by: Thomas Gleixner <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2019-04-18x86/platform/olpc: Trivial code move in DT fixupLubomir Rintel1-5/+5
This makes the following patch more concise. Signed-off-by: Lubomir Rintel <[email protected]> Acked-by: Thomas Gleixner <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2019-04-18x86/platform/olpc: Don't split string literals when fixing up the DTLubomir Rintel1-14/+19
It was pointed out in a review, and checkpatch.pl complains about this. Breaking it down into multiple ofw evaluations works just as well and reads better. Signed-off-by: Lubomir Rintel <[email protected]> Acked-by: Thomas Gleixner <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2019-04-18dt-bindings: olpc_battery: Add XO-1.5 batteryLubomir Rintel1-1/+1
The XO-1 and XO-1.5 batteries apparently differ in an ability to report ambient temperature. Signed-off-by: Lubomir Rintel <[email protected]> Reviewed-by: Rob Herring <[email protected]> Acked-by: Pavel Machek <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2019-04-18power: supply: add Ingenic JZ47xx battery driver.Artur Rojek3-0/+196
Add a driver for battery present on Ingenic JZ47xx SoCs. Signed-off-by: Artur Rojek <[email protected]> Reviewed-by: Jonathan Cameron <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2019-04-18dt-bindings: power: supply: Add docs for Ingenic JZ47xx SoCs battery.Artur Rojek1-0/+31
Add documentation for the ingenic-battery driver, used on JZ47xx SoCs. Signed-off-by: Artur Rojek <[email protected]> Acked-by: Jonathan Cameron <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2019-04-18Merge 'ib-jz47xx-battery-prereq' into psy-nextSebastian Reichel2-5/+31
Merge immutable branch containing the IIO changes required for the new Ingenic JZ47xx battery fuel gauge driver. Signed-off-by: Sebastian Reichel <[email protected]>
2019-04-17power: supply: axp20x_usb_power: add support for AXP813Quentin Schulz1-1/+65
This adds support for AXP813 PMIC. It is almost the same as AXP22X but has a different current limit. Signed-off-by: Quentin Schulz <[email protected]> Signed-off-by: Chen-Yu Tsai <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2019-04-17power: supply: axp20x_usb_power: add function to get max currentQuentin Schulz1-22/+30
To prepare for a new PMIC, factor out the code responsible of returning the maximum current to axp20x_get_current_max. Signed-off-by: Quentin Schulz <[email protected]> Signed-off-by: Chen-Yu Tsai <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2019-04-17power: supply: axp20x_usb_power: use polling to detect vbus status changeChen-Yu Tsai1-0/+53
On AXP221 and later AXP PMICs that have the N_VBUSEN pin, when this pin is high, either due to the PMIC driving it high or as an input, the VBUS detection related interrupt mechanisms are disabled. Previously this was worked around in the phy-sun4i-usb driver, which needed to sense VBUS changes and report them to the musb driver in a timely matter. However this workaround was only for the A31 and A33 type USB PHYs. To support newer platforms we would have to enable it for almost all the post-A31 SoCs. However, since this is actually the result of the PMIC's behavior, the workaround would be better if done in the PMIC driver, in this case the VBUS power supply driver. Add the same workqueue-based polling to the VBUS power supply driver. The polling interval is chosen to be the debounce interval from the USB PHY driver, as this short interval is needed in some cases, but the power supply driver would not know when. Signed-off-by: Chen-Yu Tsai <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2019-04-17power: supply: axp20x_usb_power: Fix typo in VBUS current limit macrosChen-Yu Tsai1-8/+8
The VBUS current limit value macros have VBUS typed as VBUC, while the bitmask macro is named correctly. Fix it. Fixes: 69fb4dcada77 ("power: Add an axp20x-usb-power driver") Signed-off-by: Chen-Yu Tsai <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2019-04-17dt-bindings: power: supply: axp20x_usb_power: add axp813 compatibleChen-Yu Tsai1-0/+1
This adds the "x-powers,axp813-usb-power-supply" to the list of compatibles for AXP20X VBUS power supply driver. Reviewed-by: Rob Herring <[email protected]> Signed-off-by: Chen-Yu Tsai <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2019-04-17power: supply: core: fix leaked of_node refs in power_supply_get_battery_infoWen Yang1-8/+16
The call to of_parse_phandle returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with the following warnings: ./drivers/power/supply/power_supply_core.c:601:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 595, but without a corresponding object release within this function. ./drivers/power/supply/power_supply_core.c:604:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 595, but without a corresponding object release within this function. ./drivers/power/supply/power_supply_core.c:632:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 595, but without a corresponding object release within this function. ./drivers/power/supply/power_supply_core.c:635:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 595, but without a corresponding object release within this function. ./drivers/power/supply/power_supply_core.c:653:3-9: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 595, but without a corresponding object release within this function. ./drivers/power/supply/power_supply_core.c:664:3-9: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 595, but without a corresponding object release within this function. ./drivers/power/supply/power_supply_core.c:673:1-7: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 595, but without a corresponding object release within this function. Signed-off-by: Wen Yang <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2019-04-17power: supply: ab8500: fix leaked of_node refs in ab8500_bm_of_probeWen Yang1-0/+1
The call to of_parse_phandle returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. 492 int ab8500_bm_of_probe(struct device *dev, 493 struct device_node *np, 494 struct abx500_bm_data *bm) 495 { 496 const struct batres_vs_temp *tmp_batres_tbl; 497 struct device_node *battery_node; ... 501 /* get phandle to 'battery-info' node */ 502 battery_node = of_parse_phandle(np, "battery", 0); ... 509 if (!btech) { 510 dev_warn(dev, "missing property battery-name/type\n"); 511 return -EINVAL; ---> leaked here 512 } ... 540 of_node_put(battery_node); ---> released here 541 542 return 0; 543 } Detected by coccinelle with the following warnings: ./drivers/power/supply/ab8500_bmdata.c:511:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 502, but without a corresponding object release within this function. Signed-off-by: Wen Yang <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2019-04-15power: supply: cpcap-charger: Fix pointless EPROBE_DEFER warningsTony Lindgren1-2/+3
With loadable modules we may get the following during init: could not initialize VBUS or ID IIO: -517 Let's not print any pointless error messages for deferred probe. Signed-off-by: Tony Lindgren <[email protected]> Acked-by: Pavel Machek <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2019-04-15power: supply: cpcap-battery: Fix pointless EPROBE_DEFER warningsTony Lindgren1-2/+3
With loadable modules we may get the following during init: could not initialize VBUS or ID IIO: -517 Let's not print any pointless error messages for deferred probe. Signed-off-by: Tony Lindgren <[email protected]> Acked-by: Pavel Machek <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2019-04-15power: supply: cpcap-battery: Use accumulator for current and power averageTony Lindgren1-4/+4
We should not use measured current value for average since we have proper coulomb counter values available. Using measured current value should be only used when the value is queried at a higher rate than the 250 ms rate the coulomb counter is configured to run at. Cc: Pavel Machek <[email protected]> Signed-off-by: Tony Lindgren <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2019-04-15power: supply: cpcap-battery: Fix coulomb counter calibration register useTony Lindgren1-9/+7
The coulomb counter calibration is not CCO, it's CCM. And the CCM is nine bits wide signed register, so let's use sign_extend32() for it. Signed-off-by: Tony Lindgren <[email protected]> Acked-by: Pavel Machek <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2019-04-15power: supply: cpcap-battery: Fix signed counter sample registerTony Lindgren1-5/+6
The accumulator sample register is signed 32-bits wide register on droid 4. And only the earlier version of cpcap has a signed 24-bits wide register. We're currently passing it around as unsigned, so let's fix that and use sign_extend32() for the earlier revision. Signed-off-by: Tony Lindgren <[email protected]> Acked-by: Pavel Machek <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2019-04-15power: supply: cpcap-battery: Fix low battery checkTony Lindgren1-2/+2
We need to check current instead of the charge counter to see if a charger is connected. The charge counter shows the cumulated value instead of the current charge current and can be negative or positive. Cc: Pavel Machek <[email protected]> Signed-off-by: Tony Lindgren <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2019-04-15Merge branch 'psy-fixes' into psy-nextSebastian Reichel1-0/+3
Merge fixes branch into next branch for cpcap-battery patches. Signed-off-by: Sebastian Reichel <[email protected]>
2019-04-15power: supply: gpio-charger: Add support for charger status.Artur Rojek1-11/+46
Introduce optional support of POWER_SUPPLY_PROP_STATUS for chargers which provide charging status GPIO. Signed-off-by: Artur Rojek <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2019-04-15dt-bindings: power: supply: Add charge-status-gpios propertyArtur Rojek1-1/+5
Add documentation for the "charge-status-gpios" property. Update the "gpios" property with a valid example. Signed-off-by: Artur Rojek <[email protected]> Reviewed-by: Rob Herring <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2019-04-15power: supply: core: fix typo in function to get current charge control limitEnric Balletbo i Serra1-2/+2
There is a spelling mistake in ps_get_cur_charge_cntl_limit function so replace 'chrage' for 'charge'. Signed-off-by: Enric Balletbo i Serra <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2019-04-14iio: inkern: Convert iio_read_avail_channel_raw into a wrapperArtur Rojek1-10/+2
Convert "iio_read_avail_channel_raw" over to a wrapper around "iio_read_avail_channel_attribute". With the introduction of "iio_read_avail_channel_attribute", the necessity of having a separate call to read raw channel values became redundant. Signed-off-by: Artur Rojek <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2019-04-14iio: inkern: API for reading available iio channel attribute valuesArtur Rojek2-0/+34
Extend the inkern API with a function for reading available attribute values of iio channels. Signed-off-by: Artur Rojek <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2019-04-10power: supply: cpcap-battery: Fix division by zeroTony Lindgren1-0/+3
If called fast enough so samples do not increment, we can get division by zero in kernel: __div0 cpcap_battery_cc_raw_div cpcap_battery_get_property power_supply_get_property.part.1 power_supply_get_property power_supply_show_property power_supply_uevent Fixes: 874b2adbed12 ("power: supply: cpcap-battery: Add a battery driver") Signed-off-by: Tony Lindgren <[email protected]> Acked-by: Pavel Machek <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2019-04-10power: supply: ltc3651-charger: Fix device name (rename files)Michael Hennerich3-1/+1
rename only - no functional changes Signed-off-by: Michael Hennerich <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2019-04-10power: supply: ltc3651-charger: Fix device nameMichael Hennerich4-72/+71
There never was a device called LTC3651, it always was just LT3651. This circumstance makes it pretty difficult to identify what this driver is meant to control.channges since Signed-off-by: Michael Hennerich <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2019-04-05power: supply: max14656: fix potential use-after-freeSven Van Asbroeck1-2/+15
Explicitly cancel/sync the irq_work delayed work, otherwise there's a chance that it will run after the device is removed, which would result in a use-after-free. Note that cancel/sync should happen: - after irq's have been disabled, as the isr re-schedules the work - before the power supply is unregistered, because the work func uses the power supply handle. Cc: Alexander Kurz <[email protected]> Signed-off-by: Sven Van Asbroeck <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2019-04-05power: supply: max14656: fix potential use-before-allocSven Van Asbroeck1-7/+7
Call order on probe(): - max14656_hw_init() enables interrupts on the chip - devm_request_irq() starts processing interrupts, isr could be called immediately - isr: schedules delayed work (irq_work) - irq_work: calls power_supply_changed() - devm_power_supply_register() registers the power supply Depending on timing, it's possible that power_supply_changed() is called on an unregistered power supply structure. Fix by registering the power supply before requesting the irq. Cc: Alexander Kurz <[email protected]> Signed-off-by: Sven Van Asbroeck <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2019-04-05dt-bindings: arm: atmel: add binding for SAM9X60 shutdown controllerClaudiu Beznea1-1/+4
Add documentation for SAM9X60 shutdown controller. Signed-off-by: Claudiu Beznea <[email protected]> Acked-by: Nicolas Ferre <[email protected]> Reviewed-by: Rob Herring <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2019-04-05power: reset: at91-poweroff: add support for SAM9X60Claudiu Beznea1-0/+11
Add support for SAM9X60 shutdown controller. Signed-off-by: Claudiu Beznea <[email protected]> Acked-by: Nicolas Ferre <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2019-04-05power: reset: at91-poweroff: add RTT wakeup capabilityClaudiu Beznea1-0/+14
Add RTT wakeup capability. Signed-off-by: Claudiu Beznea <[email protected]> Acked-by: Nicolas Ferre <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2019-04-05dt-bindings: power: supply: gpio-charger: add missing semi-colon in exampleSebastien Bourdelin1-1/+1
Fix the example documentation which is missing a semi-colon. Signed-off-by: Sebastien Bourdelin <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2019-04-05power: supply: axp288_charger: Fix unchecked return valueGustavo A. R. Silva1-0/+4
Currently there is no check on platform_get_irq() return value in case it fails, hence never actually reporting any errors and causing unexpected behavior when using such value as argument for function regmap_irq_get_virq(). Fix this by adding a proper check, a message reporting any errors and returning *pirq* Addresses-Coverity-ID: 1443940 ("Improper use of negative value") Fixes: 843735b788a4 ("power: axp288_charger: axp288 charger driver") Cc: [email protected] Signed-off-by: Gustavo A. R. Silva <[email protected]> Reviewed-by: Hans de Goede <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2019-04-05power: supply: Fix the simple battery property namesMaxime Ripard1-2/+2
Commit c08b1f45d7d1 ("power: supply: core: Add power_supply_battery_info and API") introduced code to parse the simple-battery node and express battery charging constraints. However, it parsed that node using the properties constant_charge_current_max_microamp and constant_charge_voltage_max_microvolt, while the device tree binding for the simple-battery node uses dashes to separate the words in those properties (constant-charge-current-max-microamp and constant-charge-voltage-max-microvolt). Let's make the code match the binding. Fixes: c08b1f45d7d1 ("power: supply: core: Add power_supply_battery_info and API") Signed-off-by: Maxime Ripard <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2019-04-05power: charger-manager: fix a potential NULL pointer dereferenceKangjie Lu1-0/+3
In case create_freezable_workqueue fails, the fix return -ENOMEM to avoid a potential NULL pointer dereference. Signed-off-by: Kangjie Lu <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>