summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-03-01power: supply: core: make power_supply_class constantRicardo B. Marliere
Since commit 43a7206b0963 ("driver core: class: make class_register() take a const *"), the driver core allows for struct class to be in read-only memory, so move the power_supply_class structure to be declared at build time placing it into read-only memory, instead of having to be dynamically allocated at boot time. Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20240301-class_cleanup-power-v1-1-97e0b7bf9c94@marliere.net Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2024-03-01power: supply: bq2415x_charger: report online statusSicelo A. Mhlongo
Provide the Online property. This chip does not have specific flags to indicate the presence of an input voltage, but this is implied by all valid charging states. Fault states also only occur when VBUS is present, so set Online true for those as well. Signed-off-by: Sicelo A. Mhlongo <absicsz@gmail.com> Link: https://lore.kernel.org/r/20240229063721.2592069-2-absicsz@gmail.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2024-02-28power: supply: core: move power_supply_attr_group into #ifdef blockRicardo B. Marliere
When building with CONFIG_SYSFS=n, the build error below is triggered: ld: drivers/power/supply/power_supply_core.o:(.data+0x0): undefined reference to `power_supply_attr_group' The problem is that power_supply_attr_group is needed in power_supply_core.c but defined in power_supply_sysfs.c, which is only targeted with CONFIG_SYSFS=y. Therefore, move the extern declaration into the #ifdef block that checks for CONFIG_SYSFS, and define an empty static const struct otherwise. This is safe because the macro __ATRIBUTE_GROUPS in power_supply_core.c will expand into an empty attribute_group array. Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reported-by: Nathan Chancellor <nathan@kernel.org> Link: https://lore.kernel.org/all/20240227214916.GA3699076@dev-arch.thelio-3990X/ Fixes: 7b46b60944d7 ("power: supply: core: constify the struct device_type usage") Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net> Tested-by: Nathan Chancellor <nathan@kernel.org> # build Link: https://lore.kernel.org/r/20240228-device_cleanup-power-v1-1-52c0321c48e1@marliere.net Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2024-02-28power: supply: core: Fix power_supply_init_attrs() stubNathan Chancellor
When building without CONFIG_SYSFS, there is an error because of a recent refactoring that failed to update the stub of power_supply_init_attrs(): drivers/power/supply/power_supply_core.c: In function 'power_supply_class_init': drivers/power/supply/power_supply_core.c:1630:9: error: too few arguments to function 'power_supply_init_attrs' 1630 | power_supply_init_attrs(); | ^~~~~~~~~~~~~~~~~~~~~~~ In file included from drivers/power/supply/power_supply_core.c:25: drivers/power/supply/power_supply.h:25:20: note: declared here 25 | static inline void power_supply_init_attrs(struct device_type *dev_type) {} | ^~~~~~~~~~~~~~~~~~~~~~~ Update the stub function to take no parameters like the rest of the refactoring, which resolves the build error. Fixes: 7b46b60944d7 ("power: supply: core: constify the struct device_type usage") Signed-off-by: Nathan Chancellor <nathan@kernel.org> Reviewed-by: Ricardo B. Marliere <ricardo@marliere.net> Link: https://lore.kernel.org/r/20240227-fix-power_supply_init_attrs-stub-v1-1-43365e68d4b3@kernel.org Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2024-02-27power: supply: bq27xxx: Report charge full state correctlySicelo A. Mhlongo
When reporting the charging status, the existing code reports the battery as full only when the reported current flowing is exactly 0mA, which is unlikely in practice. Fix the reporting by giving priority to the battery's full state indication/flag. Tested on the Nokia N900 with bq27200 fuel gauge. Signed-off-by: Sicelo A. Mhlongo <absicsz@gmail.com> Link: https://lore.kernel.org/r/20240226193722.2173624-1-absicsz@gmail.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2024-02-26power: reset: rmobile-reset: Make sysc_base2 localGeert Uytterhoeven
The static global variable sysc_base2 is no longer used outside the probe method and the reset handler, so it can be converted to a local variable, and passed to the reset handler via its callback data. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/35f04935c48ae55dc562071e0a1d6fca65234a58.1708944642.git.geert+renesas@glider.be Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2024-02-25power: supply: core: constify the struct device_type usageRicardo B. Marliere
Since commit aed65af1cc2f ("drivers: make device_type const"), the driver core can properly handle constant struct device_type. Move the power_supply_dev_type variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. In order to accomplish that, export power_supply_attr_group in power_supply.h and use it with the macro __ATTRIBUTE_GROUPS when defining power_supply_dev_type in power_supply_core.c. Therefore the attribute group is no longer static. Lastly, because power_supply_attr_groups is no longer dynamically associated to power_supply_dev_type in power_supply_init_attrs(), make the function receive zero arguments. Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net> Link: https://lore.kernel.org/r/20240224-device_cleanup-power-v2-1-465ff94b896c@marliere.net Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2024-02-21power: supply: axp288_fuel_gauge: Deny ROCK Pi XGuoyi Zhang
The ROCK Pi X is a single board computer without batteries using the AXP288 PMIC where the EFI code does not disable the charger part of the PMIC causing us to report a discharging battery with a continuously consumed battery charge to userspace. Add it to the deny-list to avoid the bogus battery status reporting. Signed-off-by: Guoyi Zhang <kuoi@bioarchlinux.org> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20240221083425.440108-1-kuoi@bioarchlinux.org Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2024-02-21power: reset: rmobile-reset: Map correct MMIO resourceGeert Uytterhoeven
The registers related to reset generation are located in the second register block. However, the conversion to device life-cycle managed ioremap function accidentally changed the mapping to the first register block. Fixes: 0867276eb12230a5 ("power: reset: rmobile-reset: Use devm_platform_ioremap_resource() helper") Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/3b267fb1b303f63248934a1a77bee319e1c44879.1708458882.git.geert+renesas@glider.be Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2024-02-21power: reset: xgene-reboot: Fix a NULL vs IS_ERR() testDan Carpenter
The devm_platform_ioremap_resource() function returns error points. It never returns NULL. Update the check accordingly. Fixes: 7ddfd33c6ee5 ("power: reset: xgene-reboot: Use devm_platform_ioremap_resource() helper") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Acked-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/fe1b90d0-7234-4e03-accc-69a119f6a7eb@moroto.mountain Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2024-02-17power: supply: axp288_fuel_gauge: Add STCK1A* Intel Compute Sticks to the ↵Hans de Goede
deny-list Besides the existing STK1A* Cherry Trail based Intel Compute Sticks already on the deny-list, Intel also made Bay Trail based Compute Sticks which have a product name of STCK1A* and wich also report a non existing battery with a random battery charge. Instead of adding 3 new deny-list entries for the 3 variants of the STCK1A* sticks consolidate the 2 Cherry Trail STK1AW32SC and STK1A32SC variants into a single entry with a partial match for STK1A* and add a single new STCK1A* match for the Bay Trail variants. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20240212090014.13719-1-hdegoede@redhat.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2024-02-13power: reset: syscon-poweroff: Use devm_register_sys_off_handler(POWER_OFF)Andrew Davis
Use device life-cycle managed register function to simplify probe and exit paths. This also makes our data struct per-device and not global, which allows for more than one instance of this device. Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20240212162831.67838-20-afd@ti.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2024-02-13power: reset: syscon-poweroff: Move device data into a structAndrew Davis
Currently all these device data elements are top level global variables. Move these into a struct. This will be used in the next patch when the global variable usage is removed. Doing this in two steps makes the patches easier to read. Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20240212162831.67838-19-afd@ti.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2024-02-13power: reset: restart-poweroff: Use devm_register_sys_off_handler(POWER_OFF)Andrew Davis
Use device life-cycle managed register function to simplify probe and exit paths. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20240212162831.67838-18-afd@ti.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2024-02-13power: reset: gemini-poweroff: Use devm_register_sys_off_handler(POWER_OFF)Andrew Davis
Use device life-cycle managed register function to simplify probe. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20240212162831.67838-17-afd@ti.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2024-02-13power: reset: as3722-poweroff: Use devm_register_sys_off_handler(POWER_OFF)Andrew Davis
Use device life-cycle managed register function to simplify probe and exit paths. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20240212162831.67838-16-afd@ti.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2024-02-13power: reset: regulator-poweroff: Use devm_register_sys_off_handler(POWER_OFF)Andrew Davis
Use device life-cycle managed register function to simplify probe and exit paths. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20240212162831.67838-15-afd@ti.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2024-02-13power: reset: msm-poweroff: Use devm_register_sys_off_handler(RESTART)Andrew Davis
Use device life-cycle managed register function to simplify probe. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20240212162831.67838-14-afd@ti.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2024-02-13power: reset: msm-poweroff: Use devm_register_sys_off_handler(POWER_OFF)Andrew Davis
Use this helper to register sys_off handler. Drivers should move away from setting pm_power_off directly as it only allows for one handler. The new way allows for trying multiple if the first one doesn't work. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20240212162831.67838-13-afd@ti.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2024-02-13power: reset: mt6323-poweroff: Use devm_register_sys_off_handler(POWER_OFF)Andrew Davis
Use device life-cycle managed register function to simplify probe and exit paths. Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20240212162831.67838-12-afd@ti.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2024-02-13power: reset: rmobile-reset: Use devm_register_sys_off_handler(RESTART)Andrew Davis
Use device life-cycle managed register function to simplify probe and exit paths. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20240212162831.67838-11-afd@ti.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2024-02-13power: reset: rmobile-reset: Use devm_platform_ioremap_resource() helperAndrew Davis
Use device life-cycle managed ioremap function to simplify probe and exit paths. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20240212162831.67838-10-afd@ti.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2024-02-13power: reset: axxia-reset: Use devm_register_sys_off_handler(RESTART)Andrew Davis
Use device life-cycle managed register function to simplify probe. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20240212162831.67838-9-afd@ti.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2024-02-13power: reset: brcm-kona-reset: Use devm_register_sys_off_handler(RESTART)Andrew Davis
Use device life-cycle managed register function to simplify probe. Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com> Link: https://lore.kernel.org/r/20240212162831.67838-8-afd@ti.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2024-02-13power: reset: tps65086-restart: Remove unneeded device data structAndrew Davis
We only need one member of the struct tps65086_restart, pass that tps65086_restart_notify() directly. Remove that struct and its allocation. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20240212162831.67838-7-afd@ti.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2024-02-13power: reset: tps65086-restart: Use devm_register_sys_off_handler(RESTART)Andrew Davis
Use device life-cycle managed register function to simplify probe and exit paths. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20240212162831.67838-6-afd@ti.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2024-02-13power: reset: xgene-reboot: Use devm_register_sys_off_handler(RESTART)Andrew Davis
Use device life-cycle managed register function to simplify probe. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20240212162831.67838-5-afd@ti.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2024-02-13power: reset: xgene-reboot: Use devm_platform_ioremap_resource() helperAndrew Davis
Use device life-cycle managed ioremap function to simplify probe and exit paths. While here add __iomem to the returned pointer to fix a sparse warning. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20240212162831.67838-4-afd@ti.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2024-02-13power: reset: atc260x-poweroff: Use devm_register_sys_off_handler(POWER_OFF)Andrew Davis
Use device life-cycle managed register function to simplify probe and exit paths. Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Link: https://lore.kernel.org/r/20240212162831.67838-3-afd@ti.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2024-02-13power: reset: atc260x-poweroff: Use devm_register_sys_off_handler(RESTART)Andrew Davis
Use device life-cycle managed register function to simplify probe and exit paths. Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Link: https://lore.kernel.org/r/20240212162831.67838-2-afd@ti.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2024-02-02power: supply: axp20x_usb_power: enable usb_type reportingAren Moynihan
The axp803 and axp813 chips can report the detected USB BC mode. SDP, CDP, and DCP are supported. Signed-off-by: Aren Moynihan <aren@peacevolution.org> Link: https://lore.kernel.org/r/20240130203714.3020464-5-aren@peacevolution.org Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2024-02-02power: supply: axp20x_usb_power: fix race condition with usb bcAren Moynihan
When input_current_limit is set while USB BC is in progress, the BC module will overwrite the value that was set when it finishes detection. Signed-off-by: Aren Moynihan <aren@peacevolution.org> Link: https://lore.kernel.org/r/20240130203714.3020464-4-aren@peacevolution.org Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2024-02-02power: supply: axp20x_usb_power: use correct register for input current limitAren Moynihan
On the axp803 and axp813 chips register 0x30 bits 0-1 is the default current limit that gets applied after the pmic detects a CDP or DCP port. The correct field to set is 0x35 bits 4-7. This field only has nine values (out of the 16 possible if it used all the bits), so introduce a field size variable to take that into account. Signed-off-by: Aren Moynihan <aren@peacevolution.org> Link: https://lore.kernel.org/r/20240130203714.3020464-3-aren@peacevolution.org Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2024-02-02power: supply: axp20x_usb_power: replace current_max with input_current_limitAren Moynihan
The current_max property is supposed to be read-only, and represent the maximum current the supply can provide. input_current_limit is the limit that is currently set, which is what we have here. When determining what value to write to the register, we need to pick a reasonable value if the requested limit doesn't exactly match one supported by the hardware. If the requested limit is less than the lowest value we can set, round up to the lowest value. Otherwise round down to the nearest value supported by hardware. Also add a dev field to the axp20x_usb_power struct, so we can use dev_dbg and dev_err in more places. Signed-off-by: Aren Moynihan <aren@peacevolution.org> Link: https://lore.kernel.org/r/20240130203714.3020464-2-aren@peacevolution.org Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2024-02-01power: supply: wm8350: Use devm_power_supply_register() helperAndrew Davis
Use the device lifecycle managed register function. This helps prevent mistakes like unregistering out of order in cleanup functions and forgetting to unregister on error paths. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20240129190246.73067-5-afd@ti.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2024-02-01power: supply: max8925: Use devm_power_supply_register() helperAndrew Davis
Use the device lifecycle managed register function. This helps prevent mistakes like unregistering out of order in cleanup functions and forgetting to unregister on error paths. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20240129190246.73067-4-afd@ti.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2024-02-01power: supply: max77693: Use devm_power_supply_register() helperAndrew Davis
Use the device lifecycle managed register function. This helps prevent mistakes like unregistering out of order in cleanup functions and forgetting to unregister on error paths. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20240129190246.73067-3-afd@ti.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2024-02-01power: supply: max14577: Use devm_power_supply_register() helperAndrew Davis
Use the device lifecycle managed register function. This helps prevent mistakes like unregistering out of order in cleanup functions and forgetting to unregister on error paths. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20240129190246.73067-2-afd@ti.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2024-01-27power: supply: twl4030_madc: Use devm_power_supply_register() helperAndrew Davis
Use the device lifecycle managed register function. This helps prevent mistakes like unregistering out of order in cleanup functions and forgetting to unregister on error paths. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20240123163653.384385-22-afd@ti.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2024-01-27power: supply: twl4030_madc: Use devm_iio_channel_get() helperAndrew Davis
Use the device lifecycle managed get function. This helps prevent mistakes like releasing out of order in cleanup functions and forgetting to release on error paths. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20240123163653.384385-21-afd@ti.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2024-01-27power: supply: rx51: Use devm_power_supply_register() helperAndrew Davis
Use the device lifecycle managed register function. This helps prevent mistakes like unregistering out of order in cleanup functions and forgetting to unregister on error paths. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20240123163653.384385-20-afd@ti.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2024-01-27power: supply: rx51: Use devm_iio_channel_get() helperAndrew Davis
Use the device lifecycle managed get function. This helps prevent mistakes like releasing out of order in cleanup functions and forgetting to release on error paths. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20240123163653.384385-19-afd@ti.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2024-01-27power: supply: da9150: Use devm_power_supply_register() helperAndrew Davis
Use the device lifecycle managed register function. This helps prevent mistakes like unregistering out of order in cleanup functions and forgetting to unregister on error paths. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20240123163653.384385-18-afd@ti.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2024-01-27power: supply: da9150: Use devm_iio_channel_get() helperAndrew Davis
Use the device lifecycle managed get function. This helps prevent mistakes like releasing out of order in cleanup functions and forgetting to release on error paths. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20240123163653.384385-17-afd@ti.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2024-01-27power: supply: wm831x: Use devm_power_supply_register() helperAndrew Davis
Use the device lifecycle managed register function. This helps prevent mistakes like unregistering out of order in cleanup functions and forgetting to unregister on error paths. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20240123163653.384385-15-afd@ti.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2024-01-27power: supply: wm831x: Use devm_power_supply_register() helperAndrew Davis
Use the device lifecycle managed register function. This helps prevent mistakes like unregistering out of order in cleanup functions and forgetting to unregister on error paths. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20240123163653.384385-14-afd@ti.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2024-01-27power: supply: tps65090: Use devm_power_supply_register() helperAndrew Davis
Use the device lifecycle managed register function. This helps prevent mistakes like unregistering out of order in cleanup functions and forgetting to unregister on error paths. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20240123163653.384385-13-afd@ti.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2024-01-27power: supply: rt5033: Use devm_power_supply_register() helperAndrew Davis
Use the device lifecycle managed register function. This helps prevent mistakes like unregistering out of order in cleanup functions and forgetting to unregister on error paths. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20240123163653.384385-12-afd@ti.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2024-01-27power: supply: pcf50633: Use devm_power_supply_register() helperAndrew Davis
Use the device lifecycle managed register function. This helps prevent mistakes like unregistering out of order in cleanup functions and forgetting to unregister on error paths. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20240123163653.384385-11-afd@ti.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2024-01-27power: supply: lp8788: Use devm_power_supply_register() helperAndrew Davis
Use the device lifecycle managed register function. This helps prevent mistakes like unregistering out of order in cleanup functions and forgetting to unregister on error paths. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20240123163653.384385-7-afd@ti.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>