]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
10 years agoMerge branch 'pm-sleep-next' into linux-next
Rafael J. Wysocki [Fri, 18 Oct 2013 20:14:45 +0000 (22:14 +0200)]
Merge branch 'pm-sleep-next' into linux-next

* pm-sleep-next:
  PM / Sleep: Detect device suspend/resume lockup and log event

10 years agoMerge branch 'powercap-next' into linux-next
Rafael J. Wysocki [Fri, 18 Oct 2013 20:14:35 +0000 (22:14 +0200)]
Merge branch 'powercap-next' into linux-next

* powercap-next:
  PowerCap: Introduce Intel RAPL power capping driver
  bitops: Introduce BIT_ULL
  x86 / msr: add 64bit _on_cpu access functions
  PowerCap: Add to drivers Kconfig and Makefile
  PowerCap: Add class driver
  PowerCap: Documentation

10 years agoMerge branch 'pm-qos-next' into linux-next
Rafael J. Wysocki [Fri, 18 Oct 2013 20:14:15 +0000 (22:14 +0200)]
Merge branch 'pm-qos-next' into linux-next

* pm-qos-next:
  PM / QoS: simplify pm_qos_power_write()

10 years agoPM / Sleep: Detect device suspend/resume lockup and log event
Benoit Goby [Thu, 17 Oct 2013 17:48:46 +0000 (10:48 -0700)]
PM / Sleep: Detect device suspend/resume lockup and log event

Rather than hard-lock the kernel, dump the suspend/resume thread stack
and panic() to capture a message in pstore when a driver takes too long
to suspend/resume. Default suspend/resume watchdog timeout is set to 12
seconds to be longer than the usbhid 10 second timeout, but could be
changed at compile time.

Exclude from the watchdog the time spent waiting for children that
are resumed asynchronously and time every device, whether or not they
resumed synchronously.

This patch is targeted for mobile devices where a suspend/resume lockup
could cause a system reboot. Information about failing device can be
retrieved in subsequent boot session by mounting pstore and inspecting
the log. Laptops with EFI-enabled pstore could also benefit from
this feature.

The hardware watchdog timer is likely suspended during this time and
couldn't be relied upon. The soft-lockup detector would eventually tell
that tasks are not scheduled, but would provide little context as to why.
The patch hence uses system timer and assumes it is still active while the
devices are suspended/resumed.

This feature can be enabled/disabled during kernel configuration.

This change is based on earlier work by San Mehat.

Signed-off-by: Benoit Goby <benoit@android.com>
Signed-off-by: Zoran Markovic <zoran.markovic@linaro.org>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoPowerCap: Introduce Intel RAPL power capping driver
Jacob Pan [Thu, 17 Oct 2013 17:28:35 +0000 (10:28 -0700)]
PowerCap: Introduce Intel RAPL power capping driver

The Intel Running Average Power Limit (RAPL) technology provides platform
software with the ability to monitor, control, and get notifications on
power usage.

This feature is present in all Sandy Bridge and later Intel processors.
Newer models allow more fine grained controls to be applied.  In RAPL,
power control is divided into domains, which include package, DRAM
controller, CPU core (Power Plane 0), graphics uncore (power plane 1), etc.

The purpose of this driver is to expose the RAPL settings to userspace.
Overall, RAPL fits in the new powercap class driver in that platform
level power capping controls are exposed via this generic interface.

This driver is based on an earlier patch from Zhang Rui.

However, while the previous work was mainly focused on thermal monitoring
the focus here is on the usability from user space perspective.

References: https://lkml.org/lkml/2011/5/26/93
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoPM / QoS: simplify pm_qos_power_write()
Andy Shevchenko [Wed, 11 Sep 2013 14:02:38 +0000 (17:02 +0300)]
PM / QoS: simplify pm_qos_power_write()

Let kstrtos32_from_user() do the necessary calls and checks.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoMerge branch 'pm-devfreq-next' into linux-next
Rafael J. Wysocki [Thu, 17 Oct 2013 13:47:22 +0000 (15:47 +0200)]
Merge branch 'pm-devfreq-next' into linux-next

* pm-devfreq-next:
  PM / devfreq: Remove duplicate include of opp.h

10 years agoMerge branch 'pm-cpufreq-next' into linux-next
Rafael J. Wysocki [Thu, 17 Oct 2013 13:47:06 +0000 (15:47 +0200)]
Merge branch 'pm-cpufreq-next' into linux-next

* pm-cpufreq-next:
  cpufreq: exynos4210: Use the common clock framework to set APLL clock rate
  cpufreq: exynos4x12: Use the common clock framework to set APLL clock rate
  cpufreq: Detect spurious invocations of update_policy_cpu()
  cpufreq: pmac64: enable cpufreq on iMac G5 (iSight) model
  cpufreq: pmac64: provide cpufreq transition latency for older G5 models
  cpufreq: pmac64: speed up frequency switch
  cpufreq: highbank-cpufreq: Enable Midway/ECX-2000
  exynos-cpufreq: fix false return check from "regulator_set_voltage"
  speedstep-centrino: Remove unnecessary braces
  acpi-cpufreq: Add comment under ACPI_ADR_SPACE_SYSTEM_IO case
  cpufreq: arm-big-little: use clk_get instead of clk_get_sys
  cpufreq: exynos: Show a list of available frequencies

10 years agoMerge branch 'pm-cpuidle-next' into linux-next
Rafael J. Wysocki [Thu, 17 Oct 2013 13:47:00 +0000 (15:47 +0200)]
Merge branch 'pm-cpuidle-next' into linux-next

* pm-cpuidle-next:
  ARM: AT91: DT: pm: Select ram controller standby based on DT
  ARM: AT91: pm: Factorize standby function
  ARM: at91: cpuidle: Move driver to drivers/cpuidle
  ARM: at91: cpuidle: Convert to platform driver

10 years agoMerge branch 'acpi-fixes-next' into linux-next
Rafael J. Wysocki [Thu, 17 Oct 2013 13:46:35 +0000 (15:46 +0200)]
Merge branch 'acpi-fixes-next' into linux-next

* acpi-fixes-next:
  ACPI / PM: Drop two functions that are not used any more
  ATA / ACPI: remove power dependent device handling

10 years agoMerge branch 'pm-fixes-next' into linux-next
Rafael J. Wysocki [Thu, 17 Oct 2013 13:46:24 +0000 (15:46 +0200)]
Merge branch 'pm-fixes-next' into linux-next

* pm-fixes-next:
  cpufreq: s3c64xx: Rename index to driver_data

10 years agoACPI / PM: Drop two functions that are not used any more
Rafael J. Wysocki [Thu, 17 Oct 2013 13:44:48 +0000 (15:44 +0200)]
ACPI / PM: Drop two functions that are not used any more

Two functions defined in device_pm.c, acpi_dev_pm_add_dependent()
and acpi_dev_pm_remove_dependent(), have no callers and may be
dropped, so drop them.

Moreover, they are the only functions adding entries to and removing
entries from the power_dependent list in struct acpi_device, so drop
that list too.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoATA / ACPI: remove power dependent device handling
Aaron Lu [Thu, 17 Oct 2013 13:38:53 +0000 (15:38 +0200)]
ATA / ACPI: remove power dependent device handling

Previously, we wanted SCSI devices corrsponding to ATA devices to
be runtime resumed when the power resource for those ATA device was
turned on by some other device, so we added the SCSI device to the
dependent device list of the ATA device's ACPI node.  However, this
code has no effect after commit 41863fc (ACPI / power: Drop automaitc
resume of power resource dependent devices) and the mechanism it was
supposed to implement is regarded as a bad idea now, so drop it.

[rjw: Changelog]
Signed-off-by: Aaron Lu <aaron.lu@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: exynos4210: Use the common clock framework to set APLL clock rate
Lukasz Majewski [Wed, 9 Oct 2013 12:08:43 +0000 (14:08 +0200)]
cpufreq: exynos4210: Use the common clock framework to set APLL clock rate

In the exynos4210_set_apll() function, the APLL frequency is set with
direct register manipulation.

Such approach is not allowed in the common clock framework. The frequency
is changed, but the corresponding clock value is not updated. This causes
wrong frequency read from cpufreq's cpuinfo_cur_freq sysfs attribute.

Also direct manipulation with PLL's S parameter has been removed. It is
already done at PLL35xx code.

Tested at:
- Exynos4210 - Trats board (linux 3.12-rc4)

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Reviewed-by: Yadwinder Singh Brar <yadi.brar@samsung.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: exynos4x12: Use the common clock framework to set APLL clock rate
Lukasz Majewski [Wed, 9 Oct 2013 12:08:42 +0000 (14:08 +0200)]
cpufreq: exynos4x12: Use the common clock framework to set APLL clock rate

In the exynos4x12_set_apll() function, the APLL frequency is set with
direct register manipulation.

Such approach is not allowed in the common clock framework. The frequency
is changed, but the corresponding clock value is not updated. This causes
wrong frequency read from cpufreq's cpuinfo_cur_freq sysfs attribute.

Also direct manipulation with PLL's S parameter has been removed. It is
already done at PLL35xx code.

Tested at:
- Exynos4412 - Trats2 board (linux 3.12-rc4)

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Reviewed-by: Yadwinder Singh Brar <yadi.brar@samsung.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: Detect spurious invocations of update_policy_cpu()
Srivatsa S. Bhat [Thu, 12 Sep 2013 11:59:09 +0000 (17:29 +0530)]
cpufreq: Detect spurious invocations of update_policy_cpu()

The function update_policy_cpu() is expected to be called when the policy->cpu
of a cpufreq policy is to be changed: ie., the new CPU nominated to become the
policy->cpu is different from the old one.

Print a warning if it is invoked with new_cpu == old_cpu, since such an
invocation might hint at a faulty logic in the caller.

Suggested-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: pmac64: enable cpufreq on iMac G5 (iSight) model
Aaro Koskinen [Mon, 30 Sep 2013 20:44:33 +0000 (23:44 +0300)]
cpufreq: pmac64: enable cpufreq on iMac G5 (iSight) model

Enable cpufreq on iMac G5 (iSight) model. Tested with the 2.1 GHz version.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: pmac64: provide cpufreq transition latency for older G5 models
Aaro Koskinen [Mon, 30 Sep 2013 20:44:32 +0000 (23:44 +0300)]
cpufreq: pmac64: provide cpufreq transition latency for older G5 models

Currently cpufreq ondemand governor cannot used on older G5 models,
because the transition latency is set to CPUFREQ_ETERNAL. Provide a
value based on a measurement on Xserve G5, which happens to be also the
highest allowed latency.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: pmac64: speed up frequency switch
Aaro Koskinen [Mon, 30 Sep 2013 20:44:31 +0000 (23:44 +0300)]
cpufreq: pmac64: speed up frequency switch

Some functions on switch path use msleep() which is inaccurate, and
depends on HZ. With HZ=100 msleep(1) takes actually over ten times longer.
Using usleep_range() we get more accurate sleeps.

I measured the "pfunc_slewing_done" polling to take 300us at max (on
2.3GHz dual-processor Xserve G5), so using 500us sleep there should
be fine.

With the patch, g5_switch_freq() duration drops from ~50ms to ~10ms on
Xserve with HZ=100.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: highbank-cpufreq: Enable Midway/ECX-2000
Mark Langsdorf [Tue, 1 Oct 2013 15:30:24 +0000 (10:30 -0500)]
cpufreq: highbank-cpufreq: Enable Midway/ECX-2000

Calxeda's new ECX-2000 part uses the same cpufreq interface as highbank,
so add it to the driver's compatibility list.

This is a minor change that can safely be applied to the 3.10 and 3.11
stable trees.

Signed-off-by: Mark Langsdorf <mark.langsdorf@calxeda.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoexynos-cpufreq: fix false return check from "regulator_set_voltage"
Manish Badarkhe [Wed, 9 Oct 2013 15:13:37 +0000 (20:43 +0530)]
exynos-cpufreq: fix false return check from "regulator_set_voltage"

Currently, code checks false return value from "regulator_set_voltage"
to show failure message. Modify the code to check proper return
value from "regulator_set_voltage".

Signed-off-by: Manish Badarkhe <badarkhe.manish@gmail.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoPM / devfreq: Remove duplicate include of opp.h
Manish Badarkhe [Wed, 9 Oct 2013 18:05:24 +0000 (23:35 +0530)]
PM / devfreq: Remove duplicate include of opp.h

Currently, code include opp.h twice. Remove one inclusion
of opp.h

Signed-off-by: Manish Badarkhe <badarkhe.manish@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agobitops: Introduce BIT_ULL
Srinivas Pandruvada [Fri, 11 Oct 2013 23:54:59 +0000 (16:54 -0700)]
bitops: Introduce BIT_ULL

Adding BIT(x) equivalent for unsigned long long type, BIT_ULL(x). Also
added BIT_ULL_MASK and BIT_ULL_WORD.

Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agox86 / msr: add 64bit _on_cpu access functions
Jacob Pan [Fri, 11 Oct 2013 23:54:58 +0000 (16:54 -0700)]
x86 / msr: add 64bit _on_cpu access functions

Having 64-bit MSR access methods on given CPU can avoid shifting and
simplify MSR content manipulation. We already have other combinations
of rdmsrl_xxx and wrmsrl_xxx but missing the _on_cpu version.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
Reviewed-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoPowerCap: Add to drivers Kconfig and Makefile
Srinivas Pandruvada [Fri, 11 Oct 2013 23:54:57 +0000 (16:54 -0700)]
PowerCap: Add to drivers Kconfig and Makefile

Added changes to Makefile and Kconfig to include in driver build.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoPowerCap: Add class driver
Srinivas Pandruvada [Fri, 11 Oct 2013 23:54:56 +0000 (16:54 -0700)]
PowerCap: Add class driver

The power capping framework providing a consistent interface between the
kernel and user space that allows power capping drivers to expose their
settings to user space in a uniform way.
The overall design of the framework is described in the documentation
added by the previous patch in this series.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoPowerCap: Documentation
Srinivas Pandruvada [Fri, 11 Oct 2013 23:54:55 +0000 (16:54 -0700)]
PowerCap: Documentation

Added power cap framework documentation. This explains the use of power
capping framework, sysfs and programming interface.

There are two documents:
 - Documentation/power/powercap/powercap.txt : Explains use case and APIs.
 - Documentation/ABI/testing/sysfs-class-powercap: Explains ABIs.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agospeedstep-centrino: Remove unnecessary braces
Evgeny Kapaev [Tue, 15 Oct 2013 17:42:52 +0000 (21:42 +0400)]
speedstep-centrino: Remove unnecessary braces

As per coding style, braces {} are not necessary for single statement block

Signed-off-by: Evgeny Kapaev <orener300@gmail.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoMerge branch 'cpuidle/arm-next' of git://git.linaro.org/people/dlezcano/linux into...
Rafael J. Wysocki [Wed, 16 Oct 2013 22:13:39 +0000 (00:13 +0200)]
Merge branch 'cpuidle/arm-next' of git://git.linaro.org/people/dlezcano/linux into pm-cpuidle

Pull cpuidle updates for v3.13 from Daniel Lezcano:

 - Daniel Lezcano converted cpuidle to a platform_driver for at91.
   The standby callback is stored in the platform_device's data
   field as a callback for the driver, so the pm specific code and
   the backend driver have no more dependency. Each SoC init function
   fills the right callback at init time. As there are no more
   dependency, we can move the driver in the drivers/cpuidle directory.

 - Jean-Christophe Plagnol-Villard and Nicolas Ferre made a cleanup on
   top of the patch described above and fixed up the ddr standby callback
   so more SoC are supported. Even if the modifications are in the
   mach-at91 directory, they asked these patches to be included through
   the PM tree as they depend on the platform_driver conversion.

* 'cpuidle/arm-next' of git://git.linaro.org/people/dlezcano/linux:
  ARM: AT91: DT: pm: Select ram controller standby based on DT
  ARM: AT91: pm: Factorize standby function
  ARM: at91: cpuidle: Move driver to drivers/cpuidle
  ARM: at91: cpuidle: Convert to platform driver

10 years agoacpi-cpufreq: Add comment under ACPI_ADR_SPACE_SYSTEM_IO case
Viresh Kumar [Wed, 16 Oct 2013 21:58:10 +0000 (23:58 +0200)]
acpi-cpufreq: Add comment under ACPI_ADR_SPACE_SYSTEM_IO case

policy->cur is now set by cpufreq core when cpufreq_driver->get() is defined and
so drivers aren't required to set it. When space_id is ACPI_ADR_SPACE_SYSTEM_IO
for acpi cpufreq driver it doesn't set ->get to a valid function pointer and so
policy->cur is required to be set by driver.

This is already followed in acpi-cpufreq driver. This patch adds a comment
describing why we need to set policy->cur from driver.

Suggested-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: s3c64xx: Rename index to driver_data
Charles Keepax [Mon, 14 Oct 2013 18:36:47 +0000 (19:36 +0100)]
cpufreq: s3c64xx: Rename index to driver_data

The index field of cpufreq_frequency_table has been renamed to
driver_data by commit 5070158 (cpufreq: rename index as driver_data
in cpufreq_frequency_table).

This patch updates the s3c64xx driver to match.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Cc: 3.11+ <stable@vger.kernel.org> # 3.11+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoARM: AT91: DT: pm: Select ram controller standby based on DT
Jean-Christophe PLAGNIOL-VILLARD [Wed, 16 Oct 2013 14:24:57 +0000 (16:24 +0200)]
ARM: AT91: DT: pm: Select ram controller standby based on DT

Move non-dt selection to ioremap_registers init which is only called not
non-dt board.

So we can support sam9n12/sam9x5/sama5d3 too.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
10 years agoARM: AT91: pm: Factorize standby function
Jean-Christophe PLAGNIOL-VILLARD [Wed, 16 Oct 2013 14:24:56 +0000 (16:24 +0200)]
ARM: AT91: pm: Factorize standby function

Detect presence of second bank. So we do not need to have on function per SoC

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
10 years agoARM: at91: cpuidle: Move driver to drivers/cpuidle
Daniel Lezcano [Thu, 26 Sep 2013 15:34:24 +0000 (17:34 +0200)]
ARM: at91: cpuidle: Move driver to drivers/cpuidle

As the cpuidle driver code has no more the dependency with the pm code, the
'standby' callback being passed as a parameter to the device's platform data,
we can move the cpuidle driver in the drivers/cpuidle directory.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Conflicts:

drivers/cpuidle/Kconfig.arm
drivers/cpuidle/Makefile

10 years agoARM: at91: cpuidle: Convert to platform driver
Daniel Lezcano [Sun, 22 Sep 2013 20:29:57 +0000 (22:29 +0200)]
ARM: at91: cpuidle: Convert to platform driver

Using the platform driver model is a good way to separate the cpuidle specific
code from the low level pm code. It allows to remove the dependency between
these two components.

The platform_device is located in the pm code and a 'set' function has been
added to set the standby function from the AT91_SOC_START initialization
function. Each SoC with a cpuidle driver will set the standby function in the
platform_data field at init time. Then pm code will register the cpuidle
platform device.

The cpuidle driver will register the platform_driver and use the device's
platform_data as a standby callback in the idle path.

The at91_pm_enter function contains a { if then else } based on cpu_is_xx
similar to what was in cpuidle. This is considered dangerous when adding a new
SoC. Like the cpuidle driver, a standby ops is defined and assigned when the
SoC init function specifies what is its standby function and reused in the
at91_pm_enter's 'case' block.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
10 years agocpufreq: arm-big-little: use clk_get instead of clk_get_sys
Sudeep KarkadaNagesha [Wed, 16 Oct 2013 13:52:39 +0000 (14:52 +0100)]
cpufreq: arm-big-little: use clk_get instead of clk_get_sys

Currently clk_get_sys is used with cpu-cluster.<n> as the device id
which is incorrect. It should be connection/consumer ID instead.

It is possible to specify input clock in the cpu device node along
with the optional clock-name. clk_get_sys can't handle that.

This patch replaces clk_get_sys with clk_get to extend support for
clocks specified in the device tree cpu node.

Signed-off-by: Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: exynos: Show a list of available frequencies
Jungseok Lee [Mon, 14 Oct 2013 23:31:13 +0000 (08:31 +0900)]
cpufreq: exynos: Show a list of available frequencies

This patch adds freq_attr to show a list of exynos5440 scaling
available frequencies through sysfs. Common exynos driver already
supports this attribute.

Signed-off-by: Jungseok Lee <jays.lee@samsung.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoMerge branch 'acpi-fixes-next' into linux-next
Rafael J. Wysocki [Wed, 16 Oct 2013 21:05:58 +0000 (23:05 +0200)]
Merge branch 'acpi-fixes-next' into linux-next

* acpi-fixes-next:
  ACPI / power: Drop automaitc resume of power resource dependent devices

10 years agoACPI / power: Drop automaitc resume of power resource dependent devices
Rafael J. Wysocki [Wed, 16 Oct 2013 21:05:42 +0000 (23:05 +0200)]
ACPI / power: Drop automaitc resume of power resource dependent devices

The mechanism causing devices depending on a given power resource
(that is, devices that can be in D0 only if that power resource is
on) to be resumed automatically when the power resource is turned
on (and their "inferred" power state becomes D0 as a result) is
inherently racy and in fact unnecessary.

It is racy, because if the power resource is turned on and then
immediately off, the device resume triggered by the first transition
to "on" may still happen, causing the power resource to be turned
on again.  That again will trigger the "resume of dependent devices"
mechanism, but if the devices in question are not in use, they will
be suspended in the meantime causing the power resource to be turned
off.  However, the "resume of dependent devices" will next resume
them again and so on.  In some cases (USB port PM in particular) that
leads to an endless busy loop of flipping the resource on and off
continuously.

It is needless, because whoever turns a power resource on will most
likely turn it off at some point and the devices that go into "D0"
as a result of turning it on will then go back into D3cold
(generally, the state they were in before).

Moreover, turning on all power resources a device needs to go into
D0 is not sufficient for a full transition into D0 in general.
Namely, _PS0 may need to be executed in addition to that in some
cases.  This means that the whole rationale of the "resume of
dependent devices" mechanism was incorrect to begin with and it's
best to remove it entirely.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoMerge branch 'pm-fixes-next' into linux-next
Rafael J. Wysocki [Wed, 16 Oct 2013 20:59:51 +0000 (22:59 +0200)]
Merge branch 'pm-fixes-next' into linux-next

* pm-fixes-next:
  intel_pstate: Fix type mismatch warning

10 years agointel_pstate: Fix type mismatch warning
Rafael J. Wysocki [Wed, 16 Oct 2013 20:59:33 +0000 (22:59 +0200)]
intel_pstate: Fix type mismatch warning

The expression in line 398 of intel_pstate.c causes the following
warning to be emitted:

drivers/cpufreq/intel_pstate.c:398:3: warning: left shift count >= width of type

which happens because unsigned long is 32-bit on some architectures.

Fix that by using a helper u64 variable and simplify the code
slightly.

Tested-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoMerge branch 'pm-runtime-next' into linux-next
Rafael J. Wysocki [Wed, 16 Oct 2013 15:10:33 +0000 (17:10 +0200)]
Merge branch 'pm-runtime-next' into linux-next

* pm-runtime-next:
  PM / Runtime: Respect autosuspend when idle triggers suspend

10 years agoMerge branch 'pm-cpufreq-next' into linux-next
Rafael J. Wysocki [Wed, 16 Oct 2013 15:10:25 +0000 (17:10 +0200)]
Merge branch 'pm-cpufreq-next' into linux-next

* pm-cpufreq-next: (147 commits)
  cpufreq: sa11x0: Fix build breakage after "Expose frequency table"
  cpufreq: tegra: use cpufreq_generic_init()
  cpufreq: spear: use cpufreq_generic_init()
  cpufreq: sa11x0: use cpufreq_generic_init()
  cpufreq: s5pv210: use cpufreq_generic_init()
  cpufreq: s3c: use cpufreq_generic_init()
  cpufreq: pmac64: use cpufreq_generic_init()
  cpufreq: pmac32: use cpufreq_generic_init()
  cpufreq: pasemi: use cpufreq_generic_init()
  cpufreq: omap: use cpufreq_generic_init()
  cpufreq: maple: use cpufreq_generic_init()
  cpufreq: loongson2: use cpufreq_generic_init()
  cpufreq: kirkwood: use cpufreq_generic_init()
  cpufreq: imx6q: use cpufreq_generic_init()
  cpufreq: exynos: use cpufreq_generic_init()
  cpufreq: dbx500: use cpufreq_generic_init()
  cpufreq: davinci: use cpufreq_generic_init()
  cpufreq: cris: use cpufreq_generic_init()
  cpufreq: cpufreq-cpu0: use cpufreq_generic_init()
  cpufreq: remove CONFIG_CPU_FREQ_TABLE
  ...

10 years agoMerge branch 'pm-cpuidle-next' into linux-next
Rafael J. Wysocki [Wed, 16 Oct 2013 15:10:16 +0000 (17:10 +0200)]
Merge branch 'pm-cpuidle-next' into linux-next

* pm-cpuidle-next:
  ARM: ux500: cpuidle: fix section mismatch
  ARM: zynq: cpuidle: convert to platform driver
  ARM: zynq: cpuidle: Remove useless compatibility string
  drivers: cpuidle: rename ARM big.LITTLE driver config and makefile entries
  ARM: EXYNOS: convert cpuidle driver to be a platform driver
  intel_idle: mark some functions with __init tag
  intel_idle: mark states tables with __initdata tag
  intel_idle: shrink states tables

10 years agoMerge branch 'acpi-video-next' into linux-next
Rafael J. Wysocki [Wed, 16 Oct 2013 15:10:01 +0000 (17:10 +0200)]
Merge branch 'acpi-video-next' into linux-next

* acpi-video-next:
  ACPI / video: Add Lenovo IdeaPad Yoga 13 to acpi video detect blacklist
  thinkpad-acpi: fix handle locate for video and query of _BCL
  ACPI / video: Do not register backlight if win8 and native interface exists
  ACPI / video: seperate backlight control and event interface
  backlight: introduce backlight_device_registered
  ACPI: add missing win8 OSI comment to blacklist
  ACPI: update win8 OSI blacklist

10 years agoMerge branch 'acpi-assorted-next' into linux-next
Rafael J. Wysocki [Wed, 16 Oct 2013 15:09:40 +0000 (17:09 +0200)]
Merge branch 'acpi-assorted-next' into linux-next

* acpi-assorted-next:
  ACPI / platform: add ACPI ID for a Broadcom GPS chip
  ACPI: improve acpi_extract_package() utility
  ACPI / LPSS: fix UART Auto Flow Control
  ACPI / platform: Add ACPI IDs for Intel SST audio device
  x86 / ACPI: fix incorrect placement of __initdata tag
  ACPI / thermal: convert printk(LEVEL...) to pr_<lvl>
  ACPI / sysfs: make GPE sysfs attributes only accept correct values
  ACPI / EC: Convert all printk() calls to dynamic debug function
  ACPI / button: Using input_set_capability() to mark device's event capability
  ACPI / osl: implement acpi_os_sleep() with msleep()

10 years agoACPI / platform: add ACPI ID for a Broadcom GPS chip
Heikki Krogerus [Wed, 16 Oct 2013 10:15:14 +0000 (13:15 +0300)]
ACPI / platform: add ACPI ID for a Broadcom GPS chip

This adds ACPI ID for Broadcom GPS receiver BCM4752.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoMerge branch 'acpi-conversion' into acpi-assorted
Rafael J. Wysocki [Wed, 16 Oct 2013 15:04:41 +0000 (17:04 +0200)]
Merge branch 'acpi-conversion' into acpi-assorted

The following commits depend on the 'acpi-conversion' material.

Conflicts:
drivers/acpi/acpi_platform.c

10 years agoPM / Runtime: Respect autosuspend when idle triggers suspend
Ulf Hansson [Tue, 15 Oct 2013 20:25:08 +0000 (22:25 +0200)]
PM / Runtime: Respect autosuspend when idle triggers suspend

For devices which don't have a .runtime_idle() callback or if it
returns 0, rpm_idle() will end up in triggering a call to
rpm_suspend(), thus trying to carry out a runtime suspend directly
from runtime_idle().

In the above situation we want to respect devices which has enabled
autosuspend, we therfore append the flag sent to rpm_suspend with
RPM_AUTO.

Do note that drivers still needs to update the device last busy mark,
to control the delay for this circumstance.

Updated runtime PM documentation accordingly.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Kevin Hilman <khilman@linaro.org>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoMerge branch 'acpi-pm-next' into linux-next
Rafael J. Wysocki [Tue, 15 Oct 2013 23:43:42 +0000 (01:43 +0200)]
Merge branch 'acpi-pm-next' into linux-next

* acpi-pm-next:
  spi: attach/detach SPI device to the ACPI power domain
  i2c: attach/detach I2C client device to the ACPI power domain
  ACPI / PM: allow child devices to ignore parent power state

10 years agoMerge branch 'acpi-ipmi-next' into linux-next
Rafael J. Wysocki [Tue, 15 Oct 2013 23:43:32 +0000 (01:43 +0200)]
Merge branch 'acpi-ipmi-next' into linux-next

* acpi-ipmi-next:
  ACPI / IPMI: Cleanup coding styles
  ACPI / IPMI: Cleanup some Kconfig codes
  ACPI / IPMI: Cleanup some inclusion codes
  ACPI / IPMI: Cleanup some initialization codes
  ACPI / IPMI: Cleanup several acpi_ipmi_device members
  ACPI / IPMI: Add reference counting for ACPI IPMI transfers
  ACPI / IPMI: Use global IPMI operation region handler
  ACPI / IPMI: Fix race caused by the unprotected ACPI IPMI user
  ACPI / IPMI: Fix race caused by the timed out ACPI IPMI transfers
  ACPI / IPMI: Fix race caused by the unprotected ACPI IPMI transfers
  ACPI / IPMI: Fix potential response buffer overflow

10 years agoMerge branch 'acpi-conversion-next' into linux-next
Rafael J. Wysocki [Tue, 15 Oct 2013 23:43:10 +0000 (01:43 +0200)]
Merge branch 'acpi-conversion-next' into linux-next

* acpi-conversion-next:
  ACPI / AC: Remove AC's proc directory.
  ideapad_laptop: convert ideapad device/driver to platform bus
  ideapad_laptop: remove ideapad_handle and ideapad_priv
  ideapad_laptop: convert internal function calls to use ideapad_private as parameter
  ideapad_laptop: introduce struct acpi_device pointer to ideapad_private structure
  ideapad_laptop: introduce #ifdef CONFIG_PM_SLEEP for PM specific code
  ACPI / AC: convert ACPI ac driver to platform bus

10 years agoMerge branch 'acpi-tables-next' into linux-next
Rafael J. Wysocki [Tue, 15 Oct 2013 23:42:58 +0000 (01:42 +0200)]
Merge branch 'acpi-tables-next' into linux-next

* acpi-tables-next:
  ACPI / x86: Increase override tables number limit

10 years agoMerge branch 'acpi-hotplug-next' into linux-next
Rafael J. Wysocki [Tue, 15 Oct 2013 23:42:52 +0000 (01:42 +0200)]
Merge branch 'acpi-hotplug-next' into linux-next

* acpi-hotplug-next:
  ACPI / memhotplug: Use defined marco METHOD_NAME__STA
  ACPI / hotplug: Use kobject_init_and_add() instead of _init() and _add()
  ACPI / hotplug: Don't set kobject parent pointer explicitly
  ACPI / hotplug: Set kobject name via kobject_add(), not kobject_set_name()
  hotplug, powerpc, x86: Remove cpu_hotplug_driver_lock()
  hotplug / x86: Disable ARCH_CPU_PROBE_RELEASE on x86
  hotplug / x86: Add hotplug lock to missing places
  hotplug / x86: Fix online state in cpu0 debug interface

10 years agoMerge branch 'acpica-next' into linux-next
Rafael J. Wysocki [Tue, 15 Oct 2013 23:42:40 +0000 (01:42 +0200)]
Merge branch 'acpica-next' into linux-next

* acpica-next:
  MAINTAINERS / ACPICA: Add ACPICA information to MAINTAINERS
  ACPICA: Update version to 20130823.
  ACPICA: SCI Handlers: Update handler interface, eliminate unnecessary argument.
  ACPICA: Cleanup exception codes.
  ACPICA: Tables: Cleanup RSDP signature codes.
  ACPICA: Tables: Cleanup table checksum verification code.
  ACPICA: Debugger: Add new command to display full namespace pathnames.
  ACPICA: Operation region support: Never free the handler "context" pointer.
  ACPICA: Add support for host-installed SCI handlers.
  ACPICA: Validate start object for acpi_walk_namespace.
  ACPICA: Debugger: Prevent possible command line buffer overflow, kernel behavior is not affected.
  ACPICA: Linux-specific header: enable "aarch64" 64-bit build.
  ACPICA: Debug output: small formatting update, no functional change.
  ACPICA: acpi_read: On error, do not modify the return value target location.
  ACPICA: Improve error message for "too many parent prefixes" condition.

10 years agoMerge branch 'acpi-processor-next' into linux-next
Rafael J. Wysocki [Tue, 15 Oct 2013 23:42:32 +0000 (01:42 +0200)]
Merge branch 'acpi-processor-next' into linux-next

* acpi-processor-next:
  ACPI / processor: fixed a brace coding style issue
  ACPI / processor: Remove outdated comments
  ACPI / processor: remove unnecessary if (!pr) check
  ACPI / processor: remove some dead code in acpi_processor_get_info()
  x86 / ACPI: simplify _acpi_map_lsapic()
  ACPI / processor: use apic_id and remove duplicated _MAT evaluation
  ACPI / processor: Introduce apic_id in struct processor to save parsed APIC id

10 years agoMerge branch 'acpi-cleanup-next' into linux-next
Rafael J. Wysocki [Tue, 15 Oct 2013 23:42:21 +0000 (01:42 +0200)]
Merge branch 'acpi-cleanup-next' into linux-next

* acpi-cleanup-next: (34 commits)
  ACPI / proc: Remove alarm proc file
  ACPI: Remove CONFIG_ACPI_PROCFS_POWER and cm_sbsc.c
  ACPI / SBS: Remove SBS's proc directory
  ACPI / Battery: Remove battery's proc directory
  ACP / fan: trivial style cleanup
  ACPI / processor: remove superfluous pr == NULL checks
  ACPI / mm: use NUMA_NO_NODE
  toshiba_acpi: convert acpi_evaluate_object() to acpi_evaluate_integer()
  intel-smartconnect: convert acpi_evaluate_object() to acpi_evaluate_integer()
  intel-rst: convert acpi_evaluate_object() to acpi_evaluate_integer()
  fujitsu-laptop: convert acpi_evaluate_object() to acpi_evaluate_integer()
  i2c-hid: convert acpi_evaluate_object() to acpi_evaluate_integer()
  ACPI: dock: convert acpi_evaluate_object() to acpi_evaluate_integer()
  acpi_processor: convert acpi_evaluate_object() to acpi_evaluate_integer()
  pnpacpi: convert acpi_get_handle() to acpi_has_method()
  wmi: convert acpi_get_handle() to acpi_has_method()
  toshiba_acpi: convert acpi_get_handle() to acpi_has_method()
  sony-laptop: convert acpi_get_handle() to acpi_has_method()
  intel_menlow: convert acpi_get_handle() to acpi_has_method()
  fujitsu-laptop: convert acpi_get_handle() to acpi_has_method()
  ...

10 years agoMerge branch 'pm-fixes-next' into linux-next
Rafael J. Wysocki [Tue, 15 Oct 2013 23:42:11 +0000 (01:42 +0200)]
Merge branch 'pm-fixes-next' into linux-next

* pm-fixes-next:
  cpufreq / intel_pstate: Fix max_perf_pct on resume

10 years agocpufreq / intel_pstate: Fix max_perf_pct on resume
Dirk Brandewie [Tue, 15 Oct 2013 18:06:14 +0000 (11:06 -0700)]
cpufreq / intel_pstate: Fix max_perf_pct on resume

If the system is suspended while max_perf_pct is less than 100 percent
or no_turbo set policy->{min,max} will be set incorrectly with scaled
values which turn the scaled values into hard limits.

References: https://bugzilla.kernel.org/show_bug.cgi?id=61241
Reported-by: Patrick Bartels <petzicus@googlemail.com>
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
Cc: 3.9+ <stable@vger.kernel.org> # 3.9+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPI / video: Add Lenovo IdeaPad Yoga 13 to acpi video detect blacklist
Lennart Poettering [Mon, 14 Oct 2013 00:55:05 +0000 (02:55 +0200)]
ACPI / video: Add Lenovo IdeaPad Yoga 13 to acpi video detect blacklist

On the Yoga 13 the backlight control doesn't work via ACPI. (And doesn't
work either with the low-level platform driver ideapad_laptop; but
works correctly via the intel video driver).  This patch hence adds the
Yoga 13 to the ACPI video detect blacklist, to make sure the broken ACPI
backlight device is never exposed to userspace.

Note that this appears unrelated to the Windows 8 backlight issues tracked
here:

https://bugzilla.kernel.org/show_bug.cgi?id=51231
https://bugzilla.kernel.org/show_bug.cgi?id=60682

The Yoga's ACPI backlight controls work neither with nor without
acpi_osi="!Windows 2012" on the kernel command line. It appears that
backlight control via the EC simply is not available at all, regardless
whether done via ACPI or via the vendor driver.

Signed-off-by: Lennart Poettering <lennart@poettering.net>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPI / AC: Remove AC's proc directory.
Lan Tianyu [Sat, 12 Oct 2013 13:04:48 +0000 (21:04 +0800)]
ACPI / AC: Remove AC's proc directory.

AC's proc directory is not used and so remove it. Prepare for removing
/proc/acpi directory.

Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agothinkpad-acpi: fix handle locate for video and query of _BCL
Aaron Lu [Fri, 11 Oct 2013 13:27:46 +0000 (21:27 +0800)]
thinkpad-acpi: fix handle locate for video and query of _BCL

The tpacpi_acpi_handle_locate function makes use of acpi_get_devices to
locate handle for ACPI video by HID, the problem is, ACPI video node
doesn't really have HID defined(i.e. no _HID control method is defined
for video device), so.. that function would fail. This can be solved by
enhancing the callback function for acpi_get_devices, where we can use
acpi_device_hid function to check if the ACPI node corresponds to a
video controller.

In addition to that, the _BCL control method only exists under a video
output device node, not a video controller device node. So to evaluate
_BCL, we need the handle of a video output device node, which is child
of the located video controller node from tpacpi_acpi_handle_locate.

The two fix are necessary for some Thinkpad models to emit notification
on backlight hotkey press as a result of evaluation of _BCL.

Signed-off-by: Aaron Lu <aaron.lu@intel.com>
Tested-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPI / video: Do not register backlight if win8 and native interface exists
Aaron Lu [Fri, 11 Oct 2013 13:27:45 +0000 (21:27 +0800)]
ACPI / video: Do not register backlight if win8 and native interface exists

According to Matthew Garrett, "Windows 8 leaves backlight control up
to individual graphics drivers rather than making ACPI calls itself.
There's plenty of evidence to suggest that the Intel driver for
Windows [8] doesn't use the ACPI interface, including the fact that
it's broken on a bunch of machines when the OS claims to support
Windows 8.  The simplest thing to do appears to be to disable the
ACPI backlight interface on these systems".

So for Win8 systems, if there is native backlight control interface
registered by GPU driver, ACPI video does not need to register its own.
Since there are systems that don't work well with this approach, a
parameter for video module named use_native_backlight is introduced and
has the value of false by default. For users who have a broken ACPI
video backlight interface, video.use_native_backlight=1 is needed in
kernel cmdline.

Signed-off-by: Aaron Lu <aaron.lu@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPI / video: seperate backlight control and event interface
Aaron Lu [Fri, 11 Oct 2013 13:27:44 +0000 (21:27 +0800)]
ACPI / video: seperate backlight control and event interface

The backlight control and event delivery functionality provided by ACPI
video module is mixed together and registered all during video device
enumeration time. As a result, the two functionality are also removed
together on module unload time or by the acpi_video_unregister function.
The two functionalities are actually independent and one may be useful
while the other one may be broken, so it is desirable to seperate the
two functionalities such that it is clear and easy to disable one
functionality without affecting the other one.

APIs to selectively remove backlight control interface and/or event
delivery functionality can be easily added once needed.

Signed-off-by: Aaron Lu <aaron.lu@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agobacklight: introduce backlight_device_registered
Aaron Lu [Fri, 11 Oct 2013 13:27:43 +0000 (21:27 +0800)]
backlight: introduce backlight_device_registered

Introduce a new API for modules to query if a specific type of backlight
device has been registered. This is useful for some backlight device
provider module (e.g. ACPI video) to know if a native control
interface(e.g. the interface created by i915) is available and then do
things accordingly (e.g. avoid registering its own on Win8 systems).

Signed-off-by: Aaron Lu <aaron.lu@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: sa11x0: Fix build breakage after "Expose frequency table"
Viresh Kumar [Sat, 12 Oct 2013 20:16:05 +0000 (22:16 +0200)]
cpufreq: sa11x0: Fix build breakage after "Expose frequency table"

Fix build breakage introduced by commit 22c8b4f (cpufreq: sa11x0:
Expose frequency table).

[rjw: Changelog]
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: tegra: use cpufreq_generic_init()
Viresh Kumar [Thu, 3 Oct 2013 15:12:11 +0000 (20:42 +0530)]
cpufreq: tegra: use cpufreq_generic_init()

Use generic cpufreq_generic_init() routine instead of replicating the same code
here.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: spear: use cpufreq_generic_init()
Viresh Kumar [Thu, 3 Oct 2013 15:12:10 +0000 (20:42 +0530)]
cpufreq: spear: use cpufreq_generic_init()

Use generic cpufreq_generic_init() routine instead of replicating the same code
here.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: sa11x0: use cpufreq_generic_init()
Viresh Kumar [Thu, 3 Oct 2013 15:12:09 +0000 (20:42 +0530)]
cpufreq: sa11x0: use cpufreq_generic_init()

Use generic cpufreq_generic_init() routine instead of replicating the same code
here.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: s5pv210: use cpufreq_generic_init()
Viresh Kumar [Thu, 3 Oct 2013 14:59:23 +0000 (20:29 +0530)]
cpufreq: s5pv210: use cpufreq_generic_init()

Use generic cpufreq_generic_init() routine instead of replicating the same code
here.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: s3c: use cpufreq_generic_init()
Viresh Kumar [Thu, 3 Oct 2013 14:59:22 +0000 (20:29 +0530)]
cpufreq: s3c: use cpufreq_generic_init()

Use generic cpufreq_generic_init() routine instead of replicating the same code
here.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: pmac64: use cpufreq_generic_init()
Viresh Kumar [Thu, 3 Oct 2013 14:59:21 +0000 (20:29 +0530)]
cpufreq: pmac64: use cpufreq_generic_init()

Use generic cpufreq_generic_init() routine instead of replicating the same code
here.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: pmac32: use cpufreq_generic_init()
Viresh Kumar [Thu, 3 Oct 2013 14:59:20 +0000 (20:29 +0530)]
cpufreq: pmac32: use cpufreq_generic_init()

Use generic cpufreq_generic_init() routine instead of replicating the same code
here.

Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: pasemi: use cpufreq_generic_init()
Viresh Kumar [Thu, 3 Oct 2013 14:59:19 +0000 (20:29 +0530)]
cpufreq: pasemi: use cpufreq_generic_init()

Use generic cpufreq_generic_init() routine instead of replicating the same code
here.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: omap: use cpufreq_generic_init()
Viresh Kumar [Thu, 3 Oct 2013 14:59:18 +0000 (20:29 +0530)]
cpufreq: omap: use cpufreq_generic_init()

Use generic cpufreq_generic_init() routine instead of replicating the same code
here.

This also rearranges the code a bit to make it more sensible. Also removes some
unnecessary checks.

Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: maple: use cpufreq_generic_init()
Viresh Kumar [Thu, 3 Oct 2013 14:59:17 +0000 (20:29 +0530)]
cpufreq: maple: use cpufreq_generic_init()

Use generic cpufreq_generic_init() routine instead of replicating the same code
here.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: loongson2: use cpufreq_generic_init()
Viresh Kumar [Thu, 3 Oct 2013 14:59:16 +0000 (20:29 +0530)]
cpufreq: loongson2: use cpufreq_generic_init()

Use generic cpufreq_generic_init() routine instead of replicating the same code
here. This driver wasn't setting transition_latency and so is getting set to 0
by default. Lets mark it explicitly by calling the generic routine with
transition_latency as 0.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: kirkwood: use cpufreq_generic_init()
Viresh Kumar [Thu, 3 Oct 2013 14:59:15 +0000 (20:29 +0530)]
cpufreq: kirkwood: use cpufreq_generic_init()

Use generic cpufreq_generic_init() routine instead of replicating the same code
here.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: imx6q: use cpufreq_generic_init()
Viresh Kumar [Thu, 3 Oct 2013 14:59:14 +0000 (20:29 +0530)]
cpufreq: imx6q: use cpufreq_generic_init()

Use generic cpufreq_generic_init() routine instead of replicating the same code
here.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: exynos: use cpufreq_generic_init()
Viresh Kumar [Thu, 3 Oct 2013 14:59:13 +0000 (20:29 +0530)]
cpufreq: exynos: use cpufreq_generic_init()

Use generic cpufreq_generic_init() routine instead of replicating the same code
here.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: dbx500: use cpufreq_generic_init()
Viresh Kumar [Thu, 3 Oct 2013 14:59:12 +0000 (20:29 +0530)]
cpufreq: dbx500: use cpufreq_generic_init()

Use generic cpufreq_generic_init() routine instead of replicating the same code
here.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: davinci: use cpufreq_generic_init()
Viresh Kumar [Thu, 3 Oct 2013 14:59:11 +0000 (20:29 +0530)]
cpufreq: davinci: use cpufreq_generic_init()

Use generic cpufreq_generic_init() routine instead of replicating the same code
here.

Cc: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: cris: use cpufreq_generic_init()
Viresh Kumar [Thu, 3 Oct 2013 14:59:10 +0000 (20:29 +0530)]
cpufreq: cris: use cpufreq_generic_init()

Use generic cpufreq_generic_init() routine instead of replicating the same code
here.

Cc: Mikael Starvik <starvik@axis.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: cpufreq-cpu0: use cpufreq_generic_init()
Viresh Kumar [Thu, 3 Oct 2013 14:59:09 +0000 (20:29 +0530)]
cpufreq: cpufreq-cpu0: use cpufreq_generic_init()

Use generic cpufreq_generic_init() routine instead of replicating the same code
here.

Cc: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: remove CONFIG_CPU_FREQ_TABLE
Viresh Kumar [Thu, 3 Oct 2013 14:59:08 +0000 (20:29 +0530)]
cpufreq: remove CONFIG_CPU_FREQ_TABLE

CONFIG_CPU_FREQ_TABLE will be always enabled when cpufreq framework is used, as
cpufreq core depends on it. So, we don't need this CONFIG option anymore as it
is not configurable. Remove CONFIG_CPU_FREQ_TABLE and update its users.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: create cpufreq_generic_init() routine
Viresh Kumar [Thu, 3 Oct 2013 14:59:07 +0000 (20:29 +0530)]
cpufreq: create cpufreq_generic_init() routine

Many CPUFreq drivers for SMP system (where all cores share same clock lines), do
similar stuff in their ->init() part.

This patch creates a generic routine in cpufreq core which can be used by these
so that we can remove some redundant code.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: unicore2: don't initialize part of policy set by core
Viresh Kumar [Thu, 3 Oct 2013 14:59:06 +0000 (20:29 +0530)]
cpufreq: unicore2: don't initialize part of policy set by core

Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.

Most recent of those changes is to call ->get() in the core after calling
->init().

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: tegra: don't initialize part of policy set by core
Viresh Kumar [Thu, 3 Oct 2013 14:59:05 +0000 (20:29 +0530)]
cpufreq: tegra: don't initialize part of policy set by core

Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.

Most recent of those changes is to call ->get() in the core after calling
->init().

Cc: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: speedstep: don't initialize part of policy set by core
Viresh Kumar [Thu, 3 Oct 2013 14:59:04 +0000 (20:29 +0530)]
cpufreq: speedstep: don't initialize part of policy set by core

Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.

Most recent of those changes is to call ->get() in the core after calling
->init().

Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: spear: don't initialize part of policy set by core
Viresh Kumar [Thu, 3 Oct 2013 14:59:03 +0000 (20:29 +0530)]
cpufreq: spear: don't initialize part of policy set by core

Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.

Most recent of those changes is to call ->get() in the core after calling
->init().

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: sh: don't initialize part of policy set by core
Viresh Kumar [Thu, 3 Oct 2013 14:59:02 +0000 (20:29 +0530)]
cpufreq: sh: don't initialize part of policy set by core

Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.

Most recent of those changes is to call ->get() in the core after calling
->init().

Cc: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: sc520_freq: don't initialize part of policy set by core
Viresh Kumar [Thu, 3 Oct 2013 14:59:01 +0000 (20:29 +0530)]
cpufreq: sc520_freq: don't initialize part of policy set by core

Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.

Most recent of those changes is to call ->get() in the core after calling
->init().

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: sa11x0: don't initialize part of policy set by core
Viresh Kumar [Thu, 3 Oct 2013 14:59:00 +0000 (20:29 +0530)]
cpufreq: sa11x0: don't initialize part of policy set by core

Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.

Most recent of those changes is to call ->get() in the core after calling
->init().

Cc: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: s5pv210: don't initialize part of policy set by core
Viresh Kumar [Thu, 3 Oct 2013 14:58:59 +0000 (20:28 +0530)]
cpufreq: s5pv210: don't initialize part of policy set by core

Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.

Most recent of those changes is to call ->get() in the core after calling
->init().

Cc: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: s3c: don't initialize part of policy set by core
Viresh Kumar [Thu, 3 Oct 2013 14:58:58 +0000 (20:28 +0530)]
cpufreq: s3c: don't initialize part of policy set by core

Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.

Most recent of those changes is to call ->get() in the core after calling
->init().

Cc: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: pxa: don't initialize part of policy set by core
Viresh Kumar [Thu, 3 Oct 2013 14:58:57 +0000 (20:28 +0530)]
cpufreq: pxa: don't initialize part of policy set by core

Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.

Most recent of those changes is to call ->get() in the core after calling
->init().

Cc: Eric Miao <eric.y.miao@gmail.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: ppc: don't initialize part of policy set by core
Viresh Kumar [Thu, 3 Oct 2013 14:58:56 +0000 (20:28 +0530)]
cpufreq: ppc: don't initialize part of policy set by core

Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.

Most recent of those changes is to call ->get() in the core after calling
->init().

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: powernow: don't initialize part of policy set by core
Viresh Kumar [Thu, 3 Oct 2013 14:58:55 +0000 (20:28 +0530)]
cpufreq: powernow: don't initialize part of policy set by core

Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.

Most recent of those changes is to call ->get() in the core after calling
->init().

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: pmac: don't initialize part of policy set by core
Viresh Kumar [Thu, 3 Oct 2013 14:58:54 +0000 (20:28 +0530)]
cpufreq: pmac: don't initialize part of policy set by core

Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.

Most recent of those changes is to call ->get() in the core after calling
->init().

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: pcc: don't initialize part of policy set by core
Viresh Kumar [Thu, 3 Oct 2013 14:58:53 +0000 (20:28 +0530)]
cpufreq: pcc: don't initialize part of policy set by core

Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.

Most recent of those changes is to call ->get() in the core after calling
->init().

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>