27 Aug, 2013

2 commits


28 Jun, 2013

1 commit

  • * pm-assorted:
    PM / QoS: Add pm_qos and dev_pm_qos to events-power.txt
    PM / QoS: Add dev_pm_qos_request tracepoints
    PM / QoS: Add pm_qos_request tracepoints
    PM / QoS: Add pm_qos_update_target/flags tracepoints
    PM / QoS: Update Documentation/power/pm_qos_interface.txt
    PM / Sleep: Print last wakeup source on failed wakeup_count write
    PM / QoS: correct the valid range of pm_qos_class
    PM / wakeup: Adjust messaging for wake events during suspend
    PM / Runtime: Update .runtime_idle() callback documentation
    PM / Runtime: Rework the "runtime idle" helper routine
    PM / Hibernate: print physical addresses consistently with other parts of kernel

    Rafael J. Wysocki
     

23 Jun, 2013

1 commit


21 Jun, 2013

1 commit


04 Jun, 2013

2 commits

  • Runtime PM documentation needs to be updated after the previous
    change of the rpm_idle() behavior, so modify it as appropriate.

    [rjw: Subject and changelog]
    Signed-off-by: Alan Stern
    Signed-off-by: Rafael J. Wysocki

    Alan Stern
     
  • The "runtime idle" helper routine, rpm_idle(), currently ignores
    return values from .runtime_idle() callbacks executed by it.
    However, it turns out that many subsystems use
    pm_generic_runtime_idle() which checks the return value of the
    driver's callback and executes pm_runtime_suspend() for the device
    unless that value is not 0. If that logic is moved to rpm_idle()
    instead, pm_generic_runtime_idle() can be dropped and its users
    will not need any .runtime_idle() callbacks any more.

    Moreover, the PCI, SCSI, and SATA subsystems' .runtime_idle()
    routines, pci_pm_runtime_idle(), scsi_runtime_idle(), and
    ata_port_runtime_idle(), respectively, as well as a few drivers'
    ones may be simplified if rpm_idle() calls rpm_suspend() after 0 has
    been returned by the .runtime_idle() callback executed by it.

    To reduce overall code bloat, make the changes described above.

    Tested-by: Mika Westerberg
    Tested-by: Kevin Hilman
    Signed-off-by: Rafael J. Wysocki
    Acked-by: Kevin Hilman
    Reviewed-by: Ulf Hansson
    Acked-by: Alan Stern

    Rafael J. Wysocki
     

14 May, 2013

3 commits


04 Mar, 2013

1 commit

  • Make Operating Performance Points (OPP) library introductory chapter
    a little more reader-friendly. Split the chapter into two sections,
    highlight the definition with an example and minor rewording to be
    verbose.

    Reported-by: Linus Torvalds
    Signed-off-by: Nishanth Menon
    Reviewed-by: Randy Dunlap
    Signed-off-by: Rafael J. Wysocki

    Nishanth Menon
     

10 Feb, 2013

1 commit

  • At present, the value of timeout for freezing is 20s, which is
    meaningless in case that one thread is frozen with mutex locked
    and another thread is trying to lock the mutex, as this time of
    freezing will fail unavoidably.
    And if there is no new wakeup event registered, the system will
    waste at most 20s for such meaningless trying of freezing.

    With this patch, the value of timeout can be configured to smaller
    value, so such meaningless trying of freezing will be aborted in
    earlier time, and later freezing can be also triggered in earlier
    time. And more power will be saved.
    In normal case on mobile phone, it costs real little time to freeze
    processes. On some platform, it only costs about 20ms to freeze
    user space processes and 10ms to freeze kernel freezable threads.

    Signed-off-by: Liu Chuansheng
    Signed-off-by: Li Fei
    Signed-off-by: Rafael J. Wysocki

    Li Fei
     

26 Jan, 2013

1 commit

  • This boolean function simply returns whether or not the runtime
    status of the device is 'active'. The typical scenario is driver
    calls pm_runtime_get firstly, then check pm_runtime_active in
    atomic environment.

    Also add entry to Documentation/power/runtime.txt

    Signed-off-by: Yanmin Zhang
    Signed-off-by: ShuoX Liu
    Signed-off-by: Rafael J. Wysocki

    ShuoX Liu
     

06 Jan, 2013

1 commit

  • Currently, the PM core disables runtime PM for all devices right
    after executing subsystem/driver .suspend() callbacks for them
    and re-enables it right before executing subsystem/driver .resume()
    callbacks for them. This may lead to problems when there are
    two devices such that the .suspend() callback executed for one of
    them depends on runtime PM working for the other. In that case,
    if runtime PM has already been disabled for the second device,
    the first one's .suspend() won't work correctly (and analogously
    for resume).

    To make those issues go away, make the PM core disable runtime PM
    for devices right before executing subsystem/driver .suspend_late()
    callbacks for them and enable runtime PM for them right after
    executing subsystem/driver .resume_early() callbacks for them. This
    way the potential conflitcs between .suspend_late()/.resume_early()
    and their runtime PM counterparts are still prevented from happening,
    but the subtle ordering issues related to disabling/enabling runtime
    PM for devices during system suspend/resume are much easier to avoid.

    Reported-and-tested-by: Jan-Matthias Braun
    Signed-off-by: Rafael J. Wysocki
    Reviewed-by: Ulf Hansson
    Reviewed-by: Kevin Hilman
    Cc: 3.4+

    Rafael J. Wysocki
     

12 Dec, 2012

1 commit


18 Nov, 2012

1 commit


23 Oct, 2012

1 commit

  • Modify the device PM QoS core code to support PM QoS flags requests.

    First, add a new field of type struct pm_qos_flags called "flags"
    to struct dev_pm_qos for representing the list of PM QoS flags
    requests for the given device. Accordingly, add a new "type" field
    to struct dev_pm_qos_request (along with an enum for representing
    request types) and a new member called "flr" to its data union for
    representig flags requests.

    Second, modify dev_pm_qos_add_request(), dev_pm_qos_update_request(),
    the internal routine apply_constraint() used by them and their
    existing callers to cover flags requests as well as latency
    requests. In particular, dev_pm_qos_add_request() gets a new
    argument called "type" for specifying the type of a request to be
    added.

    Finally, introduce two routines, __dev_pm_qos_flags() and
    dev_pm_qos_flags(), allowing their callers to check which PM QoS
    flags have been requested for the given device (the caller is
    supposed to pass the mask of flags to check as the routine's
    second argument and examine its return value for the result).

    Signed-off-by: Rafael J. Wysocki
    Reviewed-by: Jean Pihet
    Reviewed-by: mark gross

    Rafael J. Wysocki
     

07 Oct, 2012

1 commit

  • Pull battery updates from Anton Vorontsov:
    "1. New drivers:
    - Marvell 88pm860x charger and battery drivers;
    - Texas Instruments LP8788 charger driver;
    2. Two new power supply properties: whether a battery is authentic,
    and chargers' maximal currents and voltages;
    3. A lot of TI LP8727 Charger cleanups;
    4. New features for Charger Manager, mainly now we can disable
    specific regulators;
    5. Random fixes and cleanups for other drivers."

    Fix up trivial conflicts in

    * tag 'for-v3.7' of git://git.infradead.org/battery-2.6: (52 commits)
    pda_power: Remove ac_draw_failed goto and label
    charger-manager: Add support sysfs entry for charger
    charger-manager: Support limit of maximum possible
    charger-manager: Check fully charged state of battery periodically
    lp8727_charger: More pure cosmetic improvements
    lp8727_charger: Fix checkpatch warning
    lp8727_charger: Add description in the private data
    lp8727_charger: Fix a typo - chg_parm to chg_param
    lp8727_charger: Make some cosmetic changes in lp8727_delayed_func()
    lp8727_charger: Clean up lp8727_charger_changed()
    lp8727_charger: Return if the battery is discharging
    lp8727_charger: Make lp8727_charger_get_propery() simpler
    lp8727_charger: Make lp8727_ctrl_switch() inline
    lp8727_charger: Make lp8727_init_device() shorter
    lp8727_charger: Clean up lp8727_is_charger_attached()
    lp8727_charger: Use specific definition
    lp8727_charger: Clean up lp8727 definitions
    lp8727_charger: Use the definition rather than enum
    lp8727_charger: Fix code for getting battery temp
    lp8727_charger: Clear interrrupts at inital time
    ...

    Linus Torvalds
     

02 Oct, 2012

1 commit

  • Pull the trivial tree from Jiri Kosina:
    "Tiny usual fixes all over the place"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (34 commits)
    doc: fix old config name of kprobetrace
    fs/fs-writeback.c: cleanup riteback_sb_inodes kerneldoc
    btrfs: fix the commment for the action flags in delayed-ref.h
    btrfs: fix trivial typo for the comment of BTRFS_FREE_INO_OBJECTID
    vfs: fix kerneldoc for generic_fh_to_parent()
    treewide: fix comment/printk/variable typos
    ipr: fix small coding style issues
    doc: fix broken utf8 encoding
    nfs: comment fix
    platform/x86: fix asus_laptop.wled_type module parameter
    mfd: printk/comment fixes
    doc: getdelays.c: remember to close() socket on error in create_nl_socket()
    doc: aliasing-test: close fd on write error
    mmc: fix comment typos
    dma: fix comments
    spi: fix comment/printk typos in spi
    Coccinelle: fix typo in memdup_user.cocci
    tmiofb: missing NULL pointer checks
    tools: perf: Fix typo in tools/perf
    tools/testing: fix comment / output typos
    ...

    Linus Torvalds
     

02 Sep, 2012

1 commit


23 Aug, 2012

2 commits

  • There are different types of chargers avalibale like AC, Solar, USB,
    etc.. Even in USB we have different types SDP/DCP/CDP/ACA and all these
    chargers have different o/p ratings. For example SDP supports only 500mA
    of charge current whereas AC charger can support upto 8A or more.

    Similarly batteries also come with charge current and voltage ratings
    and these ratings vary depending on its capacity and the technology
    used.

    This patch adds two new power supply properties
    CONSTANT_CHARGE_CURRENT_MAX and CONSTANT_CHARGE_CURRENT_MAX.

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

    Ramakrishna Pallala
     
  • It is possible that users can use non-standard chargers or use invalid
    batteries especially with mobile devices.

    This patch adds a new power supply property called 'AUTHENTIC' to
    indicate this to the user(user space).

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

    Ramakrishna Pallala
     

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

1 commit