diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-29 20:18:48 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-29 20:18:48 -0400 |
commit | ad6ede80a0ad0eba6e0f77e35ab7753c60ed1e87 (patch) | |
tree | a912c3513dbb234b64dbdaa8a327ac8dc05cc2f6 | |
parent | 10f3291a1d7a7dc3ded403cb3caa31916364be60 (diff) | |
parent | 0b4f58b7cebd74ede19d13b81fb43a7eaeba10a3 (diff) |
Merge tag 'pm+acpi-3.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull ACPI and power management fixes from Rafael Wysocki:
- Fix for an ACPI regression related to the handling of fixed events
that caused netlink routines to be (incorrectly) run in interrupt
context from Lan Tianyu
- Fix for an ACPI EC driver regression on Acer Aspire V5-573G that
caused AC/battery plug/unplug and video brightness change
notifications to be delayed on that machine from Lv Zheng
- Fix for an ACPI device enumeration regression that caused ACPI driver
probe to fail for some devices where it succeeded before (Rafael J
Wysocki)
- intel_pstate driver fix to prevent it from printing an information
message for every CPU in the system on every boot from Andi Kleen
- s5pv210 cpufreq driver fix to remove an __init annotation from a
routine that in fact can be called at any time after init too from
Mark Brown
- New Intel Braswell device ID for the ACPI LPSS (Low-Power Subsystem)
driver from Alan Cox
- New Intel Braswell CPU ID for intel_pstate from Mika Westerberg
* tag 'pm+acpi-3.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
cpufreq: s5pv210: Remove spurious __init annotation
cpufreq: intel_pstate: Add CPU ID for Braswell processor
intel_pstate: Turn per cpu printk into pr_debug
ACPI / LPSS: Add ACPI IDs for Intel Braswell
ACPI / EC: Add support to disallow QR_EC to be issued before completing previous QR_EC
ACPI / EC: Add support to disallow QR_EC to be issued when SCI_EVT isn't set
ACPI: Run fixed event device notifications in process context
ACPI / scan: Allow ACPI drivers to bind to PNP device objects
-rw-r--r-- | drivers/acpi/acpi_lpss.c | 17 | ||||
-rw-r--r-- | drivers/acpi/ec.c | 21 | ||||
-rw-r--r-- | drivers/acpi/scan.c | 17 | ||||
-rw-r--r-- | drivers/cpufreq/intel_pstate.c | 3 | ||||
-rw-r--r-- | drivers/cpufreq/s5pv210-cpufreq.c | 2 |
5 files changed, 49 insertions, 11 deletions
diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c index ce06149088c5..9dfec48dd4e5 100644 --- a/drivers/acpi/acpi_lpss.c +++ b/drivers/acpi/acpi_lpss.c | |||
@@ -196,6 +196,17 @@ static struct lpss_device_desc byt_i2c_dev_desc = { | |||
196 | .setup = lpss_i2c_setup, | 196 | .setup = lpss_i2c_setup, |
197 | }; | 197 | }; |
198 | 198 | ||
199 | static struct lpss_shared_clock bsw_pwm_clock = { | ||
200 | .name = "pwm_clk", | ||
201 | .rate = 19200000, | ||
202 | }; | ||
203 | |||
204 | static struct lpss_device_desc bsw_pwm_dev_desc = { | ||
205 | .clk_required = true, | ||
206 | .save_ctx = true, | ||
207 | .shared_clock = &bsw_pwm_clock, | ||
208 | }; | ||
209 | |||
199 | #else | 210 | #else |
200 | 211 | ||
201 | #define LPSS_ADDR(desc) (0UL) | 212 | #define LPSS_ADDR(desc) (0UL) |
@@ -225,6 +236,12 @@ static const struct acpi_device_id acpi_lpss_device_ids[] = { | |||
225 | { "INT33B2", }, | 236 | { "INT33B2", }, |
226 | { "INT33FC", }, | 237 | { "INT33FC", }, |
227 | 238 | ||
239 | /* Braswell LPSS devices */ | ||
240 | { "80862288", LPSS_ADDR(bsw_pwm_dev_desc) }, | ||
241 | { "8086228A", LPSS_ADDR(byt_uart_dev_desc) }, | ||
242 | { "8086228E", LPSS_ADDR(byt_spi_dev_desc) }, | ||
243 | { "808622C1", LPSS_ADDR(byt_i2c_dev_desc) }, | ||
244 | |||
228 | { "INT3430", LPSS_ADDR(lpt_dev_desc) }, | 245 | { "INT3430", LPSS_ADDR(lpt_dev_desc) }, |
229 | { "INT3431", LPSS_ADDR(lpt_dev_desc) }, | 246 | { "INT3431", LPSS_ADDR(lpt_dev_desc) }, |
230 | { "INT3432", LPSS_ADDR(lpt_i2c_dev_desc) }, | 247 | { "INT3432", LPSS_ADDR(lpt_i2c_dev_desc) }, |
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index a66ab658abbc..9922cc46b15c 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c | |||
@@ -197,6 +197,8 @@ static bool advance_transaction(struct acpi_ec *ec) | |||
197 | t->rdata[t->ri++] = acpi_ec_read_data(ec); | 197 | t->rdata[t->ri++] = acpi_ec_read_data(ec); |
198 | if (t->rlen == t->ri) { | 198 | if (t->rlen == t->ri) { |
199 | t->flags |= ACPI_EC_COMMAND_COMPLETE; | 199 | t->flags |= ACPI_EC_COMMAND_COMPLETE; |
200 | if (t->command == ACPI_EC_COMMAND_QUERY) | ||
201 | pr_debug("hardware QR_EC completion\n"); | ||
200 | wakeup = true; | 202 | wakeup = true; |
201 | } | 203 | } |
202 | } else | 204 | } else |
@@ -208,7 +210,20 @@ static bool advance_transaction(struct acpi_ec *ec) | |||
208 | } | 210 | } |
209 | return wakeup; | 211 | return wakeup; |
210 | } else { | 212 | } else { |
211 | if ((status & ACPI_EC_FLAG_IBF) == 0) { | 213 | /* |
214 | * There is firmware refusing to respond QR_EC when SCI_EVT | ||
215 | * is not set, for which case, we complete the QR_EC | ||
216 | * without issuing it to the firmware. | ||
217 | * https://bugzilla.kernel.org/show_bug.cgi?id=86211 | ||
218 | */ | ||
219 | if (!(status & ACPI_EC_FLAG_SCI) && | ||
220 | (t->command == ACPI_EC_COMMAND_QUERY)) { | ||
221 | t->flags |= ACPI_EC_COMMAND_POLL; | ||
222 | t->rdata[t->ri++] = 0x00; | ||
223 | t->flags |= ACPI_EC_COMMAND_COMPLETE; | ||
224 | pr_debug("software QR_EC completion\n"); | ||
225 | wakeup = true; | ||
226 | } else if ((status & ACPI_EC_FLAG_IBF) == 0) { | ||
212 | acpi_ec_write_cmd(ec, t->command); | 227 | acpi_ec_write_cmd(ec, t->command); |
213 | t->flags |= ACPI_EC_COMMAND_POLL; | 228 | t->flags |= ACPI_EC_COMMAND_POLL; |
214 | } else | 229 | } else |
@@ -288,11 +303,11 @@ static int acpi_ec_transaction_unlocked(struct acpi_ec *ec, | |||
288 | /* following two actions should be kept atomic */ | 303 | /* following two actions should be kept atomic */ |
289 | ec->curr = t; | 304 | ec->curr = t; |
290 | start_transaction(ec); | 305 | start_transaction(ec); |
291 | if (ec->curr->command == ACPI_EC_COMMAND_QUERY) | ||
292 | clear_bit(EC_FLAGS_QUERY_PENDING, &ec->flags); | ||
293 | spin_unlock_irqrestore(&ec->lock, tmp); | 306 | spin_unlock_irqrestore(&ec->lock, tmp); |
294 | ret = ec_poll(ec); | 307 | ret = ec_poll(ec); |
295 | spin_lock_irqsave(&ec->lock, tmp); | 308 | spin_lock_irqsave(&ec->lock, tmp); |
309 | if (ec->curr->command == ACPI_EC_COMMAND_QUERY) | ||
310 | clear_bit(EC_FLAGS_QUERY_PENDING, &ec->flags); | ||
296 | ec->curr = NULL; | 311 | ec->curr = NULL; |
297 | spin_unlock_irqrestore(&ec->lock, tmp); | 312 | spin_unlock_irqrestore(&ec->lock, tmp); |
298 | return ret; | 313 | return ret; |
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 0a817ad24f16..9a9298994e26 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c | |||
@@ -922,12 +922,17 @@ static void acpi_device_notify(acpi_handle handle, u32 event, void *data) | |||
922 | device->driver->ops.notify(device, event); | 922 | device->driver->ops.notify(device, event); |
923 | } | 923 | } |
924 | 924 | ||
925 | static acpi_status acpi_device_notify_fixed(void *data) | 925 | static void acpi_device_notify_fixed(void *data) |
926 | { | 926 | { |
927 | struct acpi_device *device = data; | 927 | struct acpi_device *device = data; |
928 | 928 | ||
929 | /* Fixed hardware devices have no handles */ | 929 | /* Fixed hardware devices have no handles */ |
930 | acpi_device_notify(NULL, ACPI_FIXED_HARDWARE_EVENT, device); | 930 | acpi_device_notify(NULL, ACPI_FIXED_HARDWARE_EVENT, device); |
931 | } | ||
932 | |||
933 | static acpi_status acpi_device_fixed_event(void *data) | ||
934 | { | ||
935 | acpi_os_execute(OSL_NOTIFY_HANDLER, acpi_device_notify_fixed, data); | ||
931 | return AE_OK; | 936 | return AE_OK; |
932 | } | 937 | } |
933 | 938 | ||
@@ -938,12 +943,12 @@ static int acpi_device_install_notify_handler(struct acpi_device *device) | |||
938 | if (device->device_type == ACPI_BUS_TYPE_POWER_BUTTON) | 943 | if (device->device_type == ACPI_BUS_TYPE_POWER_BUTTON) |
939 | status = | 944 | status = |
940 | acpi_install_fixed_event_handler(ACPI_EVENT_POWER_BUTTON, | 945 | acpi_install_fixed_event_handler(ACPI_EVENT_POWER_BUTTON, |
941 | acpi_device_notify_fixed, | 946 | acpi_device_fixed_event, |
942 | device); | 947 | device); |
943 | else if (device->device_type == ACPI_BUS_TYPE_SLEEP_BUTTON) | 948 | else if (device->device_type == ACPI_BUS_TYPE_SLEEP_BUTTON) |
944 | status = | 949 | status = |
945 | acpi_install_fixed_event_handler(ACPI_EVENT_SLEEP_BUTTON, | 950 | acpi_install_fixed_event_handler(ACPI_EVENT_SLEEP_BUTTON, |
946 | acpi_device_notify_fixed, | 951 | acpi_device_fixed_event, |
947 | device); | 952 | device); |
948 | else | 953 | else |
949 | status = acpi_install_notify_handler(device->handle, | 954 | status = acpi_install_notify_handler(device->handle, |
@@ -960,10 +965,10 @@ static void acpi_device_remove_notify_handler(struct acpi_device *device) | |||
960 | { | 965 | { |
961 | if (device->device_type == ACPI_BUS_TYPE_POWER_BUTTON) | 966 | if (device->device_type == ACPI_BUS_TYPE_POWER_BUTTON) |
962 | acpi_remove_fixed_event_handler(ACPI_EVENT_POWER_BUTTON, | 967 | acpi_remove_fixed_event_handler(ACPI_EVENT_POWER_BUTTON, |
963 | acpi_device_notify_fixed); | 968 | acpi_device_fixed_event); |
964 | else if (device->device_type == ACPI_BUS_TYPE_SLEEP_BUTTON) | 969 | else if (device->device_type == ACPI_BUS_TYPE_SLEEP_BUTTON) |
965 | acpi_remove_fixed_event_handler(ACPI_EVENT_SLEEP_BUTTON, | 970 | acpi_remove_fixed_event_handler(ACPI_EVENT_SLEEP_BUTTON, |
966 | acpi_device_notify_fixed); | 971 | acpi_device_fixed_event); |
967 | else | 972 | else |
968 | acpi_remove_notify_handler(device->handle, ACPI_DEVICE_NOTIFY, | 973 | acpi_remove_notify_handler(device->handle, ACPI_DEVICE_NOTIFY, |
969 | acpi_device_notify); | 974 | acpi_device_notify); |
@@ -975,7 +980,7 @@ static int acpi_device_probe(struct device *dev) | |||
975 | struct acpi_driver *acpi_drv = to_acpi_driver(dev->driver); | 980 | struct acpi_driver *acpi_drv = to_acpi_driver(dev->driver); |
976 | int ret; | 981 | int ret; |
977 | 982 | ||
978 | if (acpi_dev->handler) | 983 | if (acpi_dev->handler && !acpi_is_pnp_device(acpi_dev)) |
979 | return -EINVAL; | 984 | return -EINVAL; |
980 | 985 | ||
981 | if (!acpi_drv->ops.add) | 986 | if (!acpi_drv->ops.add) |
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index c5eac949760d..e396ad3f8f3f 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c | |||
@@ -660,6 +660,7 @@ static const struct x86_cpu_id intel_pstate_cpu_ids[] = { | |||
660 | ICPU(0x3f, core_params), | 660 | ICPU(0x3f, core_params), |
661 | ICPU(0x45, core_params), | 661 | ICPU(0x45, core_params), |
662 | ICPU(0x46, core_params), | 662 | ICPU(0x46, core_params), |
663 | ICPU(0x4c, byt_params), | ||
663 | ICPU(0x4f, core_params), | 664 | ICPU(0x4f, core_params), |
664 | ICPU(0x56, core_params), | 665 | ICPU(0x56, core_params), |
665 | {} | 666 | {} |
@@ -688,7 +689,7 @@ static int intel_pstate_init_cpu(unsigned int cpunum) | |||
688 | 689 | ||
689 | add_timer_on(&cpu->timer, cpunum); | 690 | add_timer_on(&cpu->timer, cpunum); |
690 | 691 | ||
691 | pr_info("Intel pstate controlling: cpu %d\n", cpunum); | 692 | pr_debug("Intel pstate controlling: cpu %d\n", cpunum); |
692 | 693 | ||
693 | return 0; | 694 | return 0; |
694 | } | 695 | } |
diff --git a/drivers/cpufreq/s5pv210-cpufreq.c b/drivers/cpufreq/s5pv210-cpufreq.c index 9a68225a757e..3f9791f07b8e 100644 --- a/drivers/cpufreq/s5pv210-cpufreq.c +++ b/drivers/cpufreq/s5pv210-cpufreq.c | |||
@@ -501,7 +501,7 @@ static int check_mem_type(void __iomem *dmc_reg) | |||
501 | return val >> 8; | 501 | return val >> 8; |
502 | } | 502 | } |
503 | 503 | ||
504 | static int __init s5pv210_cpu_init(struct cpufreq_policy *policy) | 504 | static int s5pv210_cpu_init(struct cpufreq_policy *policy) |
505 | { | 505 | { |
506 | unsigned long mem_type; | 506 | unsigned long mem_type; |
507 | int ret; | 507 | int ret; |