Commit 68732c0b authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull pmdomain updates from Ulf Hansson:
 "pmdomain core:
   - Add support for naming idlestates through DT

  pmdomain providers:
   - arm: Explicitly request the current state at init for the SCMI PM
     domain
   - mediatek: Add Airoha CPU PM Domain support for CPU frequency
     scaling
   - ti: Add per-device latency constraint management to the ti_sci PM
     domain

  cpuidle-psci:
   - Enable system-wakeup through GENPD_FLAG_ACTIVE_WAKEUP"

* tag 'pmdomain-v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm:
  pmdomain: airoha: Fix compilation error with Clang-20 and Thumb2 mode
  pmdomain: arm: scmi_pm_domain: Send an explicit request to set the current state
  pmdomain: airoha: Add Airoha CPU PM Domain support
  pmdomain: ti_sci: handle wake IRQs for IO daisy chain wakeups
  pmdomain: ti_sci: add wakeup constraint management
  pmdomain: ti_sci: add per-device latency constraint management
  pmdomain: imx-gpcv2: Suppress bind attrs
  pmdomain: imx8m[p]-blk-ctrl: Suppress bind attrs
  pmdomain: core: Support naming idle states
  dt-bindings: power: domain-idle-state: Allow idle-state-name
  cpuidle: psci: Activate GENPD_FLAG_ACTIVE_WAKEUP with OSI
parents b746043c 885f5669
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -54,6 +54,11 @@ patternProperties:
          (i.e. idle states node with entry-method property is set to "psci")
          must specify this property.

      idle-state-name:
        $ref: /schemas/types.yaml#/definitions/string
        description:
          A string used as a descriptive name for the idle state.

    required:
      - compatible
      - entry-latency-us
+1 −0
Original line number Diff line number Diff line
@@ -72,6 +72,7 @@ static int psci_pd_init(struct device_node *np, bool use_osi)
	 */
	if (use_osi) {
		pd->power_off = psci_pd_power_off;
		pd->flags |= GENPD_FLAG_ACTIVE_WAKEUP;
		if (IS_ENABLED(CONFIG_PREEMPT_RT))
			pd->flags |= GENPD_FLAG_RPM_ALWAYS_ON;
	} else {
+8 −0
Original line number Diff line number Diff line
@@ -96,6 +96,14 @@ static int scmi_pm_domain_probe(struct scmi_device *sdev)
			continue;
		}

		/*
		 * Register the explicit power on request to the firmware so
		 * that it is tracked as used by OSPM agent and not
		 * accidentally turned off with OSPM's knowledge
		 */
		if (state == SCMI_POWER_STATE_GENERIC_ON)
			power_ops->state_set(ph, i, state);

		scmi_pd->domain = i;
		scmi_pd->ph = ph;
		scmi_pd->name = power_ops->name_get(ph, i);
+12 −3
Original line number Diff line number Diff line
@@ -3180,6 +3180,8 @@ static int genpd_parse_state(struct genpd_power_state *genpd_state,
	if (!err)
		genpd_state->residency_ns = 1000LL * residency;

	of_property_read_string(state_node, "idle-state-name", &genpd_state->name);

	genpd_state->power_on_latency_ns = 1000LL * exit_latency;
	genpd_state->power_off_latency_ns = 1000LL * entry_latency;
	genpd_state->fwnode = &state_node->fwnode;
@@ -3458,7 +3460,10 @@ static int idle_states_show(struct seq_file *s, void *data)
	seq_puts(s, "State          Time Spent(ms) Usage          Rejected\n");

	for (i = 0; i < genpd->state_count; i++) {
		idle_time += genpd->states[i].idle_time;
		struct genpd_power_state *state = &genpd->states[i];
		char state_name[15];

		idle_time += state->idle_time;

		if (genpd->status == GENPD_STATE_OFF && genpd->state_idx == i) {
			now = ktime_get_mono_fast_ns();
@@ -3468,9 +3473,13 @@ static int idle_states_show(struct seq_file *s, void *data)
			}
		}

		if (!state->name)
			snprintf(state_name, ARRAY_SIZE(state_name), "S%-13d", i);

		do_div(idle_time, NSEC_PER_MSEC);
		seq_printf(s, "S%-13i %-14llu %-14llu %llu\n", i, idle_time,
			   genpd->states[i].usage, genpd->states[i].rejected);
		seq_printf(s, "%-14s %-14llu %-14llu %llu\n",
			   state->name ?: state_name, idle_time,
			   state->usage, state->rejected);
	}

	genpd_unlock(genpd);
+2 −0
Original line number Diff line number Diff line
@@ -1437,6 +1437,7 @@ static struct platform_driver imx_pgc_domain_driver = {
	.driver = {
		.name = "imx-pgc",
		.pm = &imx_pgc_domain_pm_ops,
		.suppress_bind_attrs = true,
	},
	.probe    = imx_pgc_domain_probe,
	.remove = imx_pgc_domain_remove,
@@ -1549,6 +1550,7 @@ static struct platform_driver imx_gpc_driver = {
	.driver = {
		.name = "imx-gpcv2",
		.of_match_table = imx_gpcv2_dt_ids,
		.suppress_bind_attrs = true,
	},
	.probe = imx_gpcv2_probe,
};
Loading