summaryrefslogtreecommitdiff
path: root/drivers/soc
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2025-02-03 18:17:37 +0100
committerThierry Reding <treding@nvidia.com>2026-01-18 08:48:28 +0100
commitf59dbd0c9388321336b0f5c57644fd8b0ee94aa9 (patch)
treefd970e22368d029218daf9f6a4c1228948959080 /drivers/soc
parente6d96073af681780820c94079b978474a8a44413 (diff)
downloadlinux-next-f59dbd0c9388321336b0f5c57644fd8b0ee94aa9.tar.gz
linux-next-f59dbd0c9388321336b0f5c57644fd8b0ee94aa9.zip
soc/tegra: pmc: Use contextual data instead of global variable
Pass the driver-specific data via the syscore struct and use it in the syscore ops. Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/soc')
-rw-r--r--drivers/soc/tegra/pmc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/soc/tegra/pmc.c b/drivers/soc/tegra/pmc.c
index 407fa840814c..2f283fc1c6c5 100644
--- a/drivers/soc/tegra/pmc.c
+++ b/drivers/soc/tegra/pmc.c
@@ -3192,6 +3192,7 @@ static void wke_clear_wake_status(struct tegra_pmc *pmc)
static void tegra186_pmc_wake_syscore_resume(void *data)
{
+ struct tegra_pmc *pmc = data;
unsigned int i;
u32 mask;
@@ -3206,6 +3207,7 @@ static void tegra186_pmc_wake_syscore_resume(void *data)
static int tegra186_pmc_wake_syscore_suspend(void *data)
{
+ struct tegra_pmc *pmc = data;
unsigned int i;
/* Check if there are unhandled wake IRQs */
@@ -3214,6 +3216,7 @@ static int tegra186_pmc_wake_syscore_suspend(void *data)
dev_warn(pmc->dev,
"Unhandled wake IRQs pending vector[%u]: 0x%x\n",
i, pmc->wake_status[i]);
+
wke_read_sw_wake_status(pmc);
/* flip the wakeup trigger for dual-edge triggered pads
@@ -3887,6 +3890,7 @@ static const struct tegra_pmc_regs tegra186_pmc_regs = {
static void tegra186_pmc_init(struct tegra_pmc *pmc)
{
pmc->syscore.ops = &tegra186_pmc_wake_syscore_ops;
+ pmc->syscore.data = pmc;
register_syscore(&pmc->syscore);
}