summaryrefslogtreecommitdiff
path: root/drivers/power
AgeCommit message (Collapse)Author
2019-04-15power: supply: cpcap-battery: Use accumulator for current and power averageTony Lindgren
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 <pavel@ucw.cz> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2019-04-15power: supply: cpcap-battery: Fix coulomb counter calibration register useTony Lindgren
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 <tony@atomide.com> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2019-04-15power: supply: cpcap-battery: Fix signed counter sample registerTony Lindgren
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 <tony@atomide.com> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2019-04-15power: supply: cpcap-battery: Fix low battery checkTony Lindgren
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 <pavel@ucw.cz> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2019-04-15Merge branch 'psy-fixes' into psy-nextSebastian Reichel
Merge fixes branch into next branch for cpcap-battery patches. Signed-off-by: Sebastian Reichel <sre@collabora.com>
2019-04-15power: supply: gpio-charger: Add support for charger status.Artur Rojek
Introduce optional support of POWER_SUPPLY_PROP_STATUS for chargers which provide charging status GPIO. Signed-off-by: Artur Rojek <contact@artur-rojek.eu> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2019-04-15power: supply: core: fix typo in function to get current charge control limitEnric Balletbo i Serra
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 <enric.balletbo@collabora.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2019-04-15drivers: power: supply: goldfish_battery: Fix bogus SPDX identifierThomas Gleixner
spdxcheck.py complains: drivers/power/supply/goldfish_battery.c: 1:28 Invalid License ID: GPL which is correct because GPL is not a valid identifier. Of course this could have been caught by checkpatch.pl _before_ submitting or merging the patch. WARNING: 'SPDX-License-Identifier: GPL' is not supported in LICENSES/... #19: FILE: drivers/power/supply/goldfish_battery.c:1: +// SPDX-License-Identifier: GPL Which is absolutely hillarious as the commit introducing this wreckage says in the changelog: There was a checkpatch complain: "Missing or malformed SPDX-License-Identifier tag". Oh well. Replacing a checkpatch warning by a different checkpatch warning is a really useful exercise. Use the proper GPL-2.0 identifier which is what the boiler plate in the file had originally. Fixes: e75e3a125b40 ("drivers: power: supply: goldfish_battery: Put an SPDX tag") Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-10power: supply: cpcap-battery: Fix division by zeroTony Lindgren
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 <tony@atomide.com> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2019-04-10power: supply: ltc3651-charger: Fix device name (rename files)Michael Hennerich
rename only - no functional changes Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2019-04-10power: supply: ltc3651-charger: Fix device nameMichael Hennerich
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 <michael.hennerich@analog.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2019-04-05power: supply: max14656: fix potential use-after-freeSven Van Asbroeck
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 <akurz@blala.de> Signed-off-by: Sven Van Asbroeck <TheSven73@gmail.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2019-04-05power: supply: max14656: fix potential use-before-allocSven Van Asbroeck
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 <akurz@blala.de> Signed-off-by: Sven Van Asbroeck <TheSven73@gmail.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2019-04-05power: reset: at91-poweroff: add support for SAM9X60Claudiu Beznea
Add support for SAM9X60 shutdown controller. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2019-04-05power: reset: at91-poweroff: add RTT wakeup capabilityClaudiu Beznea
Add RTT wakeup capability. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2019-04-05power: supply: axp288_charger: Fix unchecked return valueGustavo A. R. Silva
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: stable@vger.kernel.org Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2019-04-05power: supply: Fix the simple battery property namesMaxime Ripard
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 <maxime.ripard@bootlin.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2019-04-05power: charger-manager: fix a potential NULL pointer dereferenceKangjie Lu
In case create_freezable_workqueue fails, the fix return -ENOMEM to avoid a potential NULL pointer dereference. Signed-off-by: Kangjie Lu <kjlu@umn.edu> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2019-04-05power: reset: syscon-reboot: add a mask propertyMartin Schiller
Make the syscon-reboot driver accept value and mask instead of just value. Prior to this patch, the property name for the value was 'mask'. If only the mask property is defined on a node, maintain compatibility by using it as the value. This patch is based on commit f2c199db477e ("power: reset: syscon-poweroff: add a mask property") and does the same change for the syscon-reboot driver. Signed-off-by: Martin Schiller <ms@dev.tdt.de> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2019-02-20power: reset: at91-reset: add support for sam9x60 SoCNicolas Ferre
Add support for additional reset causes and the proper compatibility string for sam9x60 SoC. The restart function is the same as the samx7. Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com> Reviewed-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2019-02-20max17042_battery: fix potential use-after-free on device removeSven Van Asbroeck
The work which is scheduled on a POR boot is potentially left pending or running until after the device module is removed, which could result in a use-after-free. Fix by registering a cancel/sync callback, which gets executed as part of standard resource unwinding. This issue was detected with the help of Coccinelle. Signed-off-by: Sven Van Asbroeck <TheSven73@gmail.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2019-02-20power: supply: core: Add a field to support battery max voltageArtur Rojek
Add a field for "voltage_max_design_uv" to present fully charged battery voltage. Signed-off-by: Artur Rojek <contact@artur-rojek.eu> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2019-02-20bq27x00: use cached flagsArthur Demchenkov
The flags were just read by bq27xxx_battery_update(), no need to read them again. Signed-off-by: Arthur Demchenkov <spinal.by@gmail.com> Reviewed-by: Andrew F. Davis <afd@ti.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2019-02-12power: supply: ds2782: fix possible use-after-free on removeSven Van Asbroeck
In remove(), use cancel_delayed_work_sync() to cancel the delayed work. Otherwise there's a chance that this work will continue to run until after the device has been removed. While we're here, fix the deallocation order in remove(), to correspond to the inverse of the probe() allocation order. This guarantees that any remaining work can run to completion with all driver structures still intact. This issue was detected with the help of Coccinelle. Signed-off-by: Sven Van Asbroeck <TheSven73@gmail.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2019-01-23power: supply: bq25890: show max charge current/voltage as configuredMichał Mirosław
Use firmware-provided limits for POWER_SUPPLY_*_MAX properties instead of chip max values. This will reflect the battery limits as those are the important ones. Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2019-01-23power: supply: sc27xx: Fix capacity saving functionYuanjiang Yu
We found sometimes we can not get the saving capacity to initialize the battery capacity, the reason is the user area registers are put on power always-on region, so we need delay some time to wait until values are updated successfully. Moreover we also should clear the USER_AREA_CLEAR register after setting the USER_AREA_SET register, otherwise we can not save the values in the USER_AREA_SET register. Signed-off-by: Yuanjiang Yu <yuanjiang.yu@unisoc.com> Signed-off-by: Baolin Wang <baolin.wang@linaro.org> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2019-01-23power: supply: sc27xx: Fix the incorrect formula when converting capacity to ↵Baolin Wang
coulomb counter We should multiply the calibrated current data (cur_1000ma_adc) when converting current capacity (mAh) to coulomb counter, which can get an accurate coulomb counter from the fuel gauge controller. Signed-off-by: Baolin Wang <baolin.wang@linaro.org> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2019-01-23power: supply: sc27xx: Add one property to read charge voltageBaolin Wang
Add POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE property to get charge voltage sampling by ADC controller, which is used to validate if the charge voltage is in normal range or not in charger manager. Signed-off-by: Baolin Wang <baolin.wang@linaro.org> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2019-01-21drivers: power: supply: goldfish_battery: Add support for reading more ↵Roman Kiryanov
properties To comply with tests we need to support more power supply properties: POWER_SUPPLY_PROP_VOLTAGE_NOW POWER_SUPPLY_PROP_TEMP POWER_SUPPLY_PROP_CHARGE_COUNTER POWER_SUPPLY_PROP_CURRENT_NOW POWER_SUPPLY_PROP_CURRENT_AVG POWER_SUPPLY_PROP_CHARGE_FULL POWER_SUPPLY_PROP_CYCLE_COUNT POWER_SUPPLY_PROP_VOLTAGE_MAX POWER_SUPPLY_PROP_CURRENT_MAX Signed-off-by: Roman Kiryanov <rkir@google.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2019-01-20power: supply: charger-manager: Fix trivial language typosKrzysztof Kozlowski
Fix few trivial language typos. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2019-01-20cpcap-charger: generate events for userspacePavel Machek
The driver doesn't generate uevents on charger connect/disconnect. This leads to UPower not detecting when AC is on or off... and that is bad. Reported by Arthur D. on github ( https://github.com/maemo-leste/bugtracker/issues/206 ), thanks to Merlijn Wajer for suggesting a fix. Cc: stable@kernel.org Signed-off-by: Pavel Machek <pavel@ucw.cz> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2019-01-20power: supply: remove some duplicated includesYangtao Li
We include of.h twice. It's unnecessary,so just remove them. Signed-off-by: Yangtao Li <tiny.windzz@gmail.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2019-01-20power: twl4030: fix a missing check of return valueKangjie Lu
If twl4030_bci_read() fails, the read data in "s" is incorrect, which is however used in the following execution. The fix checks the return value of twl4030_bci_read() and returns an error code upstream upon the failure of twl4030_bci_read(). Signed-off-by: Kangjie Lu <kjlu@umn.edu> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2019-01-20drivers: power: supply: goldfish_battery: Use tabs for alignmentRoman Kiryanov
Tabs are preferred. Signed-off-by: Roman Kiryanov <rkir@google.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2019-01-20drivers: power: supply: goldfish_battery: Fix alignmentRoman Kiryanov
Align two values as other values below. Signed-off-by: Roman Kiryanov <rkir@google.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2019-01-20drivers: power: supply: goldfish_battery: Retire a redundant variableRoman Kiryanov
The battery_data static variable was not used. Signed-off-by: Roman Kiryanov <rkir@google.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2019-01-20drivers: power: supply: goldfish_battery: Fix "line over 80 characters"Roman Kiryanov
There was a line longer than 80 characters. Signed-off-by: Roman Kiryanov <rkir@google.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2019-01-20drivers: power: supply: goldfish_battery: Put an SPDX tagRoman Kiryanov
There was a checkpatch complain: "Missing or malformed SPDX-License-Identifier tag". Signed-off-by: Roman Kiryanov <rkir@google.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2019-01-20power: supply: axp288_fuel_gauge: Change to use DEFINE_SHOW_ATTRIBUTE macroYangtao Li
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li <tiny.windzz@gmail.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2019-01-20power: supply: isp1704: switch to gpiod APISebastian Reichel
This migrates isp1704 driver from old GPIO API to new descriptor based GPIO API and drops useless platform data as a side-effect. Migration is simple, since all mainline users are DT based and DT API does not change. Out of tree users of the platform data need to migrate to gpiod_lookup_table as described here: Documentation/driver-api/gpio/board.rst Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2018-12-28Merge tag 'for-v4.21' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply Pull power supply and reset updates from Sebastian Reichel: - New core support: - battery internal resistance - battery OCV capacity lookup table - support for custom sysfs attributes - Convert all drivers to use power-supply core support for custom sysfs attributes - bq24190-charger: bq24196 support - axp20x-charger: AXP813 support - sc27xx-battery: new fuel gauge driver - gpio-poweroff: support for specific active and inactive delays - Misc fixes * tag 'for-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (53 commits) power: supply: bq25890: fix BAT_COMP field definition power: supply: gpio-charger: Do not use deprecated POWER_SUPPLY_TYPE_USB_* power: supply: ds2781: switch to devm_power_supply_register power: supply: ds2780: switch to devm_power_supply_register power: supply: ds2781: fix race-condition in bin attribute registration power: supply: ds2780: fix race-condition in bin attribute registration power: supply: pcf50633: fix race-condition in sysfs registration power: supply: charger-manager: fix race-condition in sysfs registration power: supply: charger-manager: simplify generation of sysfs attribute group name power: supply: bq24257: fix race-condition in sysfs registration power: supply: bq24190_charger: fix race-condition in sysfs registration power: supply: lp8788: fix race-condition in sysfs registration power: supply: ds2781: fix race-condition in sysfs registration power: supply: ds2780: fix race-condition in sysfs registration power: supply: bq2415x: fix race-condition in sysfs registration power: supply: core: add support for custom sysfs attributes power: supply: sc27xx: Save last battery capacity power: reset: at91-poweroff: move shdwc related data to one structure power: supply: sc27xx: Add suspend/resume interfaces power: supply: sc27xx: Add fuel gauge low voltage alarm ...
2018-12-28Merge tag 'devicetree-for-4.21' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull Devicetree updates from Rob Herring: "The biggest highlight here is the start of using json-schema for DT bindings. Being able to validate bindings has been discussed for years with little progress. - Initial support for DT bindings using json-schema language. This is the start of converting DT bindings from free-form text to a structured format. - Reworking of initrd address initialization. This moves to using the phys address instead of virt addr in the DT parsing code. This rework was motivated by CONFIG_DEV_BLK_INITRD causing unnecessary rebuilding of lots of files. - Fix stale phandle entries in phandle cache - DT overlay validation improvements. This exposed several memory leak bugs which have been fixed. - Use node name and device_type helper functions in DT code - Last remaining conversions to using %pOFn printk specifier instead of device_node.name directly - Create new common RTC binding doc and move all trivial RTC devices out of trivial-devices.txt. - New bindings for Freescale MAG3110 magnetometer, Cadence Sierra PHY, and Xen shared memory - Update dtc to upstream version v1.4.7-57-gf267e674d145" * tag 'devicetree-for-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (68 commits) of: __of_detach_node() - remove node from phandle cache of: of_node_get()/of_node_put() nodes held in phandle cache gpio-omap.txt: add reg and interrupts properties dt-bindings: mrvl,intc: fix a trivial typo dt-bindings: iio: magnetometer: add dt-bindings for freescale mag3110 dt-bindings: Convert trivial-devices.txt to json-schema dt-bindings: arm: mrvl: amend Browstone compatible string dt-bindings: arm: Convert Tegra board/soc bindings to json-schema dt-bindings: arm: Convert ZTE board/soc bindings to json-schema dt-bindings: arm: Add missing Xilinx boards dt-bindings: arm: Convert Xilinx board/soc bindings to json-schema dt-bindings: arm: Convert VIA board/soc bindings to json-schema dt-bindings: arm: Convert ST STi board/soc bindings to json-schema dt-bindings: arm: Convert SPEAr board/soc bindings to json-schema dt-bindings: arm: Convert CSR SiRF board/soc bindings to json-schema dt-bindings: arm: Convert QCom board/soc bindings to json-schema dt-bindings: arm: Convert TI nspire board/soc bindings to json-schema dt-bindings: arm: Convert TI davinci board/soc bindings to json-schema dt-bindings: arm: Convert Calxeda board/soc bindings to json-schema dt-bindings: arm: Convert Altera board/soc bindings to json-schema ...
2018-12-18power: supply: bq25890: fix BAT_COMP field definitionMichał Mirosław
According to datasheet, BAT_COMP field spans bits 5-7. The rest of the code seems to assume this already. Fixes: 4aeae9cb0dad ("power_supply: Add support for TI BQ25890 charger chip") Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2018-12-13power: supply: gpio-charger: Do not use deprecated POWER_SUPPLY_TYPE_USB_*Sebastian Reichel
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2018-12-13power: supply: ds2781: switch to devm_power_supply_registerSebastian Reichel
Simplify/Cleanup the driver by switching to devm_power_supply_register and dropping the driver's remove function. Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2018-12-13power: supply: ds2780: switch to devm_power_supply_registerSebastian Reichel
Simplify/Cleanup the driver by switching to devm_power_supply_register and dropping the driver's remove function. Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2018-12-13power: supply: ds2781: fix race-condition in bin attribute registrationSebastian Reichel
This is a follow-up patch to the previous one, which fixed a race-condition during registration of the attribute group. This fixes the same issue for the binary attributes by adding them to the properly registered group. As a side effect the code is further cleaned up. Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2018-12-13power: supply: ds2780: fix race-condition in bin attribute registrationSebastian Reichel
This is a follow-up patch to the previous one, which fixed a race-condition during registration of the attribute group. This fixes the same issue for the binary attributes by adding them to the properly registered group. As a side effect the code is further cleaned up. Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2018-12-13power: supply: pcf50633: fix race-condition in sysfs registrationSebastian Reichel
This registers custom sysfs properties using the native functionality of the power-supply framework, which cleans up the code a bit and fixes a race-condition. Before this patch the sysfs attributes were not properly registered to udev. Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2018-12-13power: supply: charger-manager: fix race-condition in sysfs registrationSebastian Reichel
This registers custom sysfs properties using the native functionality of the power-supply framework, which cleans up the code a bit and fixes a race-condition. Before this patch the sysfs attributes were not properly registered to udev. Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>