summaryrefslogtreecommitdiffstats
path: root/drivers/power/reset
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'soc-ep93xx-dt-6.12' of ↵Linus Torvalds2024-09-263-0/+95
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull SoC update from Arnd Bergmann: "Convert ep93xx to devicetree This concludes a long journey towards replacing the old board files with devictree description on the Cirrus Logic EP93xx platform. Nikita Shubin has been working on this for a long time, for details see the last post on https://lore.kernel.org/lkml/20240909-ep93xx-v12-0-e86ab2423d4b@maquefel.me/" * tag 'soc-ep93xx-dt-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (47 commits) dt-bindings: gpio: ep9301: Add missing "#interrupt-cells" to examples MAINTAINERS: Update EP93XX ARM ARCHITECTURE maintainer soc: ep93xx: drop reference to removed EP93XX_SOC_COMMON config net: cirrus: use u8 for addr to calm down sparse dmaengine: cirrus: use snprintf() to calm down gcc 13.3.0 dmaengine: ep93xx: Fix a NULL vs IS_ERR() check in probe() pinctrl: ep93xx: Fix raster pins typo spi: ep93xx: update kerneldoc comments for ep93xx_spi clk: ep93xx: Fix off by one in ep93xx_div_recalc_rate() clk: ep93xx: add module license dmaengine: cirrus: remove platform code ASoC: cirrus: edb93xx: Delete driver ARM: ep93xx: soc: drop defines ARM: ep93xx: delete all boardfiles ata: pata_ep93xx: remove legacy pinctrl use pwm: ep93xx: drop legacy pinctrl ARM: ep93xx: DT for the Cirrus ep93xx SoC platforms ARM: dts: ep93xx: Add EDB9302 DT ARM: dts: ep93xx: add ts7250 board ARM: dts: add Cirrus EP93XX SoC .dtsi ...
| * power: reset: Add a driver for the ep93xx resetNikita Shubin2024-09-123-0/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | Implement the reset behaviour of the various EP93xx SoCS in drivers/power/reset. It used to be located in arch/arm/mach-ep93xx. Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me> Tested-by: Alexander Sverdlin <alexander.sverdlin@gmail.com> Acked-by: Sebastian Reichel <sre@kernel.org> Acked-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
* | power: reset: brcmstb: Do not go into infinite loop if reset failsAndrew Davis2024-08-271-3/+0
| | | | | | | | | | | | | | | | | | | | | | There may be other backup reset methods available, do not halt here so that other reset methods can be tried. Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Dhruva Gole <d-gole@ti.com> Acked-by: Florian Fainelli <florian.fainelli@broadcom.com> Link: https://lore.kernel.org/r/20240610142836.168603-5-afd@ti.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
* | power: reset: brcmstb: Use devm_register_sys_off_handler()Andrew Davis2024-08-271-8/+3
| | | | | | | | | | | | | | | | | | | | | | Function register_restart_handler() is deprecated. Using this new API removes our need to keep and manage a struct notifier_block. Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Dhruva Gole <d-gole@ti.com> Acked-by: Florian Fainelli <florian.fainelli@broadcom.com> Link: https://lore.kernel.org/r/20240610142836.168603-4-afd@ti.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
* | power: reset: brcmstb: Use syscon_regmap_lookup_by_phandle_args() helperAndrew Davis2024-08-271-18/+4
| | | | | | | | | | | | | | | | | | | | Simplify probe by fetching the regmap and its arguments in one call. Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Dhruva Gole <d-gole@ti.com> Acked-by: Florian Fainelli <florian.fainelli@broadcom.com> Link: https://lore.kernel.org/r/20240610142836.168603-3-afd@ti.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
* | power: reset: brcmstb: Use device_get_match_data() for matchingAndrew Davis2024-08-271-11/+9
| | | | | | | | | | | | | | | | | | | | Use device_get_match_data() for finding the matching node and fetching the match data all in one. Signed-off-by: Andrew Davis <afd@ti.com> Acked-by: Florian Fainelli <florian.fainelli@broadcom.com> Link: https://lore.kernel.org/r/20240610142836.168603-2-afd@ti.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
* | power: reset: brcmstb: Use normal driver register functionAndrew Davis2024-08-271-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | The platform_driver_probe() helper is useful when the probe function is in the _init section, that is not the case here. Use the normal platform_driver_register() function. Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Dhruva Gole <d-gole@ti.com> Acked-by: Florian Fainelli <florian.fainelli@broadcom.com> Link: https://lore.kernel.org/r/20240610142836.168603-1-afd@ti.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
* | power: reset: pwr-mlxbf: support graceful shutdownAsmaa Mnebhi2024-08-271-13/+3
|/ | | | | | | | | | | | | | The OCP board used a BlueField's GPIO pin for entering low power mode. That board was not commercialized and has been dropped from production so all its code is unused. The new hardware requirement is to trigger a graceful shutdown when that GPIO pin is toggled. So replace the unused low power mode with a graceful shutdown. Signed-off-by: Asmaa Mnebhi <asmaa@nvidia.com> Reviewed-by: David Thompson <davthompson@nvidia.com> Link: https://lore.kernel.org/r/20240611134327.30975-1-asmaa@nvidia.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
* power: reset: piix4: add missing MODULE_DESCRIPTION() macroJeff Johnson2024-06-261-0/+1
| | | | | | | | | | | make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/power/reset/piix4-poweroff.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> Link: https://lore.kernel.org/r/20240608-md-drivers-power-reset-v1-1-08dbc1a546a2@quicinc.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
* power: reset: rmobile-reset: Make sysc_base2 localGeert Uytterhoeven2024-02-261-3/+4
| | | | | | | | | | 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>
* power: reset: rmobile-reset: Map correct MMIO resourceGeert Uytterhoeven2024-02-211-1/+1
| | | | | | | | | | | | | 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>
* power: reset: xgene-reboot: Fix a NULL vs IS_ERR() testDan Carpenter2024-02-211-2/+2
| | | | | | | | | | | 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>
* power: reset: syscon-poweroff: Use devm_register_sys_off_handler(POWER_OFF)Andrew Davis2024-02-131-19/+11
| | | | | | | | | | | | | 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>
* power: reset: syscon-poweroff: Move device data into a structAndrew Davis2024-02-131-16/+24
| | | | | | | | | | | | 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>
* power: reset: restart-poweroff: Use devm_register_sys_off_handler(POWER_OFF)Andrew Davis2024-02-131-17/+8
| | | | | | | | | 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>
* power: reset: gemini-poweroff: Use devm_register_sys_off_handler(POWER_OFF)Andrew Davis2024-02-131-7/+9
| | | | | | | | 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>
* power: reset: as3722-poweroff: Use devm_register_sys_off_handler(POWER_OFF)Andrew Davis2024-02-131-19/+11
| | | | | | | | | 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>
* power: reset: regulator-poweroff: Use devm_register_sys_off_handler(POWER_OFF)Andrew Davis2024-02-131-23/+13
| | | | | | | | | 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>
* power: reset: msm-poweroff: Use devm_register_sys_off_handler(RESTART)Andrew Davis2024-02-131-15/+4
| | | | | | | | 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>
* power: reset: msm-poweroff: Use devm_register_sys_off_handler(POWER_OFF)Andrew Davis2024-02-131-2/+6
| | | | | | | | | | 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>
* power: reset: mt6323-poweroff: Use devm_register_sys_off_handler(POWER_OFF)Andrew Davis2024-02-131-13/+13
| | | | | | | | | | 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>
* power: reset: rmobile-reset: Use devm_register_sys_off_handler(RESTART)Andrew Davis2024-02-131-16/+6
| | | | | | | | | 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>
* power: reset: rmobile-reset: Use devm_platform_ioremap_resource() helperAndrew Davis2024-02-131-9/+4
| | | | | | | | | 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>
* power: reset: axxia-reset: Use devm_register_sys_off_handler(RESTART)Andrew Davis2024-02-131-10/+6
| | | | | | | | 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>
* power: reset: brcm-kona-reset: Use devm_register_sys_off_handler(RESTART)Andrew Davis2024-02-131-8/+3
| | | | | | | | | 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>
* power: reset: tps65086-restart: Remove unneeded device data structAndrew Davis2024-02-131-27/+8
| | | | | | | | | | 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>
* power: reset: tps65086-restart: Use devm_register_sys_off_handler(RESTART)Andrew Davis2024-02-131-28/+7
| | | | | | | | | 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>
* power: reset: xgene-reboot: Use devm_register_sys_off_handler(RESTART)Andrew Davis2024-02-131-9/+4
| | | | | | | | 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>
* power: reset: xgene-reboot: Use devm_platform_ioremap_resource() helperAndrew Davis2024-02-131-5/+3
| | | | | | | | | | | 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>
* power: reset: atc260x-poweroff: Use devm_register_sys_off_handler(POWER_OFF)Andrew Davis2024-02-131-24/+14
| | | | | | | | | | 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>
* power: reset: atc260x-poweroff: Use devm_register_sys_off_handler(RESTART)Andrew Davis2024-02-131-10/+7
| | | | | | | | | | 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>
* power: reset: at91: Drop '__init' from at91_wakeup_status()Nathan Chancellor2023-12-242-2/+2
| | | | | | | | | | | | | | | | When building with clang, there are two section mismatch warnings: WARNING: modpost: vmlinux: section mismatch in reference: at91_poweroff_probe+0x7c (section: .text) -> at91_wakeup_status (section: .init.text) WARNING: modpost: vmlinux: section mismatch in reference: at91_shdwc_probe+0xcc (section: .text) -> at91_wakeup_status (section: .init.text) Drop '__init' from at91_wakeup_status() to clear up the mismatch. Fixes: dde74a5de817 ("power: reset: at91-sama5d2_shdwc: Stop using module_platform_driver_probe()") Fixes: 099806de68b7 ("power: reset: at91-poweroff: Stop using module_platform_driver_probe()") Signed-off-by: Nathan Chancellor <nathan@kernel.org> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
* power: reset: gpio-restart: Use devm_register_sys_off_handler()Andrew Davis2023-12-241-25/+9
| | | | | | | | Use device life-cycle managed register function to simplify probe error path and eliminate need for explicit remove function. Signed-off-by: Andrew Davis <afd@ti.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
* power: reset: at91-sama5d2_shdwc: Convert to platform remove callback ↵Uwe Kleine-König2023-11-151-4/+2
| | | | | | | | | | | | | | | | | | | | | | returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> Link: https://lore.kernel.org/r/20231105094712.3706799-4-u.kleine-koenig@pengutronix.de Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
* power: reset: at91-reset: Convert to platform remove callback returning voidUwe Kleine-König2023-11-151-4/+2
| | | | | | | | | | | | | | | | | | | | The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> Link: https://lore.kernel.org/r/20231105094712.3706799-3-u.kleine-koenig@pengutronix.de Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
* power: reset: tps65086-restart: Convert to platform remove callback ↵Uwe Kleine-König2023-11-151-5/+7
| | | | | | | | | | | | | | | | | | | | | | returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Returning an error if unregister_restart_handler() failed has no effect but triggering another error message. So converting this driver to .remove_new() has no effect but to suppress the duplicated error message. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20231104211501.3676352-30-u.kleine-koenig@pengutronix.de Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
* power: reset: syscon-poweroff: Convert to platform remove callback returning ↵Uwe Kleine-König2023-11-151-4/+2
| | | | | | | | | | | | | | | | | | | | | void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20231104211501.3676352-29-u.kleine-koenig@pengutronix.de Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
* power: reset: rmobile-reset: Convert to platform remove callback returning voidUwe Kleine-König2023-11-151-3/+2
| | | | | | | | | | | | | | | | | | | The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20231104211501.3676352-28-u.kleine-koenig@pengutronix.de Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
* power: reset: restart-poweroff: Convert to platform remove callback ↵Uwe Kleine-König2023-11-151-4/+2
| | | | | | | | | | | | | | | | | | | | | returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20231104211501.3676352-27-u.kleine-koenig@pengutronix.de Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
* power: reset: regulator-poweroff: Convert to platform remove callback ↵Uwe Kleine-König2023-11-151-4/+2
| | | | | | | | | | | | | | | | | | | | | returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20231104211501.3676352-26-u.kleine-koenig@pengutronix.de Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
* power: reset: qnap-poweroff: Convert to platform remove callback returning voidUwe Kleine-König2023-11-151-3/+2
| | | | | | | | | | | | | | | | | | | The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20231104211501.3676352-25-u.kleine-koenig@pengutronix.de Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
* power: reset: mt6323-poweroff: Convert to platform remove callback returning ↵Uwe Kleine-König2023-11-151-4/+2
| | | | | | | | | | | | | | | | | | | | | | void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20231104211501.3676352-24-u.kleine-koenig@pengutronix.de Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
* power: reset: ltc2952-poweroff: Convert to platform remove callback ↵Uwe Kleine-König2023-11-151-3/+2
| | | | | | | | | | | | | | | | | | | | | returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20231104211501.3676352-23-u.kleine-koenig@pengutronix.de Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
* power: reset: atc260x-poweroff: Convert to platform remove callback ↵Uwe Kleine-König2023-11-151-4/+2
| | | | | | | | | | | | | | | | | | | | | returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20231104211501.3676352-22-u.kleine-koenig@pengutronix.de Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
* power: reset: at91-poweroff: Convert to platform remove callback returning voidUwe Kleine-König2023-11-151-4/+2
| | | | | | | | | | | | | | | | | | | | The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> Link: https://lore.kernel.org/r/20231104211501.3676352-21-u.kleine-koenig@pengutronix.de Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
* power: reset: as3722-poweroff: Convert to platform remove callback returning ↵Uwe Kleine-König2023-11-151-4/+2
| | | | | | | | | | | | | | | | | | | | | void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20231104211501.3676352-20-u.kleine-koenig@pengutronix.de Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
* power: reset: at91-sama5d2_shdwc: Stop using module_platform_driver_probe()Uwe Kleine-König2023-11-151-4/+5
| | | | | | | | | | | | | | | | | | | | On today's platforms the benefit of platform_driver_probe() isn't that relevant any more. It allows to drop some code after booting (or module loading) for .probe() and discard the .remove() function completely if the driver is built-in. This typically saves a few 100k. The downside of platform_driver_probe() is that the driver cannot be bound and unbound at runtime which is ancient and so slightly complicates testing. There are also thoughts to deprecate platform_driver_probe() because it adds some complexity in the driver core for little gain. Also many drivers don't use it correctly. This driver for example misses to mark the driver struct with __ref which is needed to suppress a (W=1) modpost warning. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> Link: https://lore.kernel.org/r/20231104211501.3676352-19-u.kleine-koenig@pengutronix.de Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
* power: reset: at91-reset: Stop using module_platform_driver_probe()Uwe Kleine-König2023-11-151-4/+5
| | | | | | | | | | | | | | | | | | | | On today's platforms the benefit of platform_driver_probe() isn't that relevant any more. It allows to drop some code after booting (or module loading) for .probe() and discard the .remove() function completely if the driver is built-in. This typically saves a few 100k. The downside of platform_driver_probe() is that the driver cannot be bound and unbound at runtime which is ancient and so slightly complicates testing. There are also thoughts to deprecate platform_driver_probe() because it adds some complexity in the driver core for little gain. Also many drivers don't use it correctly. This driver for example misses to mark the driver struct with __ref which is needed to suppress a (W=1) modpost warning. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> Link: https://lore.kernel.org/r/20231104211501.3676352-18-u.kleine-koenig@pengutronix.de Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
* power: reset: at91-poweroff: Stop using module_platform_driver_probe()Uwe Kleine-König2023-11-151-4/+5
| | | | | | | | | | | | | | | | | | | | On today's platforms the benefit of platform_driver_probe() isn't that relevant any more. It allows to drop some code after booting (or module loading) for .probe() and discard the .remove() function completely if the driver is built-in. This typically saves a few 100k. The downside of platform_driver_probe() is that the driver cannot be bound and unbound at runtime which is ancient and so slightly complicates testing. There are also thoughts to deprecate platform_driver_probe() because it adds some complexity in the driver core for little gain. Also many drivers don't use it correctly. This driver for example misses to mark the driver struct with __ref which is needed to suppress a (W=1) modpost warning. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> Link: https://lore.kernel.org/r/20231104211501.3676352-17-u.kleine-koenig@pengutronix.de Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
* power: reset: pwr-mlxbf: support graceful reboot instead of emergency resetAsmaa Mnebhi2023-11-151-5/+15
| | | | | | | | | | Replace the soft reset with a graceful reboot. An acpi event will be triggered by the irq in the pwr-mlxbf.c to trigger the graceful reboot. Signed-off-by: Asmaa Mnebhi <asmaa@nvidia.com> Link: https://lore.kernel.org/r/20231030203058.8056-1-asmaa@nvidia.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>