12 Jan, 2012
1 commit
-
* git://git.infradead.org/battery-2.6: (68 commits)
power_supply: Mark da9052 driver as broken
power_supply: Drop usage of nowarn variant of sysfs_create_link()
s3c_adc_battery: Average over more than one adc sample
power_supply: Add DA9052 battery driver
isp1704_charger: Fix missing check
jz4740-battery: Fix signedness bug
power_supply: Assume mains power by default
sbs-battery: Fix devicetree match table
ARM: rx51: Add bq27200 i2c board info
sbs-battery: Change power supply name
devicetree-bindings: Propagate bq20z75->sbs rename to dt bindings
devicetree-bindings: Add vendor entry for Smart Battery Systems
sbs-battery: Rename internals to new name
bq20z75: Rename to sbs-battery
wm97xx_battery: Use DEFINE_MUTEX() for work_lock
max8997_charger: Remove duplicate module.h
lp8727_charger: Some minor fixes for the header
lp8727_charger: Add header file
power_supply: Convert drivers/power/* to use module_platform_driver()
power_supply: Add "unknown" in power supply type
...
11 Jan, 2012
1 commit
-
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (40 commits)
regulator: set constraints.apply_uV to 0 in of_get_fixed_voltage_config
regulator: max8925: fix enabled/disabled judgement mistake
regulator: add regulator_bulk_force_disable function
regulator: pass regulator_register of_node in fixed voltage driver
regulator: add regulator_force_disable() definition for !CONFIG_REGULATOR
regulator: Enable supply regulator if child rail is enabled.
regulator: mc13892: Convert to devm_kzalloc()
regulator: mc13783: Convert to devm_kzalloc()
regulator: Fix checking return value of create_regulator
regulator: Fix the error handling if create_regulator fails
regulator: Export regulator_is_supported_voltage()
regulator: mc13892: add device tree probe support
regulator: mc13892: remove the unnecessary prefix from regulator name
regulator: Convert wm831x regulator drivers to devm_kzalloc()
regulator: da9052: Staticize non-exported symbols
regulator: Replace kzalloc with devm_kzalloc and if-else with a switch-case for da9052-regulator
regulator: Update da9052-regulator for DT changes
regulator: DA9052/53 Regulator support
regulator: pass device_node to of_get_regulator_init_data()
regulator: If a single voltage is set with device tree then set apply_uV
...
04 Jan, 2012
3 commits
-
Charger Manager provides power-supply-class aggregating
information from multiple chargers and a fuel-gauge.Signed-off-by: Donggeun Kim
Signed-off-by: MyungJoo Ham
Signed-off-by: Kyungmin Park
Signed-off-by: Anton Vorontsov -
Because battery health monitoring should be done even when suspended,
it needs to wake up and suspend periodically. Thus, userspace battery
monitoring may incur too much overhead; every device and task is woken
up periodically. Charger Manager uses suspend-again to provide
in-suspend monitoring.This patch allows to monitor battery health in-suspend state.
Signed-off-by: Donggeun Kim
Signed-off-by: MyungJoo Ham
Signed-off-by: Kyungmin Park
Signed-off-by: Anton Vorontsov
22 Dec, 2011
2 commits
-
Make the PM core execute driver PM callbacks directly if the
corresponding subsystem callbacks are not present.There are three reasons for doing that. First, it reflects the
behavior of drivers/base/dd.c:really_probe() that runs the driver's
.probe() callback directly if the bus type's one is not defined, so
this change will remove one arbitrary difference between the PM core
and the remaining parts of the driver core. Second, it will allow
some subsystems, whose PM callbacks don't do anything except for
executing driver callbacks, to be simplified quite a bit by removing
those "forward-only" callbacks. Finally, it will allow us to remove
one level of indirection in the system suspend and resume code paths
where it is not necessary, which is going to lead to less debug noise
with initcall_debug passed in the kernel command line (messages won't
be printed for driverless devices whose subsystems don't provide
PM callbacks among other things).Signed-off-by: Rafael J. Wysocki
-
* master: (848 commits)
SELinux: Fix RCU deref check warning in sel_netport_insert()
binary_sysctl(): fix memory leak
mm/vmalloc.c: remove static declaration of va from __get_vm_area_node
ipmi_watchdog: restore settings when BMC reset
oom: fix integer overflow of points in oom_badness
memcg: keep root group unchanged if creation fails
nilfs2: potential integer overflow in nilfs_ioctl_clean_segments()
nilfs2: unbreak compat ioctl
cpusets: stall when updating mems_allowed for mempolicy or disjoint nodemask
evm: prevent racing during tfm allocation
evm: key must be set once during initialization
mmc: vub300: fix type of firmware_rom_wait_states module parameter
Revert "mmc: enable runtime PM by default"
mmc: sdhci: remove "state" argument from sdhci_suspend_host
x86, dumpstack: Fix code bytes breakage due to missing KERN_CONT
IB/qib: Correct sense on freectxts increment and decrement
RDMA/cma: Verify private data length
cgroups: fix a css_set not found bug in cgroup_attach_proc
oprofile: Fix uninitialized memory access when writing to writing to oprofilefs
Revert "xen/pv-on-hvm kexec: add xs_reset_watches to shutdown watches from old kernel"
...Conflicts:
kernel/cgroup_freezer.c
09 Dec, 2011
1 commit
-
Update the documentation to explain the perils of directly using
mutex_[un]lock(&pm_mutex) and recommend the usage of the safe
APIs [un]lock_system_sleep() instead.Signed-off-by: Srivatsa S. Bhat
Signed-off-by: Rafael J. Wysocki
06 Dec, 2011
1 commit
-
The commit 2c043bcbf287 ("regulator: pass additional of_node to
regulator_register()") added an additional parameter to the
regulator_register() API.
Update the Documentation accordingly to reflect the change
in the function signature.Reported-by: Thomas Abraham
Signed-off-by: Rajendra Nayak
Signed-off-by: Mark Brown
29 Nov, 2011
4 commits
-
The system wakeup section of Documentation/power/devices.txt is
outdated, so make it agree with the current code.Signed-off-by: Rafael J. Wysocki
-
The runtime PM core code behavior related to the power.irq_safe
device flag has changed recently and the documentation should be
modified to reflect it.Signed-off-by: Rafael J. Wysocki
-
The documentation file Documentation/power/devices.txt contains some
information that isn't correct any more due to code modifications
made after that file had been created (or updated last time). Fix
this.Signed-off-by: Rafael J. Wysocki
-
The current power management documentation in Documentation/power/
either doesn't cover PM domains at all, or gives inaccurate
information about them, so update the relevant files in there to
follow the code.Signed-off-by: Rafael J. Wysocki
22 Nov, 2011
2 commits
-
There is no reason to export two functions for entering the
refrigerator. Calling refrigerator() instead of try_to_freeze()
doesn't save anything noticeable or removes any race condition.* Rename refrigerator() to __refrigerator() and make it return bool
indicating whether it scheduled out for freezing.* Update try_to_freeze() to return bool and relay the return value of
__refrigerator() if freezing().* Convert all refrigerator() users to try_to_freeze().
* Update documentation accordingly.
* While at it, add might_sleep() to try_to_freeze().
Signed-off-by: Tejun Heo
Cc: Samuel Ortiz
Cc: Chris Mason
Cc: "Theodore Ts'o"
Cc: Steven Whitehouse
Cc: Andrew Morton
Cc: Jan Kara
Cc: KONISHI Ryusuke
Cc: Christoph Hellwig -
Some drivers set PF_NOFREEZE in their kthread functions which is
completely unnecessary and racy - some part of freezer code doesn't
consider cases where PF_NOFREEZE is set asynchronous to freezer
operations.In general, there's no reason to allow setting PF_NOFREEZE explicitly.
Remove them and change the documentation to note that setting
PF_NOFREEZE directly isn't allowed.-v2: Dropped change to twl4030-irq.c as it no longer uses PF_NOFREEZE.
Signed-off-by: Tejun Heo
Acked-by: "Gustavo F. Padovan"
Acked-by: Samuel Ortiz
Cc: Marcel Holtmann
Cc: wwang
05 Nov, 2011
2 commits
-
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
f71648d73c1650b8b4aceb3856bebbde6daa3b86 (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: Alan Stern
Tested-by: Henrik Rydberg
Cc:
Signed-off-by: Rafael J. Wysocki -
This patch:
* Substitutes some obsolete references to kernel/power/process.c by
kernel/freezer.c.
* Mentions kernel/freezer.c as being part of the "freezer" code along
with the rest of the files.
* Fixes a trivial typo.Signed-off-by: Srivatsa S. Bhat
Signed-off-by: Rafael J. Wysocki
02 Nov, 2011
1 commit
-
* 'for-linus' of git://opensource.wolfsonmicro.com/regulator: (22 commits)
regulator: Constify constraints name
regulator: Fix possible nullpointer dereference in regulator_enable()
regulator: gpio-regulator add dependency on GENERIC_GPIO
regulator: Add module.h include to gpio-regulator
regulator: Add driver for gpio-controlled regulators
regulator: remove duplicate REG_CTRL2 defines in tps65023
regulator: Clarify documentation for regulator-regulator supplies
regulator: Fix some bitrot in the machine driver documentation
regulator: tps65023: Added support for the similiar TPS65020 chip
regulator: tps65023: Setting correct core regulator for tps65021
regulator: tps65023: Set missing bit for update core-voltage
regulator: tps65023: Fixes i2c configuration issues
regulator: Add debugfs file showing the supply map table
regulator: tps6586x: add SMx slew rate setting
regulator: tps65023: Fixes i2c configuration issues
regulator: tps6507x: Remove num_voltages array
regulator: max8952: removed unused mutex.
regulator: fix regulator/consumer.h kernel-doc warning
regulator: Ensure enough enable time for max8649
regulator: 88pm8607: Fix off-by-one value range checking in the case of no id is matched
...
25 Oct, 2011
1 commit
-
* 'pm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (63 commits)
PM / Clocks: Remove redundant NULL checks before kfree()
PM / Documentation: Update docs about suspend and CPU hotplug
ACPI / PM: Add Sony VGN-FW21E to nonvs blacklist.
ARM: mach-shmobile: sh7372 A4R support (v4)
ARM: mach-shmobile: sh7372 A3SP support (v4)
PM / Sleep: Mark devices involved in wakeup signaling during suspend
PM / Hibernate: Improve performance of LZO/plain hibernation, checksum image
PM / Hibernate: Do not initialize static and extern variables to 0
PM / Freezer: Make fake_signal_wake_up() wake TASK_KILLABLE tasks too
PM / Hibernate: Add resumedelay kernel param in addition to resumewait
MAINTAINERS: Update linux-pm list address
PM / ACPI: Blacklist Vaio VGN-FW520F machine known to require acpi_sleep=nonvs
PM / ACPI: Blacklist Sony Vaio known to require acpi_sleep=nonvs
PM / Hibernate: Add resumewait param to support MMC-like devices as resume file
PM / Hibernate: Fix typo in a kerneldoc comment
PM / Hibernate: Freeze kernel threads after preallocating memory
PM: Update the policy on default wakeup settings
PM / VT: Cleanup #if defined uglyness and fix compile error
PM / Suspend: Off by one in pm_suspend()
PM / Hibernate: Include storage keys in hibernation image on s390
...
22 Oct, 2011
1 commit
-
Update the documentation about the interaction between the suspend (S3) call
path and the CPU hotplug infrastructure.
This patch focusses only on the activities of the freezer, cpu hotplug and
the notifications involved. It outlines how regular CPU hotplug differs from
the way it is invoked during suspend and also tries to explain the locking
involved. In addition to that, it discusses the issue of microcode update
during CPU hotplug operations.Signed-off-by: Srivatsa S. Bhat
Signed-off-by: Rafael J. Wysocki
17 Oct, 2011
4 commits
-
There is a problem with the current ordering of hibernate code which
leads to deadlocks in some filesystems' memory shrinkers. Namely,
some filesystems use freezable kernel threads that are inactive when
the hibernate memory preallocation is carried out. Those same
filesystems use memory shrinkers that may be triggered by the
hibernate memory preallocation. If those memory shrinkers wait for
the frozen kernel threads, the hibernate process deadlocks (this
happens with XFS, for one example).Apparently, it is not technically viable to redesign the filesystems
in question to avoid the situation described above, so the only
possible solution of this issue is to defer the freezing of kernel
threads until the hibernate memory preallocation is done, which is
implemented by this change.Unfortunately, this requires the memory preallocation to be done
before the "prepare" stage of device freeze, so after this change the
only way drivers can allocate additional memory for their freeze
routines in a clean way is to use PM notifiers.Reported-by: Christoph
Signed-off-by: Rafael J. Wysocki -
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: Alan Stern
Signed-off-by: Rafael J. Wysocki -
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: ShuoX Liu
Signed-off-by: Rafael J. Wysocki -
* pm-runtime:
PM / Runtime: Handle .runtime_suspend() failure correctly
PM / Runtime: Fix kerneldoc comment for rpm_suspend()
PM / Runtime: Update document about callbacks
11 Oct, 2011
1 commit
-
Support for device power domains has been introduced in
commit 9659cc0678b954f187290c6e8b247a673c5d37e1 (PM: Make
system-wide PM and runtime PM treat subsystems consistently),
also power domain callbacks will take precedence over subsystem ones
from commit 4d27e9dcff00a6425d779b065ec8892e4f391661(PM: Make
power domain callbacks take precedence over subsystem ones).So update part of "Device Runtime PM Callbacks" in
Documentation/power/runtime_pm.txt.Signed-off-by: Ming Lei
Signed-off-by: Rafael J. Wysocki
08 Oct, 2011
2 commits
-
* pm-qos:
PM / QoS: Update Documentation for the pm_qos and dev_pm_qos frameworks
PM / QoS: Add function dev_pm_qos_read_value() (v3)
PM QoS: Add global notification mechanism for device constraints
PM QoS: Implement per-device PM QoS constraints
PM QoS: Generalize and export constraints management code
PM QoS: Reorganize data structs
PM QoS: Code reorganization
PM QoS: Minor clean-ups
PM QoS: Move and rename the implementation files -
* pm-runtime:
PM / Tracing: build rpm-traces.c only if CONFIG_PM_RUNTIME is set
PM / Runtime: Replace dev_dbg() with trace_rpm_*()
PM / Runtime: Introduce trace points for tracing rpm_* functions
PM / Runtime: Don't run callbacks under lock for power.irq_safe set
USB: Add wakeup info to debugging messages
PM / Runtime: pm_runtime_idle() can be called in atomic context
PM / Runtime: Add macro to test for runtime PM events
PM / Runtime: Add might_sleep() to runtime PM functions
07 Oct, 2011
2 commits
-
The mechanism used for connecting regulators together when one regulator
supplies another wasn't clear as the names being used weren't really tied
together well.Reported-by: Philip Rakity
Signed-off-by: Mark Brown -
The documentation for the machine driver was rather badly bitrotted,
using pointers to struct device rather than dev_name() to hook up the
consumers. Update to use dev_name().Reported-by: Philip Rakity
Signed-off-by: Mark Brown
05 Oct, 2011
1 commit
-
Update the documentation for the recently updated pm_qos API, kernel
and user space. Add documentation for the per-device PM QoS
(dev_pm_qos) framework API.Signed-off-by: Jean Pihet
Signed-off-by: Rafael J. Wysocki
28 Sep, 2011
1 commit
-
There are numerous broken references to Documentation files (in other
Documentation files, in comments, etc.). These broken references are
caused by typo's in the references, and by renames or removals of the
Documentation files. Some broken references are simply odd.Fix these broken references, sometimes by dropping the irrelevant text
they were part of.Signed-off-by: Paul Bolle
Signed-off-by: Jiri Kosina
22 Sep, 2011
1 commit
-
Add to pm_runtime_idle the list of functions that can be called
in atomic context if pm_runtime_irq_safe() has been called for the
device.Signed-off-by: Ming Lei
Signed-off-by: Rafael J. Wysocki
25 Aug, 2011
1 commit
-
The description of pm_runtime_irq_safe() has to be updated to follow
the code after commit 02b2677 (PM / Runtime: Allow _put_sync() from
interrupts-disabled context).Signed-off-by: Rafael J. Wysocki
Acked-by: Kevin Hilman
14 Aug, 2011
1 commit
-
Some of the entry points to pm runtime are not safe to
call in atomic context unless pm_runtime_irq_safe() has
been called. Inspecting the code, it is not immediately
obvious that the functions sleep at all, as they run
inside a spin_lock_irqsave, but under some conditions
they can drop the lock and turn on irqs.If a driver incorrectly calls the pm_runtime apis, it can
cause sleeping and irq processing when it expects to stay
in atomic context.Add might_sleep_if to the majority of the __pm_runtime_* entry points
to enforce correct usage.Add pm_runtime_put_sync_autosuspend to the list of
functions that can be called in atomic context.Signed-off-by: Colin Cross
Reviewed-by: Kevin Hilman
Signed-off-by: Rafael J. Wysocki
06 Aug, 2011
1 commit
-
Currently the use of pm_runtime_put_sync() is not safe from
interrupts-disabled context because rpm_idle() will release the
spinlock and enable interrupts for the idle callbacks. This enables
interrupts during a time where interrupts were expected to be
disabled, and can have strange side effects on drivers that expected
interrupts to be disabled.This is not a bug since the documentation clearly states that only
_put_sync_suspend() is safe in IRQ-safe mode.However, pm_runtime_put_sync() could be made safe when in IRQ-safe
mode by releasing the spinlock but not re-enabling interrupts, which
is what this patch aims to do.Problem was found when using some buggy drivers that set
pm_runtime_irq_safe() and used _put_sync() in interrupts-disabled
context.Reported-by: Colin Cross
Tested-by: Nishanth Menon
Signed-off-by: Kevin Hilman
Signed-off-by: Rafael J. Wysocki
16 Jul, 2011
3 commits
-
* pm-runtime:
OMAP: PM: disable idle on suspend for GPIO and UART
OMAP: PM: omap_device: add API to disable idle on suspend
OMAP: PM: omap_device: add system PM methods for PM domain handling
OMAP: PM: omap_device: conditionally use PM domain runtime helpers
PM / Runtime: Add new helper function: pm_runtime_status_suspended()
PM / Runtime: Consistent utilization of deferred_resume
PM / Runtime: Prevent runtime_resume from racing with probe
PM / Runtime: Replace "run-time" with "runtime" in documentation
PM / Runtime: Improve documentation of enable, disable and barrier
PM: Limit race conditions between runtime PM and system sleep (v2)
PCI / PM: Detect early wakeup in pci_pm_prepare()
PM / Runtime: Return special error code if runtime PM is disabled
PM / Runtime: Update documentation of interactions with system sleep -
* pm-domains: (33 commits)
ARM / shmobile: Return -EBUSY from A4LC power off if A3RV is active
PM / Domains: Take .power_off() error code into account
ARM / shmobile: Use genpd_queue_power_off_work()
ARM / shmobile: Use pm_genpd_poweroff_unused()
PM / Domains: Introduce function to power off all unused PM domains
PM / Domains: Queue up power off work only if it is not pending
PM / Domains: Improve handling of wakeup devices during system suspend
PM / Domains: Do not restore all devices on power off error
PM / Domains: Allow callbacks to execute all runtime PM helpers
PM / Domains: Do not execute device callbacks under locks
PM / Domains: Make failing pm_genpd_prepare() clean up properly
PM / Domains: Set device state to "active" during system resume
ARM: mach-shmobile: sh7372 A3RV requires A4LC
PM / Domains: Export pm_genpd_poweron() in header
ARM: mach-shmobile: sh7372 late pm domain off
ARM: mach-shmobile: Runtime PM late init callback
ARM: mach-shmobile: sh7372 D4 support
ARM: mach-shmobile: sh7372 A4MP support
ARM: mach-shmobile: sh7372: make sure that fsi is peripheral of spu2
ARM: mach-shmobile: sh7372 A3SG support
... -
cpufreq table allocated by opp_init_cpufreq_table is better
freed by OPP layer itself. This allows future modifications to
the table handling to be transparent to the users.Signed-off-by: Nishanth Menon
Acked-by: Kevin Hilman
Signed-off-by: Rafael J. Wysocki
12 Jul, 2011
1 commit
-
This boolean function simply returns whether or not the runtime status
of the device is 'suspended'. Unlike pm_runtime_suspended(), this
function returns the runtime status whether or not runtime PM for the
device has been disabled or not.Also add entry to Documentation/power/runtime.txt
Signed-off-by: Kevin Hilman
Signed-off-by: Rafael J. Wysocki
06 Jul, 2011
1 commit
-
The runtime PM documentation and kerneldoc comments sometimes spell
"runtime" with a dash (i.e. "run-time"). Replace all of those
instances with "runtime" to make the naming consistent.Signed-off-by: Rafael J. Wysocki