Commit c3739c50 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

Merge branches 'pm-core', 'pm-sleep', 'pm-qos', 'pm-domains' and 'pm-em'

* pm-core:
  PM / core: Add support to skip power management in device/driver model
  PM / suspend: Print debug messages for device using direct-complete
  PM-runtime: update time accounting only when enabled
  PM-runtime: Switch accounting over to ktime_get_mono_fast_ns()
  PM-runtime: Optimize pm_runtime_autosuspend_expiration()
  PM-runtime: Replace jiffies-based accounting with ktime-based accounting
  PM-runtime: update accounting_timestamp on enable
  PM: clock_ops: fix missing clk_prepare() return value check
  drm/i915: Move on the new pm runtime interface
  PM-runtime: Add new interface to get accounted time

* pm-sleep:
  PM / wakeup: fix kerneldoc comment for pm_wakeup_dev_event()

* pm-qos:
  PM: QoS: no need to check return value of debugfs_create functions

* pm-domains:
  PM / Domains: Mark "name" const in dev_pm_domain_attach_by_name()
  PM / Domains: Mark "name" const in genpd_dev_pm_attach_by_name()
  PM: domains: no need to check return value of debugfs_create functions

* pm-em:
  PM / EM: Expose the Energy Model in debugfs
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -427,6 +427,7 @@ __cpu_device_create(struct device *parent, void *drvdata,
	dev->parent = parent;
	dev->groups = groups;
	dev->release = device_create_release;
	device_set_pm_not_required(dev);
	dev_set_drvdata(dev, drvdata);

	retval = kobject_set_name_vargs(&dev->kobj, fmt, args);
+9 −4
Original line number Diff line number Diff line
@@ -65,12 +65,17 @@ static void pm_clk_acquire(struct device *dev, struct pm_clock_entry *ce)
	if (IS_ERR(ce->clk)) {
		ce->status = PCE_STATUS_ERROR;
	} else {
		clk_prepare(ce->clk);
		if (clk_prepare(ce->clk)) {
			ce->status = PCE_STATUS_ERROR;
			dev_err(dev, "clk_prepare() failed\n");
		} else {
			ce->status = PCE_STATUS_ACQUIRED;
		dev_dbg(dev, "Clock %pC con_id %s managed by runtime PM.\n",
			dev_dbg(dev,
				"Clock %pC con_id %s managed by runtime PM.\n",
				ce->clk, ce->con_id);
		}
	}
}

static int __pm_clk_add(struct device *dev, const char *con_id,
			struct clk *clk)
+1 −1
Original line number Diff line number Diff line
@@ -160,7 +160,7 @@ EXPORT_SYMBOL_GPL(dev_pm_domain_attach_by_id);
 * For a detailed function description, see dev_pm_domain_attach_by_id().
 */
struct device *dev_pm_domain_attach_by_name(struct device *dev,
					    char *name)
					    const char *name)
{
	if (dev->pm_domain)
		return ERR_PTR(-EEXIST);
+3 −10
Original line number Diff line number Diff line
@@ -2483,7 +2483,7 @@ EXPORT_SYMBOL_GPL(genpd_dev_pm_attach_by_id);
 * power-domain-names DT property. For further description see
 * genpd_dev_pm_attach_by_id().
 */
struct device *genpd_dev_pm_attach_by_name(struct device *dev, char *name)
struct device *genpd_dev_pm_attach_by_name(struct device *dev, const char *name)
{
	int index;

@@ -2948,18 +2948,11 @@ static int __init genpd_debug_init(void)

	genpd_debugfs_dir = debugfs_create_dir("pm_genpd", NULL);

	if (!genpd_debugfs_dir)
		return -ENOMEM;

	d = debugfs_create_file("pm_genpd_summary", S_IRUGO,
			genpd_debugfs_dir, NULL, &summary_fops);
	if (!d)
		return -ENOMEM;
	debugfs_create_file("pm_genpd_summary", S_IRUGO, genpd_debugfs_dir,
			    NULL, &summary_fops);

	list_for_each_entry(genpd, &gpd_list, gpd_list_node) {
		d = debugfs_create_dir(genpd->name, genpd_debugfs_dir);
		if (!d)
			return -ENOMEM;

		debugfs_create_file("current_state", 0444,
				d, genpd, &status_fops);
+10 −1
Original line number Diff line number Diff line
@@ -124,6 +124,10 @@ void device_pm_unlock(void)
 */
void device_pm_add(struct device *dev)
{
	/* Skip PM setup/initialization. */
	if (device_pm_not_required(dev))
		return;

	pr_debug("PM: Adding info for %s:%s\n",
		 dev->bus ? dev->bus->name : "No Bus", dev_name(dev));
	device_pm_check_callbacks(dev);
@@ -142,6 +146,9 @@ void device_pm_add(struct device *dev)
 */
void device_pm_remove(struct device *dev)
{
	if (device_pm_not_required(dev))
		return;

	pr_debug("PM: Removing info for %s:%s\n",
		 dev->bus ? dev->bus->name : "No Bus", dev_name(dev));
	complete_all(&dev->power.completion);
@@ -1741,8 +1748,10 @@ static int __device_suspend(struct device *dev, pm_message_t state, bool async)
	if (dev->power.direct_complete) {
		if (pm_runtime_status_suspended(dev)) {
			pm_runtime_disable(dev);
			if (pm_runtime_status_suspended(dev))
			if (pm_runtime_status_suspended(dev)) {
				pm_dev_dbg(dev, state, "direct-complete ");
				goto Complete;
			}

			pm_runtime_enable(dev);
		}
Loading