Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 45417b13 authored by Ivaylo Georgiev's avatar Ivaylo Georgiev
Browse files

Revert "UPSTREAM: PM / wakeup updates"



This is a preparation change for merging android-4.19.95 into
msm-4.19 branch.

The following changes are reverted. They will be reintroduced to
msm-4.19 at later stage.

2d67117d UPSTREAM: PM / wakeup: Drop wakeup_source_drop()
8f35ee2a UPSTREAM: PM / wakeup: Drop wakeup_source_init(), wakeup_source_prepare()
5bc2bdfb UPSTREAM: PM / wakeup: Use wakeup_source_register() in wakelock.c
2c9f5fa9 UPSTREAM: PM / wakeup: Show wakeup sources stats in sysfs
b5e87d65 UPSTREAM: PM / wakeup: Fix sysfs registration error path
845f6437 UPSTREAM: PM / wakeup: Register wakeup class kobj after device is added
47b82948 UPSTREAM: PM / wakeup: Unexport wakeup_source_sysfs_{add,remove}()

Change-Id: Ie43df2e4d512d4641030dcd7b4c608fb51da802a
Signed-off-by: default avatarIvaylo Georgiev <irgeorgiev@codeaurora.org>
parent c049e412
Loading
Loading
Loading
Loading
+0 −76
Original line number Diff line number Diff line
What:		/sys/class/wakeup/
Date:		June 2019
Contact:	Tri Vo <trong@android.com>
Description:
		The /sys/class/wakeup/ directory contains pointers to all
		wakeup sources in the kernel at that moment in time.

What:		/sys/class/wakeup/.../name
Date:		June 2019
Contact:	Tri Vo <trong@android.com>
Description:
		This file contains the name of the wakeup source.

What:		/sys/class/wakeup/.../active_count
Date:		June 2019
Contact:	Tri Vo <trong@android.com>
Description:
		This file contains the number of times the wakeup source was
		activated.

What:		/sys/class/wakeup/.../event_count
Date:		June 2019
Contact:	Tri Vo <trong@android.com>
Description:
		This file contains the number of signaled wakeup events
		associated with the wakeup source.

What:		/sys/class/wakeup/.../wakeup_count
Date:		June 2019
Contact:	Tri Vo <trong@android.com>
Description:
		This file contains the number of times the wakeup source might
		abort suspend.

What:		/sys/class/wakeup/.../expire_count
Date:		June 2019
Contact:	Tri Vo <trong@android.com>
Description:
		This file contains the number of times the wakeup source's
		timeout has expired.

What:		/sys/class/wakeup/.../active_time_ms
Date:		June 2019
Contact:	Tri Vo <trong@android.com>
Description:
		This file contains the amount of time the wakeup source has
		been continuously active, in milliseconds.  If the wakeup
		source is not active, this file contains '0'.

What:		/sys/class/wakeup/.../total_time_ms
Date:		June 2019
Contact:	Tri Vo <trong@android.com>
Description:
		This file contains the total amount of time this wakeup source
		has been active, in milliseconds.

What:		/sys/class/wakeup/.../max_time_ms
Date:		June 2019
Contact:	Tri Vo <trong@android.com>
Description:
		This file contains the maximum amount of time this wakeup
		source has been continuously active, in milliseconds.

What:		/sys/class/wakeup/.../last_change_ms
Date:		June 2019
Contact:	Tri Vo <trong@android.com>
Description:
		This file contains the monotonic clock time when the wakeup
		source was touched last time, in milliseconds.

What:		/sys/class/wakeup/.../prevent_suspend_time_ms
Date:		June 2019
Contact:	Tri Vo <trong@android.com>
Description:
		The file contains the total amount of time this wakeup source
		has been preventing autosleep, in milliseconds.
+1 −2
Original line number Diff line number Diff line
@@ -455,8 +455,7 @@ acpi_status acpi_add_pm_notifier(struct acpi_device *adev, struct device *dev,
		goto out;

	mutex_lock(&acpi_pm_notifier_lock);
	adev->wakeup.ws = wakeup_source_register(&adev->dev,
						 dev_name(&adev->dev));
	adev->wakeup.ws = wakeup_source_register(dev_name(&adev->dev));
	adev->wakeup.context.dev = dev;
	adev->wakeup.context.func = func;
	adev->wakeup.flags.notifier_present = true;
+1 −1
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
obj-$(CONFIG_PM)	+= sysfs.o generic_ops.o common.o qos.o runtime.o wakeirq.o
obj-$(CONFIG_PM_SLEEP)	+= main.o wakeup.o wakeup_stats.o
obj-$(CONFIG_PM_SLEEP)	+= main.o wakeup.o
obj-$(CONFIG_PM_TRACE_RTC)	+= trace.o
obj-$(CONFIG_PM_GENERIC_DOMAINS)	+=  domain.o domain_governor.o
obj-$(CONFIG_HAVE_CLK)	+= clock_ops.o
+0 −18
Original line number Diff line number Diff line
@@ -148,21 +148,3 @@ static inline void device_pm_init(struct device *dev)
	device_pm_sleep_init(dev);
	pm_runtime_init(dev);
}

#ifdef CONFIG_PM_SLEEP

/* drivers/base/power/wakeup_stats.c */
extern int wakeup_source_sysfs_add(struct device *parent,
				   struct wakeup_source *ws);
extern void wakeup_source_sysfs_remove(struct wakeup_source *ws);

extern int pm_wakeup_source_sysfs_add(struct device *parent);

#else /* !CONFIG_PM_SLEEP */

static inline int pm_wakeup_source_sysfs_add(struct device *parent)
{
	return 0;
}

#endif /* CONFIG_PM_SLEEP */
+0 −6
Original line number Diff line number Diff line
@@ -7,7 +7,6 @@
#include <linux/export.h>
#include <linux/pm_qos.h>
#include <linux/pm_runtime.h>
#include <linux/pm_wakeup.h>
#include <linux/atomic.h>
#include <linux/jiffies.h>
#include "power.h"
@@ -673,13 +672,8 @@ int dpm_sysfs_add(struct device *dev)
		if (rc)
			goto err_wakeup;
	}
	rc = pm_wakeup_source_sysfs_add(dev);
	if (rc)
		goto err_latency;
	return 0;

 err_latency:
	sysfs_unmerge_group(&dev->kobj, &pm_qos_latency_tolerance_attr_group);
 err_wakeup:
	sysfs_unmerge_group(&dev->kobj, &pm_wakeup_attr_group);
 err_runtime:
Loading