Skip to content

Commit e3d857e

Browse files
committed
Merge branch 'pm-runtime'
* pm-runtime: (25 commits) i2c-omap / PM: Drop CONFIG_PM_RUNTIME from i2c-omap.c dmaengine / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM drivers: sh / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM e1000e / igb / PM: Eliminate CONFIG_PM_RUNTIME MMC / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM MFD / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM misc / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM media / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM input / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM iio / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM hsi / OMAP / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM i2c-hid / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM drm / exynos / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM gpio / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM hwrandom / exynos / PM: Use CONFIG_PM in #ifdef block / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM USB / PM: Drop CONFIG_PM_RUNTIME from the USB core PM: Merge the SET*_RUNTIME_PM_OPS() macros PM / Kconfig: Do not select PM directly from Kconfig files PCI / PM: Drop CONFIG_PM_RUNTIME from the PCI core ...
2 parents cfc75ed + 2713775 commit e3d857e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+281
-535
lines changed

Documentation/ABI/stable/sysfs-bus-usb

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,9 @@ Date: January 2008
3232
KernelVersion: 2.6.25
3333
Contact: Sarah Sharp <sarah.a.sharp@intel.com>
3434
Description:
35-
If CONFIG_PM_RUNTIME is enabled then this file
36-
is present. When read, it returns the total time (in msec)
37-
that the USB device has been connected to the machine. This
38-
file is read-only.
35+
If CONFIG_PM is enabled, then this file is present. When read,
36+
it returns the total time (in msec) that the USB device has been
37+
connected to the machine. This file is read-only.
3938
Users:
4039
PowerTOP <powertop@lists.01.org>
4140
https://01.org/powertop/
@@ -45,10 +44,9 @@ Date: January 2008
4544
KernelVersion: 2.6.25
4645
Contact: Sarah Sharp <sarah.a.sharp@intel.com>
4746
Description:
48-
If CONFIG_PM_RUNTIME is enabled then this file
49-
is present. When read, it returns the total time (in msec)
50-
that the USB device has been active, i.e. not in a suspended
51-
state. This file is read-only.
47+
If CONFIG_PM is enabled, then this file is present. When read,
48+
it returns the total time (in msec) that the USB device has been
49+
active, i.e. not in a suspended state. This file is read-only.
5250

5351
Tools can use this file and the connected_duration file to
5452
compute the percentage of time that a device has been active.

Documentation/ABI/testing/sysfs-bus-usb

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -104,16 +104,15 @@ What: /sys/bus/usb/devices/.../power/usb2_hardware_lpm
104104
Date: September 2011
105105
Contact: Andiry Xu <andiry.xu@amd.com>
106106
Description:
107-
If CONFIG_PM_RUNTIME is set and a USB 2.0 lpm-capable device
108-
is plugged in to a xHCI host which support link PM, it will
109-
perform a LPM test; if the test is passed and host supports
110-
USB2 hardware LPM (xHCI 1.0 feature), USB2 hardware LPM will
111-
be enabled for the device and the USB device directory will
112-
contain a file named power/usb2_hardware_lpm. The file holds
113-
a string value (enable or disable) indicating whether or not
114-
USB2 hardware LPM is enabled for the device. Developer can
115-
write y/Y/1 or n/N/0 to the file to enable/disable the
116-
feature.
107+
If CONFIG_PM is set and a USB 2.0 lpm-capable device is plugged
108+
in to a xHCI host which support link PM, it will perform a LPM
109+
test; if the test is passed and host supports USB2 hardware LPM
110+
(xHCI 1.0 feature), USB2 hardware LPM will be enabled for the
111+
device and the USB device directory will contain a file named
112+
power/usb2_hardware_lpm. The file holds a string value (enable
113+
or disable) indicating whether or not USB2 hardware LPM is
114+
enabled for the device. Developer can write y/Y/1 or n/N/0 to
115+
the file to enable/disable the feature.
117116

118117
What: /sys/bus/usb/devices/.../removable
119118
Date: February 2012

Documentation/usb/power-management.txt

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,15 @@ dynamic PM is implemented in the USB subsystem, although system PM is
4747
covered to some extent (see Documentation/power/*.txt for more
4848
information about system PM).
4949

50-
Note: Dynamic PM support for USB is present only if the kernel was
51-
built with CONFIG_USB_SUSPEND enabled (which depends on
52-
CONFIG_PM_RUNTIME). System PM support is present only if the kernel
53-
was built with CONFIG_SUSPEND or CONFIG_HIBERNATION enabled.
54-
55-
(Starting with the 3.10 kernel release, dynamic PM support for USB is
56-
present whenever the kernel was built with CONFIG_PM_RUNTIME enabled.
57-
The CONFIG_USB_SUSPEND option has been eliminated.)
50+
System PM support is present only if the kernel was built with CONFIG_SUSPEND
51+
or CONFIG_HIBERNATION enabled. Dynamic PM support for USB is present whenever
52+
the kernel was built with CONFIG_PM enabled.
53+
54+
[Historically, dynamic PM support for USB was present only if the
55+
kernel had been built with CONFIG_USB_SUSPEND enabled (which depended on
56+
CONFIG_PM_RUNTIME). Starting with the 3.10 kernel release, dynamic PM support
57+
for USB was present whenever the kernel was built with CONFIG_PM_RUNTIME
58+
enabled. The CONFIG_USB_SUSPEND option had been eliminated.]
5859

5960

6061
What is Remote Wakeup?

arch/ia64/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ config IA64
1111
select PCI if (!IA64_HP_SIM)
1212
select ACPI if (!IA64_HP_SIM)
1313
select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI
14-
select PM if (!IA64_HP_SIM)
1514
select HAVE_UNSTABLE_SCHED_CLOCK
1615
select HAVE_IDE
1716
select HAVE_OPROFILE
@@ -233,6 +232,7 @@ config IA64_SGI_UV
233232
config IA64_HP_SIM
234233
bool "Ski-simulator"
235234
select SWIOTLB
235+
depends on !PM_RUNTIME
236236

237237
endchoice
238238

arch/sh/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,6 @@ config CPU_SHX3
222222
config ARCH_SHMOBILE
223223
bool
224224
select ARCH_SUSPEND_POSSIBLE
225-
select PM
226225
select PM_RUNTIME
227226

228227
config CPU_HAS_PMU

block/blk-core.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1325,7 +1325,7 @@ void part_round_stats(int cpu, struct hd_struct *part)
13251325
}
13261326
EXPORT_SYMBOL_GPL(part_round_stats);
13271327

1328-
#ifdef CONFIG_PM_RUNTIME
1328+
#ifdef CONFIG_PM
13291329
static void blk_pm_put_request(struct request *rq)
13301330
{
13311331
if (rq->q->dev && !(rq->cmd_flags & REQ_PM) && !--rq->q->nr_pending)
@@ -2134,7 +2134,7 @@ void blk_account_io_done(struct request *req)
21342134
}
21352135
}
21362136

2137-
#ifdef CONFIG_PM_RUNTIME
2137+
#ifdef CONFIG_PM
21382138
/*
21392139
* Don't process normal requests when queue is suspended
21402140
* or in the process of suspending/resuming
@@ -3159,7 +3159,7 @@ void blk_finish_plug(struct blk_plug *plug)
31593159
}
31603160
EXPORT_SYMBOL(blk_finish_plug);
31613161

3162-
#ifdef CONFIG_PM_RUNTIME
3162+
#ifdef CONFIG_PM
31633163
/**
31643164
* blk_pm_runtime_init - Block layer runtime PM initialization routine
31653165
* @q: the queue of the device

block/elevator.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ void elv_bio_merged(struct request_queue *q, struct request *rq,
539539
e->type->ops.elevator_bio_merged_fn(q, rq, bio);
540540
}
541541

542-
#ifdef CONFIG_PM_RUNTIME
542+
#ifdef CONFIG_PM
543543
static void blk_pm_requeue_request(struct request *rq)
544544
{
545545
if (rq->q->dev && !(rq->cmd_flags & REQ_PM))

drivers/acpi/acpi_lpss.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,6 @@ static int acpi_lpss_resume_early(struct device *dev)
588588
}
589589
#endif /* CONFIG_PM_SLEEP */
590590

591-
#ifdef CONFIG_PM_RUNTIME
592591
static int acpi_lpss_runtime_suspend(struct device *dev)
593592
{
594593
struct lpss_private_data *pdata = acpi_driver_data(ACPI_COMPANION(dev));
@@ -631,11 +630,11 @@ static int acpi_lpss_runtime_resume(struct device *dev)
631630

632631
return pm_generic_runtime_resume(dev);
633632
}
634-
#endif /* CONFIG_PM_RUNTIME */
635633
#endif /* CONFIG_PM */
636634

637635
static struct dev_pm_domain acpi_lpss_pm_domain = {
638636
.ops = {
637+
#ifdef CONFIG_PM
639638
#ifdef CONFIG_PM_SLEEP
640639
.prepare = acpi_subsys_prepare,
641640
.complete = acpi_subsys_complete,
@@ -647,7 +646,6 @@ static struct dev_pm_domain acpi_lpss_pm_domain = {
647646
.poweroff_late = acpi_lpss_suspend_late,
648647
.restore_early = acpi_lpss_resume_early,
649648
#endif
650-
#ifdef CONFIG_PM_RUNTIME
651649
.runtime_suspend = acpi_lpss_runtime_suspend,
652650
.runtime_resume = acpi_lpss_runtime_resume,
653651
#endif

drivers/acpi/device_pm.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,6 @@ static int acpi_device_wakeup(struct acpi_device *adev, u32 target_state,
692692
return 0;
693693
}
694694

695-
#ifdef CONFIG_PM_RUNTIME
696695
/**
697696
* acpi_pm_device_run_wake - Enable/disable remote wakeup for given device.
698697
* @dev: Device to enable/disable the platform to wake up.
@@ -714,7 +713,6 @@ int acpi_pm_device_run_wake(struct device *phys_dev, bool enable)
714713
return acpi_device_wakeup(adev, ACPI_STATE_S0, enable);
715714
}
716715
EXPORT_SYMBOL(acpi_pm_device_run_wake);
717-
#endif /* CONFIG_PM_RUNTIME */
718716

719717
#ifdef CONFIG_PM_SLEEP
720718
/**
@@ -773,7 +771,6 @@ static int acpi_dev_pm_full_power(struct acpi_device *adev)
773771
acpi_device_set_power(adev, ACPI_STATE_D0) : 0;
774772
}
775773

776-
#ifdef CONFIG_PM_RUNTIME
777774
/**
778775
* acpi_dev_runtime_suspend - Put device into a low-power state using ACPI.
779776
* @dev: Device to put into a low-power state.
@@ -855,7 +852,6 @@ int acpi_subsys_runtime_resume(struct device *dev)
855852
return ret ? ret : pm_generic_runtime_resume(dev);
856853
}
857854
EXPORT_SYMBOL_GPL(acpi_subsys_runtime_resume);
858-
#endif /* CONFIG_PM_RUNTIME */
859855

860856
#ifdef CONFIG_PM_SLEEP
861857
/**
@@ -1023,10 +1019,9 @@ EXPORT_SYMBOL_GPL(acpi_subsys_freeze);
10231019

10241020
static struct dev_pm_domain acpi_general_pm_domain = {
10251021
.ops = {
1026-
#ifdef CONFIG_PM_RUNTIME
1022+
#ifdef CONFIG_PM
10271023
.runtime_suspend = acpi_subsys_runtime_suspend,
10281024
.runtime_resume = acpi_subsys_runtime_resume,
1029-
#endif
10301025
#ifdef CONFIG_PM_SLEEP
10311026
.prepare = acpi_subsys_prepare,
10321027
.complete = acpi_subsys_complete,
@@ -1037,6 +1032,7 @@ static struct dev_pm_domain acpi_general_pm_domain = {
10371032
.poweroff = acpi_subsys_suspend,
10381033
.poweroff_late = acpi_subsys_suspend_late,
10391034
.restore_early = acpi_subsys_resume_early,
1035+
#endif
10401036
#endif
10411037
},
10421038
};

drivers/acpi/pci_irq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ void acpi_pci_irq_disable(struct pci_dev *dev)
484484
/* Keep IOAPIC pin configuration when suspending */
485485
if (dev->dev.power.is_prepared)
486486
return;
487-
#ifdef CONFIG_PM_RUNTIME
487+
#ifdef CONFIG_PM
488488
if (dev->dev.power.runtime_status == RPM_SUSPENDING)
489489
return;
490490
#endif

drivers/amba/bus.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ static const struct dev_pm_ops amba_pm = {
124124
.thaw = pm_generic_thaw,
125125
.poweroff = pm_generic_poweroff,
126126
.restore = pm_generic_restore,
127-
SET_PM_RUNTIME_PM_OPS(
127+
SET_RUNTIME_PM_OPS(
128128
amba_pm_runtime_suspend,
129129
amba_pm_runtime_resume,
130130
NULL

drivers/base/power/clock_ops.c

Lines changed: 2 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -256,10 +256,6 @@ void pm_clk_destroy(struct device *dev)
256256
}
257257
}
258258

259-
#endif /* CONFIG_PM */
260-
261-
#ifdef CONFIG_PM_RUNTIME
262-
263259
/**
264260
* pm_clk_suspend - Disable clocks in a device's PM clock list.
265261
* @dev: Device to disable the clocks for.
@@ -373,68 +369,7 @@ static int pm_clk_notify(struct notifier_block *nb,
373369
return 0;
374370
}
375371

376-
#else /* !CONFIG_PM_RUNTIME */
377-
378-
#ifdef CONFIG_PM
379-
380-
/**
381-
* pm_clk_suspend - Disable clocks in a device's PM clock list.
382-
* @dev: Device to disable the clocks for.
383-
*/
384-
int pm_clk_suspend(struct device *dev)
385-
{
386-
struct pm_subsys_data *psd = dev_to_psd(dev);
387-
struct pm_clock_entry *ce;
388-
unsigned long flags;
389-
390-
dev_dbg(dev, "%s()\n", __func__);
391-
392-
/* If there is no driver, the clocks are already disabled. */
393-
if (!psd || !dev->driver)
394-
return 0;
395-
396-
spin_lock_irqsave(&psd->lock, flags);
397-
398-
list_for_each_entry_reverse(ce, &psd->clock_list, node) {
399-
if (ce->status < PCE_STATUS_ERROR) {
400-
if (ce->status == PCE_STATUS_ENABLED)
401-
clk_disable(ce->clk);
402-
ce->status = PCE_STATUS_ACQUIRED;
403-
}
404-
}
405-
406-
spin_unlock_irqrestore(&psd->lock, flags);
407-
408-
return 0;
409-
}
410-
411-
/**
412-
* pm_clk_resume - Enable clocks in a device's PM clock list.
413-
* @dev: Device to enable the clocks for.
414-
*/
415-
int pm_clk_resume(struct device *dev)
416-
{
417-
struct pm_subsys_data *psd = dev_to_psd(dev);
418-
struct pm_clock_entry *ce;
419-
unsigned long flags;
420-
421-
dev_dbg(dev, "%s()\n", __func__);
422-
423-
/* If there is no driver, the clocks should remain disabled. */
424-
if (!psd || !dev->driver)
425-
return 0;
426-
427-
spin_lock_irqsave(&psd->lock, flags);
428-
429-
list_for_each_entry(ce, &psd->clock_list, node)
430-
__pm_clk_enable(dev, ce);
431-
432-
spin_unlock_irqrestore(&psd->lock, flags);
433-
434-
return 0;
435-
}
436-
437-
#endif /* CONFIG_PM */
372+
#else /* !CONFIG_PM */
438373

439374
/**
440375
* enable_clock - Enable a device clock.
@@ -514,7 +449,7 @@ static int pm_clk_notify(struct notifier_block *nb,
514449
return 0;
515450
}
516451

517-
#endif /* !CONFIG_PM_RUNTIME */
452+
#endif /* !CONFIG_PM */
518453

519454
/**
520455
* pm_clk_add_notifier - Add bus type notifier for power management clocks.

0 commit comments

Comments
 (0)