01 Aug, 2012

1 commit

  • Pull battery updates from Anton Vorontsov:
    "The tag contains just a few battery-related changes for v3.6. It's is
    all pretty straightforward, except one thing.

    One of our patches added thermal support for power supply class, but
    thermal/ subsystem changed under our feet. We (well, Stephen, that
    is) caught the issue and it was decided[1] that I'd just delay the
    battery pull request, and then will fix it up by merging upstream back
    into battery tree at the specific commit.

    That's not all though: another[2] small fixup for thermal subsystem
    was needed to get rid of a warning in power supply subsystem (the
    warning was not drivers/power's "fault", the thermal registration
    function just needed a proper const annotation, which is also done by
    a small commit on top of the merge.

    So, to sum this up:
    - The 'master' branch of the battery tree was in the -next tree for
    weeks, was never rebased, altered etc. It should be all OK;
    - Although, for-v3.6 tag contains the 'master' branch + merge + the
    warning fix.

    [1] http://lkml.org/lkml/2012/6/19/23
    [2] http://lkml.org/lkml/2012/6/18/28"

    * tag 'for-v3.6' of git://git.infradead.org/battery-2.6: (23 commits)
    thermal: Constify 'type' argument for the registration routine
    olpc-battery: update CHARGE_FULL_DESIGN property for BYD LiFe batteries
    olpc-battery: Add VOLTAGE_MAX_DESIGN property
    charger-manager: Fix build break related to EXTCON
    lp8727_charger: Move header file into platform_data directory
    power_supply: Add min/max alert properties for CAPACITY, TEMP, TEMP_AMBIENT
    bq27x00_battery: Add support for BQ27425 chip
    charger-manager: Set current limit of regulator for over current protection
    charger-manager: Use EXTCON Subsystem to detect charger cables for charging
    test_power: Add VOLTAGE_NOW and BATTERY_TEMP properties
    test_power: Add support for USB AC source
    gpio-charger: Use cansleep version of gpio_set_value
    bq27x00_battery: Add support for power average and health properties
    sbs-battery: Don't trigger false supply_changed event
    twl4030_charger: Allow charger to control the regulator that feeds it
    twl4030_charger: Add backup-battery charging
    twl4030_charger: Fix some typos
    max17042_battery: Support CHARGE_COUNTER power supply attribute
    smb347-charger: Add constant charge and current properties
    power_supply: Add constant charge_current and charge_voltage properties
    ...

    Linus Torvalds
     

19 Jul, 2012

1 commit


14 Jul, 2012

1 commit

  • Minimum and maximum alerts on power supply properties will help or allow
    the user space to "proactively" create policies like connect/disconnect
    charger or stop/start the user apps based on capacity or temperature
    parameters.

    These parameters can be used to avoid unnecessary polling from user space
    and even from kernel space if the underlying HW can support INT triggers
    (ex: max17042/47).

    This patch adds the following power supply alert type properties:

    CAPACITY_ALERT_MIN
    CAPACITY_ALERT_MAX
    TEMP_ALERT_MIN
    TEMP_ALERT_MAX
    TEMP_AMBIENT_ALERT_MIN
    TEMP_AMBIENT_ALERT_MAX

    Signed-off-by: Ramakrishna Pallala
    Signed-off-by: Anton Vorontsov

    Ramakrishna Pallala
     

04 Jul, 2012

1 commit


01 Jul, 2012

1 commit


20 Jun, 2012

1 commit

  • Constant Charge Current(CC) is charging parameter which limit the
    maximum current which can be pumped into the battery during charge cycle.

    Constant Charge Voltage(CV) is also charging parameter which limit the
    maximum voltage that battery can reach during charge cycle.

    It is very common practice that at low or high temperatures we
    do not charge the batteries upto it's fullest charge voltage
    to avoid battery and user safety issues.

    These sysfs properties will be useful for debug and to implement
    certain user space policies like "Charging limited due to OverTemp".

    Signed-off-by: Ramakrishna Pallala
    Signed-off-by: Anton Vorontsov

    Ramakrishna Pallala
     

01 Jun, 2012

1 commit

  • Pull battery updates from Anton Vorontsov:
    "A bunch of fixes for v3.5, nothing extraordinary."

    * tag 'for-v3.5' of git://git.infradead.org/battery-2.6: (27 commits)
    smb347-charger: Include missing
    smb347-charger: Clean up battery attributes
    max17042_battery: Add support for max17047/50 chip
    sbs-battery.c: Capacity attr = remaining relative capacity
    isp1704_charger: Use after free on probe error
    ds2781_battery: Use DS2781_PARAM_EEPROM_SIZE and DS2781_USER_EEPROM_SIZE
    power_supply: Fix a typo in BATTERY_DS2781 Kconfig entry
    charger-manager: Provide cm_notify_event function for in-kernel use
    charger-manager: Poll battery health in normal state
    smb347-charger: Convert to regmap API
    smb347-charger: Move IRQ enabling to the end of probe
    smb347-charger: Rename few functions to match better what they are doing
    smb347-charger: Convert to use module_i2c_driver()
    smb347_charger: Cleanup power supply registration code in probe
    ab8500: Clean up probe routines
    ab8500_fg: Harden platform data check
    ab8500_btemp: Harden platform data check
    ab8500_charger: Harden platform data check
    MAINTAINERS: Fix 'F' entry for the power supply class
    max17042_battery: Handle irq request failure case
    ...

    Linus Torvalds
     

24 May, 2012

1 commit

  • Pull power management updates from Rafael Wysocki:

    - Implementation of opportunistic suspend (autosleep) and user space
    interface for manipulating wakeup sources.

    - Hibernate updates from Bojan Smojver and Minho Ban.

    - Updates of the runtime PM core and generic PM domains framework
    related to PM QoS.

    - Assorted fixes.

    * tag 'pm-for-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (25 commits)
    epoll: Fix user space breakage related to EPOLLWAKEUP
    PM / Domains: Make it possible to add devices to inactive domains
    PM / Hibernate: Use get_gendisk to verify partition if resume_file is integer format
    PM / Domains: Fix computation of maximum domain off time
    PM / Domains: Fix link checking when add subdomain
    PM / Sleep: User space wakeup sources garbage collector Kconfig option
    PM / Sleep: Make the limit of user space wakeup sources configurable
    PM / Documentation: suspend-and-cpuhotplug.txt: Fix typo
    PM / Domains: Cache device stop and domain power off governor results, v3
    PM / Domains: Make device removal more straightforward
    PM / Sleep: Fix a mistake in a conditional in autosleep_store()
    epoll: Add a flag, EPOLLWAKEUP, to prevent suspend while epoll events are ready
    PM / QoS: Create device constraints objects on notifier registration
    PM / Runtime: Remove device fields related to suspend time, v2
    PM / Domains: Rework default domain power off governor function, v2
    PM / Domains: Rework default device stop governor function, v2
    PM / Sleep: Add user space interface for manipulating wakeup sources, v3
    PM / Sleep: Add "prevent autosleep time" statistics to wakeup sources
    PM / Sleep: Implement opportunistic sleep, v2
    PM / Sleep: Add wakeup_source_activate and wakeup_source_deactivate tracepoints
    ...

    Linus Torvalds
     

12 May, 2012

1 commit


06 May, 2012

3 commits


05 May, 2012

1 commit


30 Apr, 2012

1 commit

  • The file Documentation/power/freezing-of-tasks.txt was still referencing
    the TIF_FREEZE flag, that was removed by the commit
    d88e4cb67197d007fb778d62fe17360e970d5bfa(freezer: remove now unused
    TIF_FREEZE).

    This patch removes all the references of TIF_FREEZE that were left
    behind.

    Signed-off-by: Marcos Paulo de Souza
    Signed-off-by: Srivatsa S. Bhat
    Signed-off-by: Rafael J. Wysocki

    Marcos Paulo de Souza
     

13 Apr, 2012

1 commit


10 Feb, 2012

1 commit

  • The way the different freeze/thaw functions encapsulate each other are quite
    lovely from a design point of view. And as a side-effect, the way in which
    they are invoked (cleaning up on failure for example) differs significantly
    from how usual functions are dealt with. This is because of the underlying
    semantics that govern the freezing and thawing of various tasks.

    This subtle aspect that differentiates these functions from the rest, is
    worth documenting.

    Many thanks to Tejun Heo for providing enlightenment on this topic.

    Signed-off-by: Srivatsa S. Bhat
    Signed-off-by: Rafael J. Wysocki

    Srivatsa S. Bhat
     

30 Jan, 2012

1 commit

  • The current device suspend/resume phases during system-wide power
    transitions appear to be insufficient for some platforms that want
    to use the same callback routines for saving device states and
    related operations during runtime suspend/resume as well as during
    system suspend/resume. In principle, they could point their
    .suspend_noirq() and .resume_noirq() to the same callback routines
    as their .runtime_suspend() and .runtime_resume(), respectively,
    but at least some of them require device interrupts to be enabled
    while the code in those routines is running.

    It also makes sense to have device suspend-resume callbacks that will
    be executed with runtime PM disabled and with device interrupts
    enabled in case someone needs to run some special code in that
    context during system-wide power transitions.

    Apart from this, .suspend_noirq() and .resume_noirq() were introduced
    as a workaround for drivers using shared interrupts and failing to
    prevent their interrupt handlers from accessing suspended hardware.
    It appears to be better not to use them for other porposes, or we may
    have to deal with some serious confusion (which seems to be happening
    already).

    For the above reasons, introduce new device suspend/resume phases,
    "late suspend" and "early resume" (and analogously for hibernation)
    whose callback will be executed with runtime PM disabled and with
    device interrupts enabled and whose callback pointers generally may
    point to runtime suspend/resume routines.

    Signed-off-by: Rafael J. Wysocki
    Reviewed-by: Mark Brown
    Reviewed-by: Kevin Hilman

    Rafael J. Wysocki
     

20 Jan, 2012

2 commits


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
    ...

    Linus Torvalds
     

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
    ...

    Linus Torvalds
     

04 Jan, 2012

3 commits


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

    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

    Rafael J. Wysocki
     

09 Dec, 2011

1 commit


06 Dec, 2011

1 commit


29 Nov, 2011

4 commits


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

    Tejun Heo
     
  • 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

    Tejun Heo
     

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

    Alan Stern
     
  • 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

    Srivatsa S. Bhat
     

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
    ...

    Linus Torvalds
     

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
    ...

    Linus Torvalds
     

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

    Srivatsa S. Bhat
     

17 Oct, 2011

1 commit

  • 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

    Rafael J. Wysocki