Re: [PATCH] soc/tegra: pmc: Restrict power-off handler to Nexus 7
From: Thierry Reding
Date: Thu May 28 2026 - 17:07:27 EST
On Thu, May 21, 2026 at 03:48:48PM +0200, Diogo Ivo wrote:
> The Tegra PMC power-off handler exists solely to reboot the Nexus 7 into
> a special bootloader mode when a USB cable is connected, so that the
> bootloader can display battery status instead of powering off. There is
> no reason to register it on any other Tegra board.
>
> Guard the registration behind of_machine_is_compatible("asus,grouper")
> and rename the handler to tegra_pmc_grouper_power_off_handler to make
> its scope explicit. The of_machine_is_compatible() check inside the
> handler itself is now redundant and is removed.
>
> This also avoids occupying SYS_OFF_PRIO_FIRMWARE on boards that have
> other handlers at that priority level.
>
> Assisted-by: Claude:claude-sonnet-4-6
> Signed-off-by: Diogo Ivo <diogo.ivo@xxxxxxxxxxxxxxxxxx>
> ---
> drivers/soc/tegra/pmc.c | 29 +++++++++++++++--------------
> 1 file changed, 15 insertions(+), 14 deletions(-)
Not a fan of this. But also not a fan of the original that added this
for Grouper. Too much board-specific code in this driver now for my
taste. But then, we don't have a better place to put this.
Thierry
Attachment:
signature.asc
Description: PGP signature