From: Thierry Reding <thierry.reding@kernel.org>
To: Diogo Ivo <diogo.ivo@tecnico.ulisboa.pt>
Cc: Jonathan Hunter <jonathanh@nvidia.com>,
linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] soc/tegra: pmc: Restrict power-off handler to Nexus 7
Date: Thu, 28 May 2026 23:05:04 +0200 [thread overview]
Message-ID: <ahitdhEQzBzBEhfJ@orome> (raw)
In-Reply-To: <20260521-smaug-poweroff-v1-1-a0b3a778fbe0@tecnico.ulisboa.pt>
[-- Attachment #1: Type: text/plain, Size: 1169 bytes --]
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@tecnico.ulisboa.pt>
> ---
> 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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2026-05-28 21:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-21 13:48 Diogo Ivo
2026-05-28 21:05 ` Thierry Reding [this message]
2026-05-28 21:05 ` Thierry Reding
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ahitdhEQzBzBEhfJ@orome \
--to=thierry.reding@kernel.org \
--cc=diogo.ivo@tecnico.ulisboa.pt \
--cc=jonathanh@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®