- 02 12月, 2011 3 次提交
-
-
由 Rafael J. Wysocki 提交于
The current generic PM domains code attempts to use the generic system suspend operations along with the domains' device stop/start routines, which requires device drivers to assume that their system suspend/resume (and hibernation/restore) callbacks will always be used with generic PM domains. However, in theory, the same hardware may be used in devices that don't belong to any PM domain, in which case it would be necessary to add "fake" PM domains to satisfy the above assumption. Also, the domain the hardware belongs to may not be handled with the help of the generic code. To allow device drivers that may be used along with the generic PM domains code of more flexibility, add new device callbacks, .suspend(), .suspend_late(), .resume_early(), .resume(), .freeze(), .freeze_late(), .thaw_early(), and .thaw(), that can be supplied by the drivers in addition to their "standard" system suspend and hibernation callbacks. These new callbacks, if defined, will be used by the generic PM domains code for the handling of system suspend and hibernation instead of the "standard" ones. This will allow drivers to be designed to work with generic PM domains as well as without them. For backwards compatibility, introduce default implementations of the new callbacks for PM domains that will execute pm_generic_suspend(), pm_generic_suspend_noirq(), pm_generic_resume_noirq(), pm_generic_resume(), pm_generic_freeze(), pm_generic_freeze_noirq(), pm_generic_thaw_noirq(), and pm_generic_thaw(), respectively, for the given device if its driver doesn't define those callbacks. Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
-
由 Rafael J. Wysocki 提交于
The current PM domains code uses device drivers' .runtime_suspend() and .runtime_resume() callbacks as the "save device state" and "restore device state" operations, which may not be appropriate in general, because it forces drivers to assume that they always will be used with generic PM domains. However, in theory, the same hardware may be used in devices that don't belong to any PM domain, in which case it would be necessary to add "fake" PM domains to satisfy the above assumption. It also may be located in a PM domain that's not handled with the help of the generic code. To allow device drivers that may be used along with the generic PM domains code of more flexibility, introduce new device callbacks, .save_state() and .restore_state(), that can be supplied by the drivers in addition to their "standard" runtime PM callbacks. This will allow the drivers to be designed to work with generic PM domains as well as without them. For backwards compatibility, introduce default .save_state() and .restore_state() callback routines for PM domains that will execute a device driver's .runtime_suspend() and .runtime_resume() callbacks, respectively, for the given device if the driver doesn't provide its own implementations of .save_state() and .restore_state(). Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
-
由 Rafael J. Wysocki 提交于
The current generic PM domains code requires that the same .stop(), .start() and .active_wakeup() device callback routines be used for all devices in the given domain, which is inflexible and may not cover some specific use cases. For this reason, make it possible to use device specific .start()/.stop() and .active_wakeup() callback routines by adding corresponding callback pointers to struct generic_pm_domain_data. Add a new helper routine, pm_genpd_register_callbacks(), that can be used to populate the new per-device callback pointers. Modify the shmobile's power domains code to allow drivers to add their own code to be run during the device stop and start operations with the help of the new callback pointers. Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl> Acked-by: NMagnus Damm <damm@opensource.se>
-
- 19 11月, 2011 1 次提交
-
-
由 Claudio Scordino 提交于
Patch to fix the error message "directives may not be used inside a macro argument" which appears when the kernel is compiled for the cris architecture. Signed-off-by: NClaudio Scordino <claudio@evidence.eu.com> Acked-by: NDavid Rientjes <rientjes@google.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 18 11月, 2011 1 次提交
-
-
由 Rafael J. Wysocki 提交于
Commit 4ca46ff3 (PM / Sleep: Mark devices involved in wakeup signaling during suspend) introduced the power.wakeup_path field in struct dev_pm_info to mark devices whose children are enabled to wake up the system from sleep states, so that power domains containing the parents that provide their children with wakeup power and/or relay their wakeup signals are not turned off. Unfortunately, that introduced a PM regression on SH7372 whose power consumption in the system "memory sleep" state increased as a result of it, because it prevented the power domain containing the I2C controller from being turned off when some children of that controller were enabled to wake up the system, although the controller was not necessary for them to signal wakeup. To fix this issue use the observation that devices whose power.ignore_children flag is set for runtime PM should be treated analogously during system suspend. Namely, they shouldn't be included in wakeup paths going through their children. Since the SH7372 I2C controller's power.ignore_children flag is set, doing so will restore the previous behavior of that SOC. Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl> Acked-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 16 11月, 2011 1 次提交
-
-
由 Peter Chen 提交于
There may be an issue when the user issue "reboot/shutdown" command, then the device has shut down its hardware, after that, this runtime-pm featured device's driver will probably be scheduled to do its suspend routine, and at its suspend routine, it may access hardware, but the device has already shutdown physically, then the system hang may be occurred. I ran out this issue using an auto-suspend supported USB devices, like 3G modem, keyboard. The usb runtime suspend routine may be scheduled after the usb controller has been shut down, and the usb runtime suspend routine will try to suspend its roothub(controller), it will access register, then the system hang occurs as the controller is shutdown. Signed-off-by: NPeter Chen <peter.chen@freescale.com> Acked-by: NMing Lei <tom.leiming@gmail.com> Acked-by: NGreg Kroah-Hartman <gregkh@suse.de> Cc: stable@kernel.org Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
-
- 10 11月, 2011 2 次提交
-
-
由 Guennadi Liakhovetski 提交于
Make dev_pm_qos_add_request() use WARN() in a better way and do not hardcode the function's name into the message (use __func__ instead). Signed-off-by: NGuennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
-
由 Magnus Damm 提交于
Refrain from running clk_disable() on clocks that have not been enabled. A typical case when this can happen is during Suspend-to-RAM for devices that have no driver associated with them. In such case the clock may be in default ACQUIRED state. Without this patch the sh7372 Mackerel board crashes in __clk_disable() during Suspend-to-RAM with: "Trying to disable clock 0xdeadbeef with 0 usecount" This happens for the CEU device which is added during boot. The test case has no CEU driver included in the kernel configuration. Needed for v3.2-rc1. Signed-off-by: NMagnus Damm <damm@opensource.se> Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
-
- 09 11月, 2011 1 次提交
-
-
由 Thomas Meyer 提交于
Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...)) [The semantic patch that makes this change is available in scripts/coccinelle/api/err_cast.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr/] Signed-off-by: NThomas Meyer <thomas@m3y3r.de> Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
-
- 05 11月, 2011 2 次提交
-
-
由 Alan Stern 提交于
Originally, the runtime PM core would send an idle notification whenever a suspend attempt failed. The idle callback routine could then schedule a delayed suspend for some time later. However this behavior was changed by commit f71648d7 (PM / Runtime: Remove idle notification after failing suspend). No notifications were sent, and there was no clear mechanism to retry failed suspends. This caused problems for the usbhid driver, because it fails autosuspend attempts as long as a key is being held down. Therefore this patch (as1492) adds a mechanism for retrying failed autosuspends. If the callback routine updates the last_busy field so that the next autosuspend expiration time is in the future, the autosuspend will automatically be rescheduled. Signed-off-by: NAlan Stern <stern@rowland.harvard.edu> Tested-by: NHenrik Rydberg <rydberg@euromail.se> Cc: <stable@kernel.org> Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
-
由 venu byravarasu 提交于
With delta type being int, its value is made zero for all values of now > 0x80000000. Hence fixing it. Signed-off-by: Nvenu byravarasu <vbyravarasu@nvidia.com> Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
-
- 01 11月, 2011 5 次提交
-
-
由 Paul Gortmaker 提交于
This file isn't using full modular functionality, and hence can be "downgraded" to just using export.h Reported-by: NStephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
-
由 Paul Gortmaker 提交于
This file is currently relying on <linux/module.h> sneaking it in through the implicit include paths from device.h. Once that is cleaned up, this will happen: In file included from drivers/base/init.c:12: drivers/base/base.h:34: error: field ‘bus_notifier’ has incomplete type make[3]: *** [drivers/base/init.o] Error 1 Fix it up in advance, so the cleanup can continue. Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
-
由 Paul Gortmaker 提交于
It was implicitly getting it before, but it will break compiles once we fix that. Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
-
由 Paul Gortmaker 提交于
Most of these files were implicitly getting EXPORT_SYMBOL via device.h which was including module.h, but that path will be broken soon. [ with input from Stephen Rothwell <sfr@canb.auug.org.au> ] Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
-
由 Paul Gortmaker 提交于
This file was getting <linux/module.h> via an implicit include path, but we want to crush those out of existence since they cost time during compiles of processing thousands of lines of headers for no reason. Give it the lightweight header that just contains the EXPORT_SYMBOL infrastructure. Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
-
- 22 10月, 2011 2 次提交
-
-
由 Jonghwan Choi 提交于
Since kfree() checks it its argument is not NULL, it is not necessary to duplicate this check in __pm_clk_remove(). [rjw: Added the changelog.] Signed-off-by: NJonghwan Choi <jhbird.choi@samsung.com> Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
-
由 Rafael J. Wysocki 提交于
The generic PM domains code in drivers/base/power/domain.c has to avoid powering off domains that provide power to wakeup devices during system suspend. Currently, however, this only works for wakeup devices directly belonging to the given domain and not for their children (or the children of their children and so on). Thus, if there's a wakeup device whose parent belongs to a power domain handled by the generic PM domains code, the domain will be powered off during system suspend preventing the device from signaling wakeup. To address this problem introduce a device flag, power.wakeup_path, that will be set during system suspend for all wakeup devices, their parents, the parents of their parents and so on. This way, all wakeup paths in the device hierarchy will be marked and the generic PM domains code will only need to avoid powering off domains containing devices whose power.wakeup_path is set. Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
-
- 20 10月, 2011 1 次提交
-
-
由 Eric W. Biederman 提交于
Signed-off-by: NEric W. Biederman <ebiederm@xmission.com> Acked-by: NGreg Kroah-Hartman <gregkh@suse.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 19 10月, 2011 2 次提交
-
-
由 Mel Gorman 提交于
(Resending as I am not seeing it in -next so maybe it got lost) mm: memory hotplug: Check if pages are correctly reserved on a per-section basis It is expected that memory being brought online is PageReserved similar to what happens when the page allocator is being brought up. Memory is onlined in "memory blocks" which consist of one or more sections. Unfortunately, the code that verifies PageReserved is currently assuming that the memmap backing all these pages is virtually contiguous which is only the case when CONFIG_SPARSEMEM_VMEMMAP is set. As a result, memory hot-add is failing on those configurations with the message; kernel: section number XXX page number 256 not reserved, was it already online? This patch updates the PageReserved check to lookup struct page once per section to guarantee the correct struct page is being checked. [Check pages within sections properly: rientjes@google.com] [original patch by: nfont@linux.vnet.ibm.com] Signed-off-by: NMel Gorman <mgorman@suse.de> Acked-by: NKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Tested-by: NNathan Fontenot <nfont@linux.vnet.ibm.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Greg Kroah-Hartman 提交于
This reverts commit 54f23eb7. Turns out this patch is wrong, another correct one will follow it. Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 17 10月, 2011 4 次提交
-
-
由 Alan Stern 提交于
This patch (as1485) documents a change to the kernel's default wakeup policy. Devices that forward wakeup requests between buses should be enabled for wakeup by default. Signed-off-by: NAlan Stern <stern@rowland.harvard.edu> Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
-
由 ShuoX Liu 提交于
Record S3 failure time about each reason and the latest two failed devices' names in S3 progress. We can check it through 'suspend_stats' entry in debugfs. The motivation of the patch: We are enabling power features on Medfield. Comparing with PC/notebook, a mobile enters/exits suspend-2-ram (we call it s3 on Medfield) far more frequently. If it can't enter suspend-2-ram in time, the power might be used up soon. We often find sometimes, a device suspend fails. Then, system retries s3 over and over again. As display is off, testers and developers don't know what happens. Some testers and developers complain they don't know if system tries suspend-2-ram, and what device fails to suspend. They need such info for a quick check. The patch adds suspend_stats under debugfs for users to check suspend to RAM statistics quickly. If not using this patch, we have other methods to get info about what device fails. One is to turn on CONFIG_PM_DEBUG, but users would get too much info and testers need recompile the system. In addition, dynamic debug is another good tool to dump debug info. But it still doesn't match our utilization scenario closely. 1) user need write a user space parser to process the syslog output; 2) Our testing scenario is we leave the mobile for at least hours. Then, check its status. No serial console available during the testing. One is because console would be suspended, and the other is serial console connecting with spi or HSU devices would consume power. These devices are powered off at suspend-2-ram. Signed-off-by: NShuoX Liu <shuox.liu@intel.com> Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
-
由 Ming Lei 提交于
If .runtime_suspend() returns -EAGAIN or -EBUSY, the device should still be in ACTIVE state, so it is not necessary to send an idle notification to its parent. If .runtime_suspend() returns other fatal failure, it doesn't make sense to send idle notification to its parent. Skip parent idle notification when failure is returned from .runtime_suspend() and update comments in rpm_suspend() to reflect that change. [rjw: Modified the subject and changelog slightly.] Signed-off-by: NMing Lei <ming.lei@canonical.com> Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
-
由 Ming Lei 提交于
This patch fix kerneldoc comments for rpm_suspend(): - 'Cancel a pending idle notification' should be put before, also should be changed to 'Cancel a pending idle notification, autosuspend or suspend'. - idle notification for the device after succeeding suspend has been removed, so update the comment accordingly. [rjw: Modified the subject and changelog slightly.] Signed-off-by: NMing Lei <ming.lei@canonical.com> Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
-
- 13 10月, 2011 1 次提交
-
-
由 Mark Brown 提交于
Support raw reads if all the registers being read are volatile, the cache will have no impact for tem. Support bulk reads either directly (if all the registers are volatile) or by falling back to iterating over single register reads otherwise. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 10 10月, 2011 5 次提交
-
-
由 Mark Brown 提交于
We only really need the defaults in order to cut down the number of registers we sync and to satisfy reads while the device is powered off but not all devices are going to need to do that (always on devices like PMICs being the prime example) so don't require those devices to supply a default. Instead only try to fall back to hardware defaults if the driver told us to. Devices using LZO won't be able to instantiate with this, that will require some updates in the LZO code to handle this case. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: NDimitris Papastamos <dp@opensource.wolfsonmicro.com>
-
由 Mark Brown 提交于
Simplify the check for registers set at their default value by avoiding picking a default value in the case where we don't have one. Instead we only compare the current value to the current value when we looked one up. This fixes the case where we don't have a default stored but the value was set to zero when that isn't the chip default. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: NDimitris Papastamos <dp@opensource.wolfsonmicro.com>
-
由 Mark Brown 提交于
Ensure that when we start up in cache only mode we can store defaults of zero, otherwise if the hardware is unavailable we won't be able to read. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: NDimitris Papastamos <dp@opensource.wolfsonmicro.com>
-
由 Mark Brown 提交于
As with the bulk reads we really should be able to make these play nicely with the cache but warn for now. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: NDimitris Papastamos <dp@opensource.wolfsonmicro.com>
-
由 Mark Brown 提交于
If a register isn't cached then let callers know that so they can fall back or error handle appropriately. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: NDimitris Papastamos <dp@opensource.wolfsonmicro.com>
-
- 09 10月, 2011 1 次提交
-
-
由 Mark Brown 提交于
Rather than open coding a binary search use the standard bsearch() using the comparison function we're already using for sort() on insert. This fixes a lockup I was observing due to iterating on min <= max rather than min < max when we fail to look up. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: NDimitris Papastamos <dp@opensource.wolfsonmicro.com>
-
- 05 10月, 2011 1 次提交
-
-
由 Rafael J. Wysocki 提交于
To read the current PM QoS value for a given device we need to make sure that the device's power.constraints object won't be removed while we're doing that. For this reason, put the operation under dev->power.lock and acquire the lock around the initialization and removal of power.constraints. Moreover, since we're using the value of power.constraints to determine whether or not the object is present, the power.constraints_state field isn't necessary any more and may be removed. However, dev_pm_qos_add_request() needs to check if the device is being removed from the system before allocating a new PM QoS constraints object for it, so make it use the power.power_state field of struct device for this purpose. Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
-
- 03 10月, 2011 2 次提交
-
-
由 Dimitris Papastamos 提交于
Signed-off-by: NDimitris Papastamos <dp@opensource.wolfsonmicro.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Dimitris Papastamos 提交于
Since there are more lookups than insertions in a typical scenario, optimize the linear search into a binary search. For this to work, we need to keep reg_defaults sorted upon insertions, for now be lazy and use sort(). Signed-off-by: NDimitris Papastamos <dp@opensource.wolfsonmicro.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 01 10月, 2011 1 次提交
-
-
由 MyungJoo Ham 提交于
The patch enables to register notifier_block for an OPP-device in order to get notified for any changes in the availability of OPPs of the device. For example, if a new OPP is inserted or enable/disable status of an OPP is changed, the notifier is executed. This enables the usage of opp_add, opp_enable, and opp_disable to directly take effect with any connected entities such as cpufreq or devfreq. Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com> Reviewed-by: NMike Turquette <mturquette@ti.com> Reviewed-by: NKevin Hilman <khilman@ti.com> Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
-
- 30 9月, 2011 4 次提交
-
-
由 Dimitris Papastamos 提交于
Signed-off-by: NDimitris Papastamos <dp@opensource.wolfsonmicro.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Dimitris Papastamos 提交于
Ensure we've got a function so users can enable/disable the cache bypass option. Signed-off-by: NDimitris Papastamos <dp@opensource.wolfsonmicro.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Dimitris Papastamos 提交于
Signed-off-by: NDimitris Papastamos <dp@opensource.wolfsonmicro.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Dimitris Papastamos 提交于
Signed-off-by: NDimitris Papastamos <dp@opensource.wolfsonmicro.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-