Skip to content

Commit 9f8ccdb

Browse files
vadimp-nvidiajwrdegoede
authored andcommitted
platform: mellanox: mlx-platform: Modify graceful shutdown callback and power down mask
Use kernel_power_off() instead of kernel_halt() to pass through machine_power_off() -> pm_power_off(), otherwise axillary power does not go off. Change "power down" bitmask. Fixes: dd635e3 ("platform: mellanox: Introduce support of new Nvidia L1 switch") Signed-off-by: Vadim Pasternak <vadimp@nvidia.com> Reviewed-by: Michael Shych <michaelsh@nvidia.com> Link: https://lore.kernel.org/r/20230813083735.39090-4-vadimp@nvidia.com Signed-off-by: Hans de Goede <hdegoede@redhat.com>
1 parent 3c91d7e commit 9f8ccdb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/platform/x86/mlx-platform.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@
222222
MLXPLAT_CPLD_AGGR_MASK_LC_SDWN)
223223
#define MLXPLAT_CPLD_LOW_AGGR_MASK_LOW 0xc1
224224
#define MLXPLAT_CPLD_LOW_AGGR_MASK_ASIC2 BIT(2)
225-
#define MLXPLAT_CPLD_LOW_AGGR_MASK_PWR_BUT BIT(4)
225+
#define MLXPLAT_CPLD_LOW_AGGR_MASK_PWR_BUT GENMASK(5, 4)
226226
#define MLXPLAT_CPLD_LOW_AGGR_MASK_I2C BIT(6)
227227
#define MLXPLAT_CPLD_PSU_MASK GENMASK(1, 0)
228228
#define MLXPLAT_CPLD_PWR_MASK GENMASK(1, 0)
@@ -2356,7 +2356,7 @@ mlxplat_mlxcpld_l1_switch_pwr_events_handler(void *handle, enum mlxreg_hotplug_k
23562356
u8 action)
23572357
{
23582358
dev_info(&mlxplat_dev->dev, "System shutdown due to short press of power button");
2359-
kernel_halt();
2359+
kernel_power_off();
23602360
return 0;
23612361
}
23622362

0 commit comments

Comments
 (0)