- Nov 11, 2024
-
-
Arnd Bergmann authored
This fails to link when compile-testing and the auxiliary bus is not built-in: x86_64-linux-ld: drivers/power/reset/ep93xx-restart.o: in function `ep93xx_reboot_driver_init': ep93xx-restart.c:(.init.text+0x11): undefined reference to `__auxiliary_driver_register' x86_64-linux-ld: drivers/power/reset/ep93xx-restart.o: in function `ep93xx_reboot_driver_exit': ep93xx-restart.c:(.exit.text+0x8): undefined reference to `auxiliary_driver_unregister' Add the appropriate dependency. Fixes: 9fa7cdb4 ("power: reset: Add a driver for the ep93xx reset") Signed-off-by:
Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20241111104418.3891756-1-arnd@kernel.org Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com>
-
Ba Jing authored
After reviewing the code, it was found that these macros are never referenced in the code. Just remove them. Signed-off-by:
Ba Jing <bajing@cmss.chinamobile.com> Link: https://lore.kernel.org/r/20241025090659.33458-1-bajing@cmss.chinamobile.com Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com>
-
- Oct 21, 2024
-
-
Uwe Kleine-König authored
After commit 0edb555a ("platform: Make platform_driver::remove() return void") .remove() is (again) the right callback to implement for platform drivers. Convert all platform drivers below drivers/power/ to use .remove(), with the eventual goal to drop struct platform_driver::remove_new(). As .remove() and .remove_new() have the same prototypes, conversion is done by just changing the structure member name in the driver initializer. While touching these files, make indention of the struct initializer consistent in several files. Signed-off-by:
Uwe Kleine-König <u.kleine-koenig@baylibre.com> Link: https://lore.kernel.org/r/20241010203622.839625-6-u.kleine-koenig@baylibre.com Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com>
-
- Oct 16, 2024
-
-
Chris Packham authored
For historical reasons syscon-reboot has used an 'offset' property. As a child on a MMIO bus having a 'reg' property is more appropriate. Accept 'reg' as an alternative to 'offset'. Signed-off-by:
Chris Packham <chris.packham@alliedtelesis.co.nz> Reviewed-by:
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241015225948.3971924-3-chris.packham@alliedtelesis.co.nz Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com>
-
- Sep 12, 2024
-
-
Nikita Shubin authored
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>
-
- Aug 27, 2024
-
-
Andrew Davis authored
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>
-
Andrew Davis authored
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>
-
Andrew Davis authored
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>
-
Andrew Davis authored
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>
-
Andrew Davis authored
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>
-
Asmaa Mnebhi authored
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>
-
- Jun 26, 2024
-
-
Jeff Johnson authored
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>
-
- Feb 26, 2024
-
-
Geert Uytterhoeven authored
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>
-
- Feb 21, 2024
-
-
Geert Uytterhoeven authored
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: 0867276e ("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>
-
Dan Carpenter authored
The devm_platform_ioremap_resource() function returns error points. It never returns NULL. Update the check accordingly. Fixes: 7ddfd33c ("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>
-
- Feb 13, 2024
-
-
Andrew Davis authored
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>
-
Andrew Davis authored
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>
-
Andrew Davis authored
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>
-
Andrew Davis authored
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>
-
Andrew Davis authored
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>
-
Andrew Davis authored
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>
-
Andrew Davis authored
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>
-
Andrew Davis authored
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>
-
Andrew Davis authored
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>
-
Andrew Davis authored
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>
-
Andrew Davis authored
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>
-
Andrew Davis authored
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>
-
Andrew Davis authored
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>
-
Andrew Davis authored
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>
-
Andrew Davis authored
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>
-
Andrew Davis authored
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>
-
Andrew Davis authored
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>
-
Andrew Davis authored
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>
-
Andrew Davis authored
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>
-
- Dec 24, 2023
-
-
Nathan Chancellor authored
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: dde74a5d ("power: reset: at91-sama5d2_shdwc: Stop using module_platform_driver_probe()") Fixes: 099806de ("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>
-
Andrew Davis authored
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>
-
- Nov 15, 2023
-
-
Uwe Kleine-König authored
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>
-
Uwe Kleine-König authored
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>
-
Uwe Kleine-König authored
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>
-
Uwe Kleine-König authored
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>
-