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

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

1 commit

  • 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