15 Nov, 2013

1 commit


07 Jun, 2013

2 commits


17 Apr, 2013

1 commit


07 Mar, 2013

6 commits


23 Jan, 2013

4 commits

  • If battery is not identified while fg probe, mah_max_design gets
    initialized with unknown battery's charge full design. Reinitialize
    mah_max_design if battery is identified after fg probe.

    Signed-off-by: Rajkumar Kasirajan
    Signed-off-by: Lee Jones
    Reviewed-by: Vijaya Kumar K-1
    Reviewed-by: Marcus COOPER
    Reviewed-by: Olivier CLERGEAUD
    Reviewed-by: Arun MURTHY
    Reviewed-by: Rabin VINCENT
    Tested-by: Rupesh KUMAR
    Tested-by: Jonas ABERG

    Rajkumar Kasirajan
     
  • Flush all workqueues at suspend time to avoid suspending during work.

    Signed-off-by: Jonas Aaberg
    Signed-off-by: Lee Jones
    Reviewed-by: Marcus COOPER

    Jonas Aaberg
     
  • When the charger is removed we need to go to INIT_RECOVERY
    state instead of directly to RECOVERY state.

    Signed-off-by: Martin Bergstrom
    Signed-off-by: Lee Jones
    Reviewed-by: Marcus COOPER
    Reviewed-by: Jonas ABERG
    Tested-by: Jonas ABERG

    Martin Bergström
     
  • Changed conditions for restarting low battery measurements counter
    and adjusted the interval between measurements to avoid RF burst
    induced voltage drops, and to shorten time to decide to shut down.

    Signed-off-by: Hakan Berg
    Signed-off-by: Martin Bergstrom
    Signed-off-by: Lee Jones
    Reviewed-by: Jonas ABERG
    Reviewed-by: Marcus COOPER

    Hakan Berg
     

16 Jan, 2013

8 commits

  • As HZ is a full-second, there is little point in rounding it.
    Let's save a few cycles by using HZ directly.

    Signed-off-by: Lee Jones
    Signed-off-by: Anton Vorontsov

    Lee Jones
     
  • When calculating the average current the nominator will
    overflow when the charging current is high.

    Signed-off-by: Lee Jones
    Signed-off-by: Henrik Sölver
    Reviewed-by: Par-Olof HAKANSSON
    Reviewed-by: Jonas ABERG
    Tested-by: Par-Olof HAKANSSON
    Signed-off-by: Anton Vorontsov

    Paer-Olof Haakansson
     
  • Add support for the battery over-voltage situation

    Signed-off-by: Lee Jones
    Signed-off-by: Hakan Berg
    Reviewed-by: Karl KOMIEROWSKI
    Signed-off-by: Anton Vorontsov

    Hakan Berg
     
  • Round the capacity values for better enduser experience.

    Signed-off-by: Lee Jones
    Signed-off-by: pender01
    Reviewed-by: Jonas ABERG
    Tested-by: Marcus COOPER
    Signed-off-by: Anton Vorontsov

    pender01
     
  • In case of time out error IRQ needs to be disabled
    otherwise we will get unbalanced enable/disable pairs.

    Signed-off-by: Lee Jones
    Signed-off-by: Rickard Andersson
    Reviewed-by: Jonas ABERG
    Signed-off-by: Anton Vorontsov

    Rickard Andersson
     
  • Today the battery recharge is determined with a voltage threshold. This
    voltage threshold is only valid when the battery is relaxed. In charging
    algorithm the voltage read is the loaded battery voltage and no
    compensation is done to get the relaxed voltage. When maintenance
    charging is not selected, this makes the recharging condition to almost
    immediately activate when there is a discharge present on the battery.

    Depending on which vendor the battery comes from this behavior can wear
    out the battery much faster than normal.

    The fuelgauge driver is responsible to monitor the actual battery
    capacity and is able to estimate the remaining capacity. It is better to
    use the remaining capacity as a limit to determine when battery should
    be recharged.

    Signed-off-by: Lee Jones
    Signed-off-by: Marcus Cooper
    Reviewed-by: Hakan BERG
    Reviewed-by: Jonas ABERG
    Signed-off-by: Anton Vorontsov

    Marcus Cooper
     
  • Doing so provides a greater degree of accuracy when dealing with
    time-frames between 1us and 20ms. msleep() is only accurate for
    wake-ups greater than 20ms.

    Signed-off-by: Lee Jones
    Signed-off-by: Jonas ABERG
    Reviewed-by: Johan BJORNSTEDT
    Signed-off-by: Anton Vorontsov

    Jonas Aaberg
     
  • When enabling the CCEOC irq we might get false interrupt
    from ab8500-driver due to the latched value will be saved
    and interpreted as an IRQ when enabled

    Signed-off-by: Lee Jones
    Signed-off-by: Johan Bjornstedt
    Signed-off-by: Henrik Solver
    Reviewed-by: Karl KOMIEROWSKI
    Signed-off-by: Anton Vorontsov

    Johan Bjornstedt
     

06 Jan, 2013

1 commit


12 Dec, 2012

1 commit


11 Dec, 2012

4 commits

  • Now that we always pass platform specific battery management data
    through platform_data instead of obtaining it via different means
    depending the way be boot the system (DT or ATAGs); we need to
    re-jiggle the way we acquire it in the driver start-up functions.
    Now it is wrong for it to be missing, but we still allow Device
    Tree code to fiddle with it once we've confirmed it's there.

    Signed-off-by: Lee Jones

    Lee Jones
     
  • Currently the AB8500 battery management subsystem receives platform
    specific information via two different means depending on how the
    platform is booted. If DT is not enabled, a reference to a *_bm_data
    data structure containing each platform specific attribute is passed
    though platform_data. However, if DT is enabled, then platform_data
    is empty and the reference is gained though a DT specific probe
    function. There are two issues here 1) the same reference is
    being collected each time and 2) the DT way doesn't allow any
    provisions to select different platform specific attributes, which
    kind of defeats the object.

    Cc: Samuel Ortiz
    Signed-off-by: Lee Jones

    Lee Jones
     
  • The platform specific battery management configuration data structure
    is currently called 'bat' short for 'battery'; however, it contains
    information for all components of the battery management group, rather
    than information pertaining to the battery itself - there are other
    structures for that. So, in keeping with its structure namesake
    'abx500_bm_data', we rename it to 'bm' here. Using similar logic,
    we're also renaming 'bmdevs_of_probe' to the more device specific
    'ab8500_bm_of_probe'.

    Signed-off-by: Lee Jones

    Lee Jones
     
  • The CCMuxOffset bit is not kept set. This will force the
    columb counter of the AB8500 to use the measure offset
    calibration. This should increase the accuracy of the fuel
    gauge.

    Signed-off-by: Kalle Komierowski
    Signed-off-by: Marcus Cooper
    Signed-off-by: Lee Jones
    Reviewed-by: Jonas ABERG

    Kalle Komierowski
     

29 Nov, 2012

3 commits


19 Nov, 2012

1 commit

  • - This patch adds device tree support for fuelgauge driver
    - optimize bm devices platform_data usage and of_probe(...)
    Note: of_probe() routine for battery managed devices is made
    common across all bm drivers.
    - test status:
    - interrupt numbers assigned differs between legacy and FDT mode.

    Signed-off-by: Rajanikanth H.V
    Signed-off-by: Anton Vorontsov

    Rajanikanth H.V
     

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
     

23 Aug, 2012

1 commit

  • Initialize return variable before exiting on an error path.

    A simplified version of the semantic match that finds this problem is as
    follows: (http://coccinelle.lip6.fr/)

    //
    (
    if@p1 (\(ret < 0\|ret != 0\))
    { ... return ret; }
    |
    ret@p1 = 0
    )
    ... when != ret = e1
    when != &ret
    *if(...)
    {
    ... when != ret = e2
    when forall
    return ret;
    }

    //

    Signed-off-by: Julia Lawall
    Signed-off-by: Anton Vorontsov

    Julia Lawall
     

22 Aug, 2012

1 commit


05 May, 2012

2 commits

  • These patches clean up some ugliness and brings the variable
    initialisation formatting more into line with other drivers.

    Signed-off-by: Lee Jones
    Signed-off-by: Anton Vorontsov

    Lee Jones
     
  • If no platform data at all is supplied the driver crashes,
    extend the checks to be more careful so we can compile in the
    driver and boot also without platform data present.

    Acked-by: Arun Murthy
    Signed-off-by: Linus Walleij
    Signed-off-by: Anton Vorontsov

    Linus Walleij
     

27 Mar, 2012

3 commits

  • Noticed the following warnings:

    CC drivers/power/ab8500_fg.o
    drivers/power/ab8500_fg.c: In function 'charge_full_store':
    drivers/power/ab8500_fg.c:2258:2: warning: format '%d' expects argument of type 'int', but argument 4 has type 'ssize_t' [-Wformat]
    drivers/power/ab8500_fg.c: In function ‘charge_now_store’:
    drivers/power/ab8500_fg.c:2280:2: warning: format '%d' expects argument of type 'int', but argument 4 has type 'ssize_t' [-Wformat]

    This patch fixes the issues.

    Signed-off-by: Anton Vorontsov

    Anton Vorontsov
     
  • The patch fixes the following sparse warning:

    drivers/power/ab8500_charger.c:1619:6: warning: symbol 'ab8500_charger_detect_usb_type_work' was not declared. Should it be static?
    drivers/power/abx500_chargalg.c:1709:24: warning: symbol 'abx500_chargalg_sysfs_ops' was not declared. Should it be static?
    drivers/power/ab8500_fg.c:2328:24: warning: symbol 'ab8500_fg_sysfs_ops' was not declared. Should it be static?

    Signed-off-by: Anton Vorontsov

    Anton Vorontsov
     
  • ab8500_fg_discharge_state_to() function should accept
    'enum ab8500_fg_discharge_state' argument, not
    'enum ab8500_fg_charge_state'.

    Signed-off-by: Anton Vorontsov

    Anton Vorontsov