Commit 8b35a3bb authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull pmdomain updates from Ulf Hansson:
 "pmdomain core:
   - Don't clear suspended_count at genpd_prepare()
   - Update the rejected/usage counters at system suspend too

  pmdomain providers:
   - ti-sci: Fix duplicate PD referrals
   - mediatek: Add MT8188 buck isolation setting
   - renesas: Add R-Car M3-W power-off delay quirk
   - renesas: Split R-Car M3-W and M3-W+ sub-drivers

  cpuidle-psci:
   - Update MAINTAINERS to set a git for DT IDLE PM DOMAIN/ARM PSCI PM
     DOMAIN
   - Update init level to core_initcall()
   - Drop superfluous wrappers psci_dt_attach|detach_cpu()"

* tag 'pmdomain-v6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm:
  pmdomain: ti-sci: Fix duplicate PD referrals
  pmdomain: core: Don't clear suspended_count at genpd_prepare()
  pmdomain: core: Update the rejected/usage counters at system suspend too
  pmdomain: renesas: rcar-sysc: Add R-Car M3-W power-off delay quirk
  pmdomain: renesas: rcar-sysc: Remove rcar_sysc_nullify() helper
  pmdomain: renesas: rcar-sysc: Split R-Car M3-W and M3-W+ sub-drivers
  pmdomain: renesas: rcar-sysc: Absorb rcar_sysc_ch into rcar_sysc_pd
  MAINTAINERS: Add a git for the DT IDLE PM DOMAIN
  MAINTAINERS: Add a git for the ARM PSCI PM DOMAIN
  cpuidle: psci: Update init level to core_initcall()
  cpuidle: psci: Drop superfluous wrappers psci_dt_attach|detach_cpu()
  pmdomain: mediatek: Add MT8188 buck isolation setting
  pmdomain: mediatek: scpsys: drop driver owner assignment
parents 6fd600d7 d88ea303
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -5658,6 +5658,7 @@ M: Ulf Hansson <ulf.hansson@linaro.org>
L:	linux-pm@vger.kernel.org
L:	linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S:	Supported
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm.git
F:	drivers/cpuidle/cpuidle-psci-domain.c
F:	drivers/cpuidle/cpuidle-psci.h
@@ -5665,6 +5666,7 @@ CPUIDLE DRIVER - DT IDLE PM DOMAIN
M:	Ulf Hansson <ulf.hansson@linaro.org>
L:	linux-pm@vger.kernel.org
S:	Supported
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm.git
F:	drivers/cpuidle/dt_idle_genpd.c
F:	drivers/cpuidle/dt_idle_genpd.h
+2 −1
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@
#include <linux/string.h>

#include "cpuidle-psci.h"
#include "dt_idle_genpd.h"

struct psci_pd_provider {
	struct list_head link;
@@ -200,4 +201,4 @@ static int __init psci_idle_init_domains(void)
{
	return platform_driver_register(&psci_cpuidle_domain_driver);
}
subsys_initcall(psci_idle_init_domains);
core_initcall(psci_idle_init_domains);
+3 −2
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@

#include "cpuidle-psci.h"
#include "dt_idle_states.h"
#include "dt_idle_genpd.h"

struct psci_cpuidle_data {
	u32 *psci_states;
@@ -224,7 +225,7 @@ static int psci_dt_cpu_init_topology(struct cpuidle_driver *drv,
	if (IS_ENABLED(CONFIG_PREEMPT_RT))
		return 0;

	data->dev = psci_dt_attach_cpu(cpu);
	data->dev = dt_idle_attach_cpu(cpu, "psci");
	if (IS_ERR_OR_NULL(data->dev))
		return PTR_ERR_OR_ZERO(data->dev);

@@ -311,7 +312,7 @@ static void psci_cpu_deinit_idle(int cpu)
{
	struct psci_cpuidle_data *data = per_cpu_ptr(&psci_cpuidle_data, cpu);

	psci_dt_detach_cpu(data->dev);
	dt_idle_detach_cpu(data->dev);
	psci_cpuidle_use_cpuhp = false;
}

+0 −20
Original line number Diff line number Diff line
@@ -3,29 +3,9 @@
#ifndef __CPUIDLE_PSCI_H
#define __CPUIDLE_PSCI_H

struct device;
struct device_node;

void psci_set_domain_state(u32 state);
int psci_dt_parse_state_node(struct device_node *np, u32 *state);

#ifdef CONFIG_ARM_PSCI_CPUIDLE_DOMAIN

#include "dt_idle_genpd.h"

static inline struct device *psci_dt_attach_cpu(int cpu)
{
	return dt_idle_attach_cpu(cpu, "psci");
}

static inline void psci_dt_detach_cpu(struct device *dev)
{
	dt_idle_detach_cpu(dev);
}

#else
static inline struct device *psci_dt_attach_cpu(int cpu) { return NULL; }
static inline void psci_dt_detach_cpu(struct device *dev) { }
#endif

#endif /* __CPUIDLE_PSCI_H */
+6 −5
Original line number Diff line number Diff line
@@ -1178,8 +1178,12 @@ static void genpd_sync_power_off(struct generic_pm_domain *genpd, bool use_lock,

	/* Choose the deepest state when suspending */
	genpd->state_idx = genpd->state_count - 1;
	if (_genpd_power_off(genpd, false))
	if (_genpd_power_off(genpd, false)) {
		genpd->states[genpd->state_idx].rejected++;
		return;
	} else {
		genpd->states[genpd->state_idx].usage++;
	}

	genpd->status = GENPD_STATE_OFF;

@@ -1251,10 +1255,7 @@ static int genpd_prepare(struct device *dev)
		return -EINVAL;

	genpd_lock(genpd);

	if (genpd->prepared_count++ == 0)
		genpd->suspended_count = 0;

	genpd->prepared_count++;
	genpd_unlock(genpd);

	ret = pm_generic_prepare(dev);
Loading