aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-04-03 13:45:39 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2018-04-03 13:45:39 -0400
commitf2d285669aae656dfeafa0bf25e86bbbc5d22329 (patch)
tree4391c45051429c09199d7fd2ca6ca0dd142a5ed6 /drivers/pcmcia
parentbe5537542743f72c7cedddd145c17cf7706baa23 (diff)
parent103cf0e5799ce024fd28dfab716d7111afe4b117 (diff)
Merge tag 'pm-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull power management updates from Rafael Wysocki: "These update the cpuidle poll state definition to reduce excessive energy usage related to it, add new CPU ID to the RAPL power capping driver, update the ACPI system suspend code to handle some special cases better, extend the PM core's device links code slightly, add new sysfs attribute for better suspend-to-idle diagnostics and easier hibernation handling, update power management tools and clean up cpufreq quite a bit. Specifics: - Modify the cpuidle poll state implementation to prevent CPUs from staying in the loop in there for excessive times (Rafael Wysocki). - Add Intel Cannon Lake chips support to the RAPL power capping driver (Joe Konno). - Add reference counting to the device links handling code in the PM core (Lukas Wunner). - Avoid reconfiguring GPEs on suspend-to-idle in the ACPI system suspend code (Rafael Wysocki). - Allow devices to be put into deeper low-power states via ACPI if both _SxD and _SxW are missing (Daniel Drake). - Reorganize the core ACPI suspend-to-idle wakeup code to avoid a keyboard wakeup issue on Asus UX331UA (Chris Chiu). - Prevent the PCMCIA library code from aborting suspend-to-idle due to noirq suspend failures resulting from incorrect assumptions (Rafael Wysocki). - Add coupled cpuidle supprt to the Exynos3250 platform (Marek Szyprowski). - Add new sysfs file to make it easier to specify the image storage location during hibernation (Mario Limonciello). - Add sysfs files for collecting suspend-to-idle usage and time statistics for CPU idle states (Rafael Wysocki). - Update the pm-graph utilities (Todd Brandt). - Reduce the kernel log noise related to reporting Low-power Idle constraings by the ACPI system suspend code (Rafael Wysocki). - Make it easier to distinguish dedicated wakeup IRQs in the /proc/interrupts output (Tony Lindgren). - Add the frequency table validation in cpufreq to the core and drop it from a number of cpufreq drivers (Viresh Kumar). - Drop "cooling-{min|max}-level" for CPU nodes from a couple of DT bindings (Viresh Kumar). - Clean up the CPU online error code path in the cpufreq core (Viresh Kumar). - Fix assorted issues in the SCPI, CPPC, mediatek and tegra186 cpufreq drivers (Arnd Bergmann, Chunyu Hu, George Cherian, Viresh Kumar). - Drop memory allocation error messages from a few places in cpufreq and cpuildle drivers (Markus Elfring)" * tag 'pm-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (56 commits) ACPI / PM: Fix keyboard wakeup from suspend-to-idle on ASUS UX331UA cpufreq: CPPC: Use transition_delay_us depending transition_latency PM / hibernate: Change message when writing to /sys/power/resume PM / hibernate: Make passing hibernate offsets more friendly cpuidle: poll_state: Avoid invoking local_clock() too often PM: cpuidle/suspend: Add s2idle usage and time state attributes cpuidle: Enable coupled cpuidle support on Exynos3250 platform cpuidle: poll_state: Add time limit to poll_idle() cpufreq: tegra186: Don't validate the frequency table twice cpufreq: speedstep: Don't validate the frequency table twice cpufreq: sparc: Don't validate the frequency table twice cpufreq: sh: Don't validate the frequency table twice cpufreq: sfi: Don't validate the frequency table twice cpufreq: scpi: Don't validate the frequency table twice cpufreq: sc520: Don't validate the frequency table twice cpufreq: s3c24xx: Don't validate the frequency table twice cpufreq: qoirq: Don't validate the frequency table twice cpufreq: pxa: Don't validate the frequency table twice cpufreq: ppc_cbe: Don't validate the frequency table twice cpufreq: powernow: Don't validate the frequency table twice ...
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r--drivers/pcmcia/cs.c10
-rw-r--r--drivers/pcmcia/cs_internal.h1
2 files changed, 8 insertions, 3 deletions
diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c
index c3b615c94b4b..8c8caec3a72c 100644
--- a/drivers/pcmcia/cs.c
+++ b/drivers/pcmcia/cs.c
@@ -452,17 +452,20 @@ static int socket_insert(struct pcmcia_socket *skt)
452 452
453static int socket_suspend(struct pcmcia_socket *skt) 453static int socket_suspend(struct pcmcia_socket *skt)
454{ 454{
455 if (skt->state & SOCKET_SUSPEND) 455 if ((skt->state & SOCKET_SUSPEND) && !(skt->state & SOCKET_IN_RESUME))
456 return -EBUSY; 456 return -EBUSY;
457 457
458 mutex_lock(&skt->ops_mutex); 458 mutex_lock(&skt->ops_mutex);
459 skt->suspended_state = skt->state; 459 /* store state on first suspend, but not after spurious wakeups */
460 if (!(skt->state & SOCKET_IN_RESUME))
461 skt->suspended_state = skt->state;
460 462
461 skt->socket = dead_socket; 463 skt->socket = dead_socket;
462 skt->ops->set_socket(skt, &skt->socket); 464 skt->ops->set_socket(skt, &skt->socket);
463 if (skt->ops->suspend) 465 if (skt->ops->suspend)
464 skt->ops->suspend(skt); 466 skt->ops->suspend(skt);
465 skt->state |= SOCKET_SUSPEND; 467 skt->state |= SOCKET_SUSPEND;
468 skt->state &= ~SOCKET_IN_RESUME;
466 mutex_unlock(&skt->ops_mutex); 469 mutex_unlock(&skt->ops_mutex);
467 return 0; 470 return 0;
468} 471}
@@ -475,6 +478,7 @@ static int socket_early_resume(struct pcmcia_socket *skt)
475 skt->ops->set_socket(skt, &skt->socket); 478 skt->ops->set_socket(skt, &skt->socket);
476 if (skt->state & SOCKET_PRESENT) 479 if (skt->state & SOCKET_PRESENT)
477 skt->resume_status = socket_setup(skt, resume_delay); 480 skt->resume_status = socket_setup(skt, resume_delay);
481 skt->state |= SOCKET_IN_RESUME;
478 mutex_unlock(&skt->ops_mutex); 482 mutex_unlock(&skt->ops_mutex);
479 return 0; 483 return 0;
480} 484}
@@ -484,7 +488,7 @@ static int socket_late_resume(struct pcmcia_socket *skt)
484 int ret = 0; 488 int ret = 0;
485 489
486 mutex_lock(&skt->ops_mutex); 490 mutex_lock(&skt->ops_mutex);
487 skt->state &= ~SOCKET_SUSPEND; 491 skt->state &= ~(SOCKET_SUSPEND | SOCKET_IN_RESUME);
488 mutex_unlock(&skt->ops_mutex); 492 mutex_unlock(&skt->ops_mutex);
489 493
490 if (!(skt->state & SOCKET_PRESENT)) { 494 if (!(skt->state & SOCKET_PRESENT)) {
diff --git a/drivers/pcmcia/cs_internal.h b/drivers/pcmcia/cs_internal.h
index 6765beadea95..03ec43802909 100644
--- a/drivers/pcmcia/cs_internal.h
+++ b/drivers/pcmcia/cs_internal.h
@@ -70,6 +70,7 @@ struct pccard_resource_ops {
70/* Flags in socket state */ 70/* Flags in socket state */
71#define SOCKET_PRESENT 0x0008 71#define SOCKET_PRESENT 0x0008
72#define SOCKET_INUSE 0x0010 72#define SOCKET_INUSE 0x0010
73#define SOCKET_IN_RESUME 0x0040
73#define SOCKET_SUSPEND 0x0080 74#define SOCKET_SUSPEND 0x0080
74#define SOCKET_WIN_REQ(i) (0x0100<<(i)) 75#define SOCKET_WIN_REQ(i) (0x0100<<(i))
75#define SOCKET_CARDBUS 0x8000 76#define SOCKET_CARDBUS 0x8000