aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim Pasternak <[email protected]>2023-08-22 11:34:42 +0000
committerHans de Goede <[email protected]>2023-08-23 17:31:28 +0200
commit75e09ab42066b93ec30ba1a9d5d252e40916320a (patch)
tree044934837fcbce154f512097dd90ff00e1bd79fd
parent3d0593c6336cbc6d1b77473e9512cdf0353a4644 (diff)
platform: mellanox: mlx-platform: Modify power off callback
Extend platform power off callback with kernel_halt() call. When powering off, the process involves setting a halt bit in the register space, which is then activated after a certain delay and power off auxiliary power. By invoking `kernel_halt()` within this timeframe, the intention is to facilitate a clean system power-off sequence. Signed-off-by: Vadim Pasternak <[email protected]> Reviewed-by: Michael Shych <[email protected]> Reviewed-by: Hans de Goede <[email protected]> Reviewed-by: Ilpo Järvinen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Hans de Goede <[email protected]>
-rw-r--r--drivers/platform/x86/mlx-platform.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/platform/x86/mlx-platform.c b/drivers/platform/x86/mlx-platform.c
index dce35934cc37..a505f619f337 100644
--- a/drivers/platform/x86/mlx-platform.c
+++ b/drivers/platform/x86/mlx-platform.c
@@ -5539,6 +5539,7 @@ static void mlxplat_poweroff(void)
struct mlxplat_priv *priv = platform_get_drvdata(mlxplat_dev);
regmap_write(priv->regmap, MLXPLAT_CPLD_LPC_REG_GP1_OFFSET, MLXPLAT_CPLD_HALT_MASK);
+ kernel_halt();
}
static int __init mlxplat_dmi_default_matched(const struct dmi_system_id *dmi)