History log of /linux-master/drivers/power/reset/regulator-poweroff.c
Revision Date Author Comments
# 77b61173 12-Feb-2024 Andrew Davis <afd@ti.com>

power: reset: regulator-poweroff: Use devm_register_sys_off_handler(POWER_OFF)

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>


# 6f7be7b2 04-Nov-2023 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

power: reset: regulator-poweroff: Convert to platform remove callback 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>


# 24e4dba2 07-Mar-2023 Nick Alcock <nick.alcock@oracle.com>

power: reset: remove MODULE_LICENSE in non-modules

Since commit 8b41fc4454e ("kbuild: create modules.builtin without
Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations
are used to identify modules. As a consequence, uses of the macro
in non-modules will cause modprobe to misidentify their containing
object file as a module when it is not (false positives), and modprobe
might succeed rather than failing with a suitable error message.

So remove it in the files in this commit, none of which can be built as
modules.

Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
Suggested-by: Luis Chamberlain <mcgrof@kernel.org>
Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: linux-modules@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: Hitomi Hasegawa <hasegawa-hitomi@fujitsu.com>
Cc: Sebastian Reichel <sre@kernel.org>
Cc: linux-pm@vger.kernel.org
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>


# 4465b3a6 04-Jun-2021 Zou Wei <zou_wei@huawei.com>

power: reset: regulator-poweroff: add missing MODULE_DEVICE_TABLE

This patch adds missing MODULE_DEVICE_TABLE definition which generates
correct modalias for automatic loading of this driver when it is built
as an external module.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zou Wei <zou_wei@huawei.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>


# ec66096b 11-Dec-2020 Michael Klein <michael@fossekall.de>

power: reset: new driver regulator-poweroff

This driver registers a pm_power_off function to turn off the board
by force-disabling a devicetree-defined regulator.

Signed-off-by: Michael Klein <michael@fossekall.de>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>